/* Timeweb Page Styles - Only Used Classes */

/* ========================================
   LEFT SIDEBAR NAVIGATION - MINTLIFY STYLE
   ======================================== */

/* Mobile Header */
.mobile-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1001;
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    padding: 0;
    display: none;
}

.mobile-header-content {
    width: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.mobile-logo {
    width: 100%;
    padding: 16px;
    border-bottom: 1px solid #e5e7eb;
}

.mobile-logo a {
    text-decoration: none;
    display: inline-block;
    transition: opacity 0.2s ease;
}

.mobile-logo a:hover {
    opacity: 0.8;
}

.mobile-logo img {
    height: 24px;
    width: auto;
    filter: brightness(0);
}

.mobile-nav-section {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 16px;
}

/* Breadcrumbs */
.breadcrumbs {
    display: none;
}

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

.breadcrumb-item {
    display: flex;
    align-items: center;
}

.breadcrumb-link {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: #8e8c8c;
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumb-link:hover {
    color: #000000;
}

.breadcrumb-separator {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: #d1d5db;
    margin: 0 4px;
}

.breadcrumb-current {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #8e8c8c;
}

/* Mobile Menu Toggle Button */
.mobile-menu-toggle-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: background-color 0.2s ease;
}

.mobile-menu-toggle-btn:hover {
    background: #f1f5f9;
}

.mobile-menu-toggle-btn svg {
    color: #1A1A1A;
}

/* Left Sidebar Navigation */
.left-sidebar-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100vh;
    background: #ffffff;
    border-right: 1px solid #e5e7eb;
    z-index: 1000;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    transform: translateX(0);
    transition: transform 0.3s ease;
}

.sidebar-header {
    padding: 16px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-close-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    display: none;
    transition: background-color 0.2s ease;
}

.sidebar-close-btn:hover {
    background: #f1f5f9;
}

.sidebar-close-btn svg {
    color: #1A1A1A;
}

/* Mobile Overlay */
.mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-overlay.active {
    opacity: 1;
}

