/* Inter (self-hosted, variable) */
@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:100 900;src:url(../fonts/inter/inter-latin-ext-wght-normal.woff2) format('woff2-variations');unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:100 900;src:url(../fonts/inter/inter-latin-wght-normal.woff2) format('woff2-variations');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}

/* Moved from header.php inline <style> blocks (order preserved) */
        :root {
            --main-bg: #f5f6f8;
            --bg-primary: #f5f6f8;
            --bg-secondary: #eef0f3;
            --card-bg: #ffffff;
            --border-color: rgba(0, 0, 0, 0.06);
            --text-primary: #111827;
            --text-secondary: #4b5563;
            --text-muted: #9ca3af;
            --primary-color: #2550f0;
            --accent-color: #1e40af;
            --brand-gradient: linear-gradient(135deg, #2550f0 0%, #1e40af 100%);
            --brand-light: rgba(37, 80, 240, 0.06);
            --brand-medium: rgba(37, 80, 240, 0.12);
            --brand-hover: #1d4ed8;
            --header-height: 80px;
            --nav-height: 0px;
            --admin-bar-height: 0px;
            --sidebar-width: 0px;
            --radius: 16px;
            --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
            --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
            --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.08);
        }

        /* Dark theme - early html-level background to prevent FOUC */
        html.theme-dark { background: #0a0f1a; }

        /* Dark theme variable overrides */
        body.theme-dark {
            --main-bg: #0a0f1a;
            --bg-primary: #0a0f1a;
            --bg-secondary: #111827;
            --card-bg: #141b2d;
            --border-color: rgba(255, 255, 255, 0.06);
            --text-primary: #f1f5f9;
            --text-secondary: #94a3b8;
            --text-muted: #64748b;
            --brand-light: rgba(37, 80, 240, 0.12);
            --brand-medium: rgba(37, 80, 240, 0.2);
            --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
            --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
            --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.5);
            background: #0a0f1a !important;
            color: #f1f5f9 !important;
        }
        
        /* Ensure dark background applies to all page containers */
        body.theme-dark html,
        body.theme-dark #page,
        body.theme-dark .site,
        body.theme-dark main,
        body.theme-dark .wp-site-blocks,
        body.theme-dark .main-content {
            background: #0b1220 !important;
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        /* FALLBACK CRITICAL STYLES - для предотвращения ломания */
        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
            background: #f8f9fa !important;
            color: #1a1a1a !important;
            line-height: 1.6;
            margin: 0 !important;
            padding: 0 !important;
            min-height: 100vh !important;
        }
        
        /* КРИТИЧЕСКИЙ GRID CSS - загружается сразу чтобы избежать сбивания layout */
        .hero-feature-blocks-wrapper {
            display: grid !important;
            grid-template-columns: 25% 50% 25% !important;
            gap: 20px !important;
            margin: 0 !important;
            width: 100% !important;
            overflow: hidden !important;
            box-sizing: border-box !important;
            padding: 0 clamp(40px, 5vw, 200px) !important;
        }
        
        .hero-feature-block {
            width: 100% !important;
            min-width: 0 !important;
            max-width: 100% !important;
            overflow: hidden !important;
            box-sizing: border-box !important;
        }
        
        /* Content is visible immediately (the former 0.45s fade-in delayed LCP). */

        /* Mobile: stack hero blocks vertically */
        @media (max-width: 968px) {
            .hero-feature-blocks-wrapper {
                grid-template-columns: 1fr !important;
                gap: 16px !important;
                padding: 0 20px !important;
            }
        }
        
        @media (max-width: 768px) {
            .hero-feature-blocks-wrapper {
                grid-template-columns: 1fr !important;
                gap: 12px !important;
                padding: 0 20px !important;
            }
        }

        /* Оптимизация для MacBook M1 */
        @media (-webkit-min-device-pixel-ratio: 2) and (min-width: 1400px) {
            .hero-feature-blocks-wrapper {
                transform: translateZ(0); /* Аппаратное ускорение */
            }
            
            .main-header {
                transform: translateZ(0);
                backface-visibility: hidden;
            }
        }

        /* Header */
        .main-header {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            height: var(--header-height);
            background: #2450f1;
            border-bottom: 1px solid rgba(255, 255, 255, 0.12);
            z-index: 1000;
            transition: background 0.2s ease;
        }

        /* Header scrolled state */
        .main-header.scrolled {
            background: #2450f1;
        }

        /* Account for WordPress admin bar */
        .admin-bar .main-header {
            top: var(--admin-bar-height);
        }

        .header-content {
            display: flex;
            align-items: center;
            justify-content: flex-start;
            height: 100%;
            max-width: 1200px;
            margin: 0 auto;
            padding: 0 24px;
        }
        @media (min-width: 1600px) {
            .header-content {
                max-width: 1320px;
            }
            .main-content {
                max-width: 1320px !important;
            }
            .tokens-archive-wrapper {
                max-width: 1320px !important;
            }
        }

        .logo {
            display: flex;
            align-items: center;
            gap: 12px;
            text-decoration: none;
            font-size: 24px;
            font-weight: 700;
            color: #ffffff;
            transition: opacity 0.15s ease;
        }

        .logo:hover {
            opacity: 0.85;
        }

        .logo-image, 
        .custom-logo {
            height: 40px;
            width: auto;
            max-width: 160px;
            object-fit: contain;
            transition: all 0.3s ease;
            filter: drop-shadow(0 2px 8px rgba(37, 80, 240, 0.2));
        }

        /* Ð£Ð±Ð¸Ñ€Ð°ÐµÐ¼ ÑÑ‚Ð°Ð½Ð´Ð°Ñ€Ñ‚Ð½Ñ‹Ðµ ÑÑÑ‹Ð»ÐºÐ¸ Ñƒ custom logo */
        .custom-logo-link {
            display: contents;
        }

        /* Fallback ÑÑ‚Ð¸Ð»Ð¸ Ð´Ð»Ñ Ñ‚ÐµÐºÑÑ‚Ð¾Ð²Ð¾Ð³Ð¾ Ð»Ð¾Ð³Ð¾Ñ‚Ð¸Ð¿Ð° (ÐµÑÐ»Ð¸ Ð¸Ð·Ð¾Ð±Ñ€Ð°Ð¶ÐµÐ½Ð¸Ðµ Ð½Ðµ Ð·Ð°Ð³Ñ€ÑƒÐ·Ð¸Ñ‚ÑÑ) */
        .logo-icon {
            background: var(--brand-gradient, var(--primary-color, #2550f0));
            color: white;
            width: 40px;
            height: 40px;
            border-radius: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 18px;
            font-weight: 700;
            box-shadow: 0 4px 12px rgba(37, 80, 240, 0.4);
        }

        .logo-text {
            font-size: 22px;
            font-weight: 700;
            color: #ffffff;
            transition: opacity 0.15s ease;
        }
        
        .logo-text-wrapper {
            display: flex;
            flex-direction: column;
            gap: 0;
            line-height: 1;
        }
        
        .logo-tagline {
            font-size: 11px;
            font-weight: 400;
            color: rgba(255, 255, 255, 0.7);
            letter-spacing: 0.5px;
            margin-top: 2px;
        }

        .logo-text-link { text-decoration: none; }
        .logo-text-link:hover .logo-text { opacity: .85; }

        /* Ð¡Ñ‚Ð¸Ð»Ð¸ Ð´Ð»Ñ fallback Ð»Ð¾Ð³Ð¾Ñ‚Ð¸Ð¿Ð° */
        .logo-fallback {
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .header-nav {
            display: flex;
            align-items: center;
        }

        .header-nav a {
            color: rgba(255, 255, 255, 0.95);
            text-decoration: none;
            padding: 6px 12px;
            border-radius: 4px;
            font-weight: 500;
            font-size: 14px;
            transition: all 0.2s ease;
        }

        .header-nav a.active,
        .header-nav a:hover {
            background: rgba(255, 255, 255, 0.15);
            color: #ffffff;
        }

        /* WP Site Blocks Container */
        .wp-site-blocks {
            display: flex;
            width: 100%;
            max-width: 100%;
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            overflow-x: hidden;
        }

        /* Mobile container adjustments */
        @media (max-width: 1024px) {
            :root {
                --nav-height: 0px; /* Horizontal nav is hidden, so no height */
            }
        }
        
        /* Add top spacing for fixed header + nav */
        body {
            padding-top: calc(var(--header-height) + var(--nav-height)) !important;
        }
        
        /* Mobile: remove nav height from padding since horizontal-nav is hidden */
        @media (max-width: 768px) {
            body {
                padding-top: var(--header-height) !important;
            }
            
            body.admin-bar {
                padding-top: calc(var(--header-height) + var(--admin-bar-height)) !important;
            }
        }
        
        /* Admin bar adjustment */
        body.admin-bar {
            padding-top: calc(var(--header-height) + var(--admin-bar-height) + var(--nav-height)) !important;
        }

        /* Community Header */
        .community-header {
            display: flex;
            align-items: center;
            gap: 8px;
            margin-bottom: 16px;
            font-size: 14px;
        }

        .community-icon {
            font-size: 16px;
        }

        .community-text {
            font-weight: 600;
            color: var(--text-primary);
        }

        .woo-badge {
            background: #ef4444;
            color: white;
            padding: 2px 6px;
            border-radius: 4px;
            font-size: 10px;
            font-weight: bold;
        }

        .community-desc {
            color: var(--text-muted);
            font-size: 13px;
        }

        .more-link {
            margin-left: auto;
            color: var(--text-muted);
            text-decoration: none;
            font-size: 13px;
        }

        /* Featured Banners Grid (6 columns) */
        .featured-banners-grid {
            display: grid;
            grid-template-columns: repeat(6, 1fr);
            gap: 12px;
            margin-bottom: 32px;
        }

        .banner-card {
            background: var(--card-bg);
            border: 1px solid var(--border-color);
            border-radius: 8px;
            padding: 16px;
            cursor: pointer;
            transition: all 0.3s ease;
            min-height: 140px;
            display: flex;
            flex-direction: column;
        }

        .banner-card:hover {
            transform: translateY(-2px);
            box-shadow: var(--shadow-md);
        }

        .banner-logo-large {
            margin-bottom: 12px;
        }

        .banner-logo-img {
            width: 100%;
            height: 60px;
            border-radius: 6px;
            object-fit: contain;
            background: #f8f9fa;
            padding: 8px;
        }

        .logo-bg-placeholder {
            width: 100%;
            height: 60px;
            border-radius: 6px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 14px;
            font-weight: bold;
            background: #f0b90b;
            color: white;
        }

        .logo-bg {
            width: 100%;
            height: 60px;
            border-radius: 6px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 14px;
            font-weight: bold;
        }

        .banner-text {
            flex: 1;
            display: flex;
            flex-direction: column;
            gap: 8px;
        }

        .banner-title {
            font-size: 12px;
            font-weight: 600;
            color: var(--text-primary);
            line-height: 1.3;
            margin-bottom: 6px;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }

        .banner-description {
            font-size: 11px;
            color: var(--text-muted);
            line-height: 1.3;
            display: -webkit-box;
            -webkit-line-clamp: 3;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }

        /* Vertical news cards */
        .news-card-vertical {
            background: white;
            border-radius: 12px;
            overflow: hidden;
            cursor: pointer;
            transition: transform 0.2s ease, box-shadow 0.2s ease;
            box-shadow: 0 2px 8px rgba(0,0,0,0.1);
            display: flex;
            flex-direction: column;
        }

        .news-card-vertical:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 16px rgba(0,0,0,0.15);
        }

        .news-image {
            width: 100%;
            height: 160px;
            position: relative;
            overflow: hidden;
            border-bottom: 1px solid var(--border-color);
        }

        .news-image img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            display: block;
        }

        .news-placeholder {
            width: 100%;
            height: 100%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 48px;
            font-weight: bold;
            color: white;
        }

        .news-content {
            padding: 14px 16px;
            display: flex;
            flex-direction: column;
            flex: 1;
        }

        .news-card-tags {
            display: flex;
            gap: 6px;
            flex-wrap: wrap;
            min-height: 22px;
            margin-bottom: 8px;
        }

        .news-card-tag {
            display: inline-block;
            padding: 3px 10px;
            border-radius: 100px;
            font-size: 10px;
            font-weight: 600;
            background: transparent;
            color: var(--text-secondary);
            border: 1px solid var(--border-color);
            text-transform: uppercase;
            line-height: 1.6;
        }

        .news-title {
            font-size: 14px;
            font-weight: 600;
            color: var(--text-primary, #1a1a1a);
            margin: 0 0 8px 0;
            line-height: 1.4;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }

        .news-description {
            font-size: 12px;
            color: var(--text-muted, #666);
            margin: 0 0 10px 0;
            line-height: 1.5;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }

        .news-meta {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-top: auto;
            padding-top: 10px;
            border-top: 1px solid var(--border-color);
        }
        .news-date {
            font-size: 11px;
            color: var(--text-muted, #999);
            font-weight: 500;
        }
        .news-readmore {
            font-size: 11px;
            font-weight: 600;
            color: var(--primary-color, #2550f0);
            text-decoration: none;
            white-space: nowrap;
            text-transform: uppercase;
            letter-spacing: 0.3px;
            padding: 4px 12px;
            border: 1px solid var(--primary-color, #2550f0);
            border-radius: 100px;
            transition: background 0.15s ease;
        }
        .news-readmore:hover {
            background: rgba(37, 80, 240, 0.08);
        }

        .banner-tags {
            display: flex;
            gap: 4px;
        }

        .banner-stats {
            display: flex;
            justify-content: space-between;
            align-items: center;
            font-size: 10px;
            color: var(--text-muted);
            margin-top: auto;
            padding-top: 8px;
            border-top: 1px solid var(--border-color);
        }

        .banner-stats span {
            font-size: 10px;
        }

        /* Responsive for banners */
        @media (max-width: 1400px) {
            .exchange-grid {
                grid-template-columns: repeat(5, 1fr);
            }
        }

        @media (max-width: 1200px) {
            .featured-banners-grid {
                grid-template-columns: repeat(3, 1fr);
            }
            
            .exchange-grid {
                grid-template-columns: repeat(3, 1fr);
            }
        }

        /* Widescreen: bigger cards, capped columns */
        @media (min-width: 1600px) {
            .exchange-grid {
                grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            }

            .exchange-card {
                padding: 24px;
            }

            .exchange-logo {
                width: 72px;
                height: 72px;
            }

            .section-header h2 {
                font-size: clamp(1.25rem, 1rem + 0.5vw, 1.75rem);
            }
        }

        @media (min-width: 1920px) {
            .exchange-grid {
                grid-template-columns: repeat(6, 1fr);
            }
        }

        @media (min-width: 2560px) {
            .exchange-grid {
                grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
            }
        }

        @media (max-width: 768px) {
            .featured-banners-grid {
                grid-template-columns: repeat(2, 1fr);
            }
            
            .exchange-grid,
            #news .exchange-grid {
                grid-template-columns: repeat(2, 1fr);
                gap: 12px;
            }

            .exchange-card {
                padding: 14px;
            }

            .exchange-logo {
                width: 40px;
                height: 40px;
                border-radius: 10px;
            }

            .exchange-logo img {
                width: 40px;
                height: 40px;
                border-radius: 10px;
            }

            .exchange-header {
                gap: 10px;
                margin-bottom: 8px;
                padding-bottom: 6px;
            }

            .exchange-info h3 {
                font-size: 13px;
            }

            .exchange-description {
                font-size: 12px;
                -webkit-line-clamp: 1;
            }
            
            .logo-text {
                font-size: 18px;
            }
            
            .main-content,
            .single-service-content,
            main.wp-block-group {
                padding: 24px 16px !important;
            }
            
            /* Компактный хедер */
            .header-content {
                display: flex;
                align-items: center;
                justify-content: space-between;
                gap: 4px;
                flex-wrap: nowrap;
                padding: 8px 12px !important;
            }
            
            .logo-text {
                font-size: 16px !important;
            }
            
            .logo-tagline {
                display: none;
            }
            
            /* Разделитель после логотипа */
            .header-content::after {
                content: '';
                width: 1px;
                height: 30px;
                background: rgba(255, 255, 255, 0.3);
                margin: 0 4px;
                order: 1;
            }

            .logo {
                gap: 8px;
                flex-shrink: 0;
            }

            .custom-logo, .logo-image {
                height: 32px !important;
            }
            
            .site-branding {
                order: 0;
                flex-shrink: 0;
            }
            
            /* Кнопки категорий и чейнов */
            .header-nav-btn {
                order: 2;
                padding: 8px 12px !important;
                font-size: 16px !important;
                min-width: auto !important;
                width: auto !important;
                height: 36px !important;
                background: rgba(255, 255, 255, 0.15) !important;
                border: none !important;
                border-radius: 8px !important;
                color: #ffffff !important;
                transition: all 0.2s ease !important;
                display: inline-flex !important;
                align-items: center !important;
                justify-content: center !important;
                flex-shrink: 0;
            }
            
            .header-nav-btn:hover,
            .header-nav-btn.active {
                background: rgba(255, 255, 255, 0.25) !important;
            }
            
            .header-nav-btn span {
                display: none;
            }
            
            .header-nav-btn .fa-chevron-down {
                display: none;
            }
            
            /* Скрыть поиск на мобильном */
            .header-search-container {
                display: none;
            }

            .header-search-input {
                padding: 6px 8px 6px 28px !important;
                font-size: 12px !important;
            }
            
            /* Действия в хедере */
            .header-actions {
                display: flex;
                align-items: center;
                gap: 6px;
                flex-shrink: 0;
            }
            
            /* Все кнопки одинакового размера */
            .theme-toggle-btn,
            .twitter-header-btn {
                width: 36px !important;
                height: 36px !important;
                padding: 8px !important;
                display: flex !important;
                align-items: center !important;
                justify-content: center !important;
                font-size: 16px !important;
                flex-shrink: 0;
            }
            
            .about-link-text {
                width: 36px !important;
                height: 36px !important;
                padding: 0 !important;
                display: flex !important;
                align-items: center !important;
                justify-content: center !important;
                font-size: 10px !important;
                font-weight: 600 !important;
                text-align: center !important;
                border: none !important;
                border-radius: 8px !important;
                background: rgba(255, 255, 255, 0.1) !important;
            }
            
            /* Mobile: restore backup header button styles (no dashed borders) */
            .twitter-header-btn {
                border: none !important;
                background: linear-gradient(135deg, #1DA1F2 0%, #0d8ecf 100%) !important;
                box-shadow: 0 2px 8px rgba(29, 161, 242, 0.25);
            }
            
            .theme-toggle-btn {
                border: none !important;
                background: rgba(255, 255, 255, 0.1) !important;
            }
            
            .header-search-input {
                border: 1px solid rgba(255, 255, 255, 0.25) !important;
                border-radius: 24px !important;
                background: rgba(255, 255, 255, 0.15) !important;
            }
        }

        /* Section Header */
        .section-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-top: 0;
            margin-bottom: 16px;
            padding-bottom: 0;
            border-bottom: none;
            position: relative;
        }
        
        .section-header:first-of-type,
        .first-section .section-header {
            margin-top: 0;
        }
        
        .first-section {
            padding-top: 16px; /* Reduced to better align with sidebar icons */
        }
        
        /* Fine-tune alignment on mobile */
        @media (max-width: 1025px) {
            .first-section {
                padding-top: 0px; /* No padding on mobile - align directly with icons */
                margin-top: 8px; /* Small margin instead */
            }
            
            .section-header {
                margin-top: 8px; /* Add small margin to section headers on mobile */
                margin-bottom: 16px;
            }
            
            .section-header:first-of-type,
            .first-section .section-header {
                margin-top: 0; /* First section header has no top margin */
            }
        }
        
        .section-header::before { display: none; }

        .section-header h2 {
            font-size: 16px;
            font-weight: 600;
            color: var(--text-primary);
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 0;
            background: transparent;
            border: none;
            margin: 0;
        }
        
        .section-header h2::before {
            display: none;
        }
        
        /* Section-specific ::before colors removed — h2::before { display: none } */

        .more-link {
            color: var(--text-muted);
            text-decoration: none;
            font-size: 14px;
        }

        .more-link:hover {
            color: var(--accent-color);
        }

        /* Exchange Grid */
        .exchange-grid {
            display: grid;
            /* Adapt to available width: fit as many cards as possible without overflow */
            grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
            gap: clamp(14px, 1vw, 24px);
            margin-bottom: clamp(48px, 4vw, 80px);
            padding-bottom: 24px;
        }

        /* News Grid */
        #news .exchange-grid {
            grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
            gap: 20px;
        }

    .exchange-card {
            background: var(--card-bg);
            border: 1px solid var(--border-color);
            border-radius: 12px;
            padding: 18px;
            cursor: pointer;
            transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
            backdrop-filter: blur(10px);
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
            min-height: 80px;
            display: flex;
            flex-direction: column;
            position: relative;
            overflow: hidden;
        }
        
        /* Gradient overlay on hover */
        .exchange-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: linear-gradient(135deg, 
                rgba(37, 80, 240, 0.05) 0%, 
                rgba(37, 80, 240, 0.02) 50%, 
                transparent 100%);
            opacity: 0;
            transition: opacity 0.4s ease;
            pointer-events: none;
            z-index: 0;
        }

        .exchange-card:hover {
            transform: translateY(-6px) scale(1.01);
            box-shadow: 0 12px 24px rgba(37, 80, 240, 0.15), 
                        0 4px 8px rgba(0, 0, 0, 0.08);
            border-color: rgba(37, 80, 240, 0.3);
        }
        
        .exchange-card:hover::before {
            opacity: 1;
        }
        
        /* Stagger animation for cards */
        .exchange-card:nth-child(1) { animation-delay: 0.05s; }
        .exchange-card:nth-child(2) { animation-delay: 0.1s; }
        .exchange-card:nth-child(3) { animation-delay: 0.15s; }
        .exchange-card:nth-child(4) { animation-delay: 0.2s; }
        .exchange-card:nth-child(5) { animation-delay: 0.25s; }
        .exchange-card:nth-child(6) { animation-delay: 0.3s; }
        
        @keyframes fadeInUp {
            from {
                opacity: 0;
                transform: translateY(20px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }
        
        /* Ensure content is above gradient */
        .exchange-card > * {
            position: relative;
            z-index: 1;
        }

        .exchange-header {
            display: flex;
            align-items: flex-start;
            gap: 12px;
            margin-bottom: 12px;
            padding: 0 0 8px 0;
            padding-left: unset;
            border: none;
        }

        .exchange-content {
            flex: 1;
            display: flex;
            flex-direction: column;
            margin-bottom: 4px;
        }

        .exchange-logo {
            width: 64px;
            height: 64px;
            border-radius: 8px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: bold;
            color: white;
            font-size: 14px;
            flex-shrink: 0;
            overflow: hidden;
        }

        .exchange-logo img {
            width: 64px;
            height: 64px;
            object-fit: contain;
            border-radius: 8px;
        }

        .exchange-info {
            flex: 1;
            min-width: 0;
        }

        .exchange-info h3 {
            font-size: 16px;
            font-weight: 600;
            color: var(--text-primary);
            margin: 0 0 4px 0;
            line-height: 1.3;
        }

        .exchange-info h4 {
            font-size: 14px;
            font-weight: 600;
            color: var(--text-primary);
            margin: 0 0 4px 0;
            line-height: 1.3;
        }

        .exchange-description {
            font-size: 12px;
            color: var(--text-secondary);
            line-height: 1.4;
            margin: 0;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }

        .exchange-type {
            font-size: 12px;
            color: var(--text-muted);
            margin-bottom: 0;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
            line-height: 1.3;
        }

        /* Tooltip styles removed - no more hover tooltips on cards */

        .exchange-tags {
            display: flex;
            flex-wrap: wrap;
            gap: 6px;
            margin-bottom: 0;
            padding-top: 0;
            margin-top: auto;
        }

        .woo-tag {
            background: #ef4444;
            color: white;
            padding: 2px 6px;
            border-radius: 3px;
            font-size: 10px;
            font-weight: 500;
        }

        .exchange-tag {
            padding: 3px 10px;
            background: transparent;
            color: var(--text-secondary);
            border: 1px solid var(--border-color);
            border-radius: 100px;
            font-size: 10px;
            font-weight: 500;
            text-decoration: none;
        }

        .exchange-tag.category-tag {
            background: var(--brand-light);
            color: var(--text-secondary);
        }

        /* Blockchain icons */
        .exchange-blockchains {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            margin-left: 8px;
        }

        .oxn-bc-icon {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 18px;
            height: 18px;
        }

        .oxn-bc-icon img,
        .oxn-bc-icon svg {
            width: 18px;
            height: 18px;
            object-fit: contain;
        }

        .bc-more {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 18px;
            height: 18px;
            font-size: 10px;
            font-weight: 600;
            color: var(--text-muted);
            background: var(--border-color);
            border-radius: 50%;
        }


        /* Card share button */
        .card-share-btn {
            width: 24px;
            height: 24px;
            flex-shrink: 0;
            border-radius: 50%;
            border: none;
            background: transparent;
            color: #9ca3af;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.15s ease;
            margin-left: auto;
            padding: 0;
        }
        .card-share-btn:hover {
            background: #f3f4f6;
            color: #000;
        }
        .card-share-btn svg {
            width: 24px;
            height: 24px;
        }
        
        /* Dark mode for card share button */
        body.theme-dark .card-share-btn {
            color: #6b7280;
        }
        body.theme-dark .card-share-btn:hover {
            background: rgba(255, 255, 255, 0.1);
            color: #fff;
        }

        /* Brand specific logos */
        .logo-binance {
            background: #f0b90b !important;
            color: #000 !important;
        }

        .logo-okx {
            background: #000 !important;
            color: #fff !important;
        }

        .logo-bybit {
            background: #f7931a !important;
            color: #fff !important;
        }

        .logo-gateio {
            background: #00d4aa !important;
            color: #fff !important;
        }

        .logo-kucoin {
            background: #24d65f !important;
            color: #fff !important;
        }

        .logo-htx {
            background: #00d4aa !important;
            color: #fff !important;
        }

        .logo-bitget {
            background: #00d4cc !important;
            color: #fff !important;
        }

        .logo-coinbase {
            background: #0052ff !important;
            color: #fff !important;
        }

        .logo-kraken {
            background: #5741d9 !important;
            color: #fff !important;
        }

        .no-exchanges {
            grid-column: 1 / -1;
            text-align: center;
            padding: 64px 24px;
            color: var(--text-muted);
        }

        /* Admin bar height only when admin bar exists */
        .admin-bar { --admin-bar-height: 32px; }
        /* Admin bar adjustments for mobile (only when admin bar exists) */
        @media screen and (max-width: 782px) {
            .admin-bar { --admin-bar-height: 46px; }
        }

        /* Responsive */
        @media (max-width: 1024px) {
            .main-content,
            .single-service-content,
            main.wp-block-group {
                padding: 32px 24px !important;
            }
        }

        @media (max-width: 768px) {
            .logo-text {
                font-size: 18px;
            }
            
            .main-content,
            .single-service-content,
            main.wp-block-group {
                padding: 24px 16px !important;
                max-width: 100vw;
                overflow-x: hidden;
                min-width: 0;
            }
        }

        @media (max-width: 480px) {
            .logo-image, .custom-logo {
                height: 30px !important;
            }
            
            .logo-text {
                font-size: 16px !important;
            }
            
            .header-content {
                padding: 0 12px !important;
            }

            /* Скрыть поиск на маленьких экранах */
            .header-search-container {
                display: none;
            }

            .featured-banners-grid {
                grid-template-columns: 1fr;
            }

            #news .exchange-grid {
                grid-template-columns: 1fr;
            }

            .exchange-card {
                padding: 12px;
            }
        }
        /* Header divider */
        .header-divider {
            width: 1px;
            height: 40px;
            border-left: 1px solid rgba(255, 255, 255, 0.18);
            background: transparent;
            margin: 0 24px;
        }
        
        /* Header nav buttons (Category, Chains) */
        .header-nav-btn {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 8px 16px;
            background: rgba(255, 255, 255, 0.08);
            border: none;
            border-radius: 100px;
            color: #ffffff !important;
            font-size: 13px;
            font-weight: 600;
            cursor: pointer;
            transition: background 0.15s ease, color 0.15s ease;
            white-space: nowrap;
            text-transform: uppercase;
            letter-spacing: 0.3px;
        }
        
        .header-nav-btn:hover {
            background: #ffffff;
            color: #2450f1 !important;
        }
        
        .header-nav-btn i {
            font-size: 14px;
            color: inherit !important;
        }
        
        .header-nav-btn .fa-chevron-down {
            font-size: 10px;
            margin-left: 4px;
            transition: transform 0.2s ease, color 0.15s ease;
            color: rgba(255, 255, 255, 0.7);
        }
        
        .header-nav-btn:hover .fa-chevron-down {
            color: #2450f1 !important;
        }
        
        .header-nav-btn.active {
            background: #ffffff;
            border-color: #ffffff;
            border-style: solid;
            color: #2450f1 !important;
        }
        
        .header-nav-btn.active .fa-chevron-down {
            transform: rotate(180deg);
            color: #2450f1 !important;
        }
        
        body.theme-dark .header-nav-btn {
            color: #ffffff !important;
        }
        
        body.theme-dark .header-nav-btn:hover {
            background: #ffffff;
            color: #2450f1 !important;
        }
        
        body.theme-dark .header-nav-btn.active {
            background: #ffffff;
            color: #2450f1 !important;
        }
        
        /* Mobile: override nav buttons to backup style (no pill borders) */
        @media (max-width: 768px) {
            .header-nav-btn {
                background: rgba(255, 255, 255, 0.15) !important;
                border: none !important;
                border-radius: 8px !important;
            }
            .header-nav-btn:hover,
            .header-nav-btn.active {
                background: rgba(255, 255, 255, 0.25) !important;
                border: none !important;
            }
        }
        
        /* Header actions */
        .header-actions { 
            margin-left: auto; 
            display: flex; 
            align-items: center; 
            gap: 12px; 
        }
        
        /* Search container - hidden on mobile, visible on desktop */
        .header-search-container {
            position: relative;
            display: flex;
            align-items: center;
        }
        
        @media (max-width: 768px) {
            .header-search-container {
                display: none !important;
            }
        }
        
        .header-search-icon {
            position: absolute;
            left: 14px;
            color: rgba(255, 255, 255, 0.5);
            font-size: 14px;
            pointer-events: none;
            z-index: 1;
        }
        
        .header-search-input {
            width: 320px;
            height: 40px;
            padding: 0 14px 0 38px;
            border: 1px solid rgba(255, 255, 255, 0.18);
            border-radius: 100px;
            background: rgba(255, 255, 255, 0.08);
            color: #ffffff;
            font-size: 13px;
            font-family: inherit;
            transition: border-color 0.15s ease, background 0.15s ease;
            outline: none;
        }
        
        .header-search-input::placeholder {
            color: rgba(255, 255, 255, 0.55);
        }
        
        .header-search-input:focus {
            background: rgba(255, 255, 255, 0.15);
            border-color: rgba(255, 255, 255, 0.6);
            border-style: solid;
        }
        
        /* Search results dropdown */
        .search-results-dropdown {
            position: absolute;
            top: 100%;
            left: 0;
            right: 0;
            margin-top: 8px;
            background: var(--card-bg, #fff);
            border: 1px solid var(--border-color);
            border-radius: 12px;
            max-height: 500px;
            overflow-y: auto;
            z-index: 1001;
        }
        
        .search-results-content {
            padding: 8px;
        }
        
        .search-result-item {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 12px;
            border-radius: 8px;
            cursor: pointer;
            transition: all 0.2s ease;
            text-decoration: none;
            color: inherit;
        }
        
        .search-result-item:hover {
            background: #f8f9fa;
        }
        
        .search-result-logo {
            width: 48px;
            height: 48px;
            border-radius: 8px;
            object-fit: cover;
            flex-shrink: 0;
        }
        
        .search-result-info {
            flex: 1;
            min-width: 0;
        }
        
        .search-result-title {
            font-size: 15px;
            font-weight: 600;
            color: #1a1a1a;
            margin: 0 0 4px 0;
        }
        
        .search-result-meta {
            font-size: 13px;
            color: #666;
        }
        
        .search-loading {
            text-align: center;
            padding: 20px;
            color: #666;
        }
        
        .search-no-results {
            text-align: center;
            padding: 20px;
            color: #666;
        }
        
        /* About link compact */
        .about-link-text { 
            display: inline-flex; 
            align-items: center; 
            height: 40px; 
            padding: 0 16px; 
            color: #ffffff; 
            text-decoration: none; 
            font-weight: 600; 
            font-size: 13px; 
            letter-spacing: 0.3px;
            text-transform: uppercase;
            transition: background 0.15s ease; 
            border-radius: 100px; 
            border: none; 
            background: rgba(255, 255, 255, 0.08); 
        }
        .about-link-text:hover { 
            background: rgba(255, 255, 255, 0.15); 
        }
        
        /* Twitter button */
        .twitter-header-btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 40px;
            height: 40px;
            padding: 0;
            color: #ffffff;
            text-decoration: none;
            border-radius: 50%;
            border: none;
            background: rgba(255, 255, 255, 0.08);
            transition: background 0.15s ease;
        }
        .twitter-header-btn:hover {
            background: rgba(255, 255, 255, 0.15);
        }
        .twitter-header-btn svg {
            flex-shrink: 0;
        }
        
        /* Share button */
        .share-btn {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            border: none;
            background: rgba(255, 255, 255, 0.08);
            color: #ffffff;
            display: grid;
            place-items: center;
            cursor: pointer;
            transition: background 0.15s ease;
            padding: 0;
        }
        .share-btn:hover {
            background: rgba(255, 255, 255, 0.15);
        }
        .share-btn svg {
            width: 24px;
            height: 24px;
        }
        
        /* Compact dark mode toggle */
        .theme-toggle-btn { 
            width: 40px; 
            height: 40px; 
            border-radius: 50%; 
            border: none; 
            background: rgba(255, 255, 255, 0.08); 
            color: #ffffff; 
            display: grid; 
            place-items: center; 
            cursor: pointer; 
            transition: background 0.15s ease; 
            font-size: 16px; 
        }
        .theme-toggle-btn:hover { 
            background: rgba(255, 255, 255, 0.15); 
        }
        .theme-toggle-btn i { 
            font-size: 18px; 
        }
        
        /* Responsive */
        @media (max-width: 1024px) {
            .header-search-input {
                width: 240px;
            }
        }
        
        @media (max-width: 768px) {
            /* Скрыть разделители на мобильном — separator в хедере через ::after */
            .header-divider {
                display: none;
            }
        }
.search-highlight {
    background: #ffd70080;
    color: #000;
    padding: 2px 4px;
    border-radius: 3px;
    font-weight: 600;
}

body.theme-dark .search-highlight {
    background: rgba(37, 80, 240, 0.3);
    color: #fff;
}
/* Dark mode fine-tuning */
body.theme-dark .banner-logo-img { background: rgba(255,255,255,0.06); }
body.theme-dark .news-card-vertical { background: var(--card-bg); }
body.theme-dark .news-title { color: var(--text-primary); }
body.theme-dark .news-description { color: var(--text-muted); }
body.theme-dark .exchange-tag.category-tag { background: rgba(255,255,255,0.08); color: var(--text-secondary); }
body.theme-dark .exchange-header { background: var(--card-bg) !important; border-color: var(--border-color) !important; }
body.theme-dark .exchange-info h3,
body.theme-dark .exchange-info h4,
body.theme-dark .exchange-description { color: #ffffff; }

/* Mobile submenu styles */
.mobile-category-submenu, 
.mobile-chains-submenu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--main-bg, #f5f6f8);
    border-top: 1px solid var(--border-color);
    z-index: 1001;
}

.mobile-submenu-content {
    padding: 15px;
    max-height: 60vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.mobile-category-grid,
.mobile-chains-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    max-height: 50vh;
    overflow-y: auto;
}

.mobile-category-item,
.mobile-chain-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 10px 6px;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-secondary);
    transition: background 0.15s ease, color 0.15s ease;
    text-align: center;
    min-height: 65px;
    cursor: pointer;
}

.mobile-more-categories {
    border-color: var(--primary-color, #2550f0) !important;
    color: var(--primary-color) !important;
}

.mobile-category-item:hover,
.mobile-chain-item:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.mobile-category-item:active,
.mobile-chain-item:active {
    background: var(--bg-secondary);
}

.mobile-category-item i,
.mobile-chain-item i {
    font-size: 16px;
    flex-shrink: 0;
}

.mobile-chain-item img {
    width: 20px;
    height: 20px;
    object-fit: contain;
    flex-shrink: 0;
}

.mobile-category-item span,
.mobile-chain-item span {
    font-size: 10px;
    font-weight: 600;
    line-height: 1.2;
    word-break: break-word;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    max-width: 100%;
}

/* Dark theme for mobile submenus */
body.theme-dark .mobile-category-submenu,
body.theme-dark .mobile-chains-submenu {
    background: var(--main-bg);
    border-top-color: var(--border-color);
}

body.theme-dark .mobile-category-item,
body.theme-dark .mobile-chain-item {
    background: transparent;
    border-color: var(--border-color);
    color: var(--text-secondary);
}

body.theme-dark .mobile-category-item:hover,
body.theme-dark .mobile-chain-item:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

/* Mobile submenu JavaScript */