/* Mobile Close Button (top right) */
.mobile-close-btn {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 1002;
    background: none;
    border: none;
    width: 24px;
    height: 24px;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mobile-close-btn:hover {
    opacity: 0.7;
}

.mobile-close-btn svg {
    color: #1A1A1A;
    width: 24px;
    height: 24px;
}

.logo a {
    text-decoration: none;
    display: inline-block;
    transition: opacity 0.2s ease;
}

.logo a:hover {
    opacity: 0.8;
}

.logo img {
    height: 24px;
    width: auto;
    filter: brightness(0);
}

.sidebar-content {
    flex: 1;
    padding: 20px 0;
}

.sidebar-footer {
    padding: 20px 0 0 0;
    border-top: 1px solid #e5e7eb;
}

.nav-section {
    margin-bottom: 32px;
}

.nav-section:last-child {
    margin-bottom: 0;
}

.nav-section-title {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: #AFB7BE;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    padding: 0 20px 0 23px;
}

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

.nav-section-list li {
    margin-bottom: 2px;
}

.nav-item {
    display: block;
    padding: 10px 20px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: #1A1A1A;
    text-decoration: none;
    line-height: 1.5;
    transition: all 0.15s ease;
    border-left: 3px solid transparent;
}

.nav-item:hover {
    color: #000000;
    background: #F5F5F5;
}

.nav-item.active {
    color: #000000;
    font-weight: 500;
    background: rgba(0, 0, 0, 0.05);
    border-left-color: #000000;
}

/* Scrollbar styling - Hidden but functional */
.left-sidebar-nav::-webkit-scrollbar {
    width: 0px;
    background: transparent;
}

.left-sidebar-nav::-webkit-scrollbar-track {
    background: transparent;
}

.left-sidebar-nav::-webkit-scrollbar-thumb {
    background: transparent;
}

.left-sidebar-nav::-webkit-scrollbar-thumb:hover {
    background: transparent;
}

/* Firefox scrollbar hiding */
.left-sidebar-nav {
    scrollbar-width: none;
}

/* Mobile Responsive */
@media (max-width: 767px) {
    .mobile-header {
        display: block;
    }
    
    .left-sidebar-nav {
        transform: translateX(-100%);
    }
    
    .left-sidebar-nav.mobile-open {
        transform: translateX(0);
    }
    
    .mobile-overlay {
        display: block;
    }
    
    .mobile-close-btn {
        display: flex;
    }
    
    .sidebar-close-btn {
        display: none;
    }
    
    .breadcrumbs {
        display: block;
    }
}

/* Desktop Navigation (768px+) */
@media (min-width: 768px) {
    .main-content {
        padding-left: 280px;
        padding-right: 0;
        margin-left: auto;
        margin-right: auto;
    }
}

/* Mobile Navigation (до 767px) */
@media (max-width: 767px) {
    .main-content {
        padding-top: 80px; /* Height of mobile header */
        padding-left: 16px;
        padding-right: 16px;
        margin-left: 0;
    }
}

/* Main content offset for sidebar */
.main-content {
    margin-left: auto;
    margin-right: auto;
    min-height: 100vh;
    padding-top: 0;
    padding-left: 280px;
    max-width: calc(1200px + 280px);
    padding-bottom: 104px;
    color: #000;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-x: hidden;
}

.medium-article {
    padding-top: 0;
}

/* Article header padding */
.article-header {
    padding-top: 80px;
}

/* ========================================
   ARTICLE NAVIGATION STYLES
   ======================================== */

/* Sidebar Navigation - Documentation Style */
.article-sidebar-nav {
    position: fixed;
    top: 80px;
    right: 20px;
    width: 200px;
    z-index: 1000;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
}

.nav-title {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 400;
    color: #AFB7BE;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    padding: 0 8px;
}

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

.nav-list li {
    margin-bottom: 2px;
}

.nav-link {
    display: block;
    padding: 6px 8px;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 400;
    color: #1A1A1A;
    text-decoration: none;
    line-height: 1.4;
    border-radius: 4px;
    transition: all 0.15s ease;
}

.nav-link:hover {
    color: #000000;
    background: #F5F5F5;
}

.nav-link.active {
    color: #000000;
    font-weight: 500;
    background: rgba(0, 0, 0, 0.05);
}

/* Section spacing for better navigation experience */
.article-section[id] {
    padding-top: 0;
}

.article-section[id]:first-of-type {
    padding-top: 0;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .mobile-header {
        display: flex;
    }
    
    .breadcrumbs {
        display: block;
    }
    
    .left-sidebar-nav {
        transform: translateX(-100%);
        top: 0;
        height: 100vh;
        z-index: 1001;
        transition: transform 0.3s ease;
    }
    
    .left-sidebar-nav.mobile-open {
        transform: translateX(0);
    }
    
    .mobile-overlay {
        display: block;
    }
    
    .mobile-close-btn {
        display: flex;
    }
    
    .main-content {
        margin-left: auto;
        margin-right: auto;
        padding-left: 0;
        padding-top: 80px;
        max-width: none;
    }
    
    .article-sidebar-nav {
        display: none;
    }
    
    .article-section[id] {
        padding-top: 0;
    }
    
    .article-header {
        margin-top: 64px;
    }
}

@media (max-width: 1200px) {
    .article-sidebar-nav {
        display: none;
    }
}

/* ========================================
   PRELOADER STYLES
   ======================================== */

/* Preloader */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #ffffff;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    transition: opacity 0.8s ease-out, visibility 0.8s ease-out;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.preloader.fade-out {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.preloader-content {
    text-align: center;
    animation: contentFadeIn 1s ease-out;
}

.preloader-logo {
    width: 86px;
    height: 66px;
    animation: logoFadeIn 2s ease-out infinite;
}

@keyframes logoFadeIn {
    0% {
        opacity: 0.3;
        transform: scale(0.9);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    100% {
        opacity: 0.3;
        transform: scale(0.9);
    }
}

@keyframes contentFadeIn {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hide content until preloader is done */
body:not(.loaded) .chat-container {
    opacity: 0;
    visibility: hidden;
}

body.loaded .chat-container {
    opacity: 1;
    visibility: visible;
    transition: opacity 1s ease-out, visibility 1s ease-out;
}

/* Preloader Spinner */
.preloader-spinner {
    margin-top: 20px;
    display: flex;
    justify-content: center;
}

.spinner {
    width: 24px;
    height: 24px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #2B6489;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Body background */
html {
    background: #ffffff;
}

body {
    background: #ffffff;
    opacity: 0;
    transition: opacity 1s ease-out;
}

body.loaded {
    opacity: 1;
}

/* Main Content Styles */
.main-content {
    min-height: 100vh;
    padding-top: 0;
    padding-bottom: 80px;
    color: #000;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-x: hidden;
    background: #ffffff;
}

/* Medium Article Styles */
.medium-article {
    max-width: 680px;
    margin: 0 auto;
    padding: 0 20px;
    background: #ffffff;
}

/* Hero Image Styles */
.hero-image-section {
    width: 100%;
    margin: 0 0 48px 0;
    text-align: center;
}

.hero-image {
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: 16px;
    border: 1px solid #e5e7eb;
}

/* Article Header Styles */
.article-header {
    margin-bottom: 40px;
}

.article-title {
    font-family: 'Inria Serif', Georgia, serif;
    font-size: 48px;
    font-weight: 700;
    line-height: 1.3;
    color: #1A1A1A;
    margin: 0 0 20px 0;
    padding-bottom: 48px;
    letter-spacing: -0.02em;
    text-align: left;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 16px;
}

.author-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.author-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.author-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.author-name {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 16px;
    font-weight: 500;
    color: #1A1A1A;
}

.publish-date {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 14px;
    color: #8e8c8c;
}

/* Article Content Styles */
.article-content {
    line-height: 1.6;
    text-align: left;
}

.article-content p,
.article-content li,
.article-content span:not(.author-name):not(.publish-date) {
    font-family: 'Inter', sans-serif !important;
    font-size: 16px;
    line-height: 1.7;
    font-style: normal !important;
}

.article-section {
    text-align: left;
    position: relative;
}

/* Разделители между темами */
.divider-1,
.divider-2,
.divider-3,
.divider-4,
.divider-5,
.divider-6,
.divider-7,
.divider-8,
.divider-9,
.divider-10,
.divider-11 {
    width: 100%;
    height: 1px;
    background: rgba(0, 0, 0, 0.05);
    margin: 48px 0;
}

.article-section h2 {
    font-family: 'Inria Serif', Georgia, serif;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.4;
    color: #1A1A1A;
    margin: 40px 0 20px 0;
    letter-spacing: -0.01em;
    text-align: left;
}

.article-section p {
    font-family: 'Source Serif Pro', Georgia, Cambria, "Times New Roman", Times, serif;
    font-size: 19px;
    line-height: 1.7;
    color: #1A1A1A;
    letter-spacing: -0.003em;
    margin: 0 0 24px 0;
    text-align: left;
}

.lead-paragraph {
    font-family: 'Source Serif Pro', Georgia, Cambria, "Times New Roman", Times, serif !important;
    font-size: 21px !important;
    font-weight: 400;
    line-height: 1.65 !important;
    color: #1A1A1A !important;
    letter-spacing: -0.003em !important;
    margin-bottom: 36px !important;
}

/* Image Gallery Styles */
.image-gallery {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin: 32px 0;
}

.image-item {
    margin: 0;
    display: flex;
    flex-direction: column;
}

.case-image {
    width: 100%;
    height: auto;
    border-radius: 16px;
    border: 1px solid #e5e7eb;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.case-image:hover {
    transform: scale(1.02);
}

/* Video Styles */
.video-wrapper {
    width: 100%;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
}

.case-video {
    width: 100%;
    height: auto;
    display: block;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.case-video:hover {
    transform: scale(1.02);
}

.image-caption {
    font-size: 12px !important;
    color: #666666 !important;
    font-style: italic !important;
    text-align: center !important;
    margin: 12px 0 0 0 !important;
    padding: 0 16px !important;
    font-weight: normal !important;
}

/* Results Table Styles */
.results-table-container {
    margin: 32px 0;
    overflow-x: auto;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.results-table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    font-family: 'Inter', sans-serif;
}

.results-table thead {
    background: #1a1a1a;
    color: #ffffff;
}

.results-table th {
    padding: 16px 20px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.results-table tbody tr {
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
}

.results-table tbody tr:hover {
    background-color: #f8f9fa;
}

.results-table tbody tr:last-child {
    border-bottom: none;
}

.results-table td {
    padding: 16px 20px;
    font-size: 14px;
    color: #333333;
    vertical-align: middle;
}

.results-table td:first-child {
    font-weight: 500;
    color: #1a1a1a;
}

.results-table td:nth-child(2),
.results-table td:nth-child(3) {
    font-weight: 600;
    color: #666666;
}

.results-table td:last-child {
    vertical-align: middle;
    text-align: left;
}

.results-table .positive {
    color: #4EA6A1;
    font-weight: 600;
    text-transform: capitalize;
}

/* Final CTA Section Styles */
.final-cta {
    text-align: left;
    margin: 24px 0 0 0;
}

/* CTA Button Styles (matching 3Commas) */
.cta-button--black {
    display: inline-flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    padding: 13px 24px;
    gap: 16px;
    width: fit-content;
    min-width: fit-content;
    height: 47px;
    background: #262626f5;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.cta-button--black:hover {
    background: #1a1a1af5;
    transform: translateY(-2px);
}

.cta-button--black .button-text {
    width: auto;
    height: 21px;
    display: flex;
    align-items: center;
    text-align: center;
    font-family: 'Inter', sans-serif;
    font-style: normal;
    font-weight: 700;
    letter-spacing: 0.015em;
    font-size: 16px;
    line-height: 1.3;
    color: #ffffff;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    position: relative;
    margin: auto;
    padding: 0;
    width: 90%;
    max-width: 800px;
    top: 50%;
    transform: translateY(-50%);
}

.modal-content img {
    width: 100%;
    height: auto;
    border-radius: 12px;
}

.modal-image {
    width: 100%;
    height: auto;
    border-radius: 12px;
}

.close {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
}

.close:hover {
    opacity: 0.7;
}

/* Mobile Responsive */
@media (max-width: 767px) {
    .article-title {
        font-size: 32px;
        line-height: 1.2;
    }
    
    .article-section h2 {
        font-size: 24px;
    }
    
    .article-section p {
        font-size: 16px;
    }
    
    .lead-paragraph {
        font-size: 18px !important;
    }
    
    .image-gallery {
        gap: 12px;
        margin: 24px 0;
    }
    
    .results-table-container {
        margin: 24px 0;
        border-radius: 8px;
    }
    
    .results-table th,
    .results-table td {
        padding: 12px 16px;
        font-size: 13px;
    }
    
    .results-table th {
        font-size: 12px;
    }
    
    .image-caption {
        font-size: 11px !important;
        padding: 0 8px !important;
    }
}

/* Desktop: Single column for image gallery */
@media (min-width: 768px) {
    .image-gallery {
        display: flex;
        flex-direction: column;
        gap: 32px;
        margin: 40px 0;
    }
    
    .image-item {
        margin: 0;
        display: flex;
        flex-direction: column;
    }
}