/* static/css/style.css */
@charset "UTF-8";

:root {
    --python-dark-blue: #306998;
    --python-light-blue: #4B8BBE;
    --python-yellow: #FFD43B;
    --python-dark-yellow: #646464;
    --text-color: #333;
    --bg-color: #fdfdfd;
    --light-bg: #f2f2f2;
    --border-color: #e6e6e6;
    --link-color: #4B8BBE;
    --link-hover: #306998;
}

/* Базовые стили */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
    color: var(--text-color);
    background-color: var(--bg-color);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

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

/* Навигация */
.navbar {
    background-color: var(--python-dark-blue);
    padding: 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    width: 100%;
}


.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: white;
}

.menu {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
}

.menu li {
    margin-left: 25px;
    position: relative;
}

.menu a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    padding: 10px 0;
    display: block;
    position: relative;
}

.menu a:after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--python-yellow);
    transition: width 0.3s ease;
}

.menu a:hover:after {
    width: 100%;
}

.menu a:hover {
    color: var(--python-yellow);
}

/* Герой-секция */
.hero {
    background: linear-gradient(135deg, var(--python-dark-blue) 0%, var(--python-light-blue) 100%);
    color: white;
    padding: 40px 0;
}

.hero-container {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
    gap: 40px;
    min-height: 350px;
}

.hero-content {
    flex: 1;
    max-width: 50%;
    display: flex;
    flex-direction: column;
}

.hero-content h1 {
    font-size: 2.5rem;
    margin-bottom: 25px;
    font-weight: 300;
    color: white;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 15px;
    opacity: 0.9;
    color: white;
}

.hero-content p strong {
    color: var(--python-yellow);
}


.hero-code pre {
    margin: 0;
    line-height: 1.5;
    text-align: left;
}

.hero-code code {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 14px;
    color: #11a611;
    white-space: pre;
    overflow-x: auto;
    display: block;
    padding: 0;
    margin: 0;
    text-align: left;
    line-height: 1.5;
    transition: all 0.3s ease; /* Плавное изменение */
}


.hero-code {
    flex: 0 0 45%;
    background: #2b2b2b;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    min-height: 350px; /* Минимальная высота */
    display: flex;
    flex-direction: column;
    transition: height 0.3s ease; /* Плавное изменение высоты */
}

.code-container {
    padding: 25px 20px;
    overflow-x: auto;
    overflow-y: auto;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}




.hero-code ::-webkit-scrollbar {
    display: none;
}

.hero-code {
    -ms-overflow-style: none;
    scrollbar-width: none;
}





/* Навигация */
.hero-slider {
    margin: 20px 0;
    width: 100%;
}

.flex-control-nav {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0 0 25px 0;
    border-bottom: 2px solid rgba(255,255,255,0.2);
    justify-content: space-between;
    width: 100%;
}

.flex-control-nav li {
    flex: 1;
    text-align: center;
}

.flex-control-nav a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    padding: 12px 0;
    display: block;
    position: relative;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.3s ease;
    width: 100%;
}

.flex-control-nav a:hover,
.flex-control-nav a.active {
    color: var(--python-yellow);
}

.flex-control-nav a.active:after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--python-yellow);
}

.flex-slides .slide {
    display: none;
}

.flex-slides .slide.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

/* Текст с ссылкой */
.hero-conclusion {
    margin: 25px 0;
    font-size: 1.1rem;
    font-weight: 500;
    color: white;
}

.hero-conclusion strong {
    color: var(--python-yellow);
}

.hero-conclusion a {
    color: var(--python-yellow);
    text-decoration: none;
    font-weight: 600;
}

.hero-conclusion a:hover {
    text-decoration: underline;
}

.hero-buttons {
    display: none;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Секции с карточками */
.sections {
    padding: 60px 20px;
    background-color: var(--bg-color);
    text-align: center;
}

.sections h2 {
    font-size: 2rem;
    color: var(--python-dark-blue);
    position: relative;
    padding-bottom: 15px;
    margin-bottom: 40px;
}

.sections h2:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--python-yellow);
}

.service-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.card {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.card h3 {
    color: var(--python-dark-blue);
    margin-top: 0;
    font-size: 1.5rem;
}

/* Общие стили для страниц */
.blog, .features, .examples, .plans, .contact, .disclaimer {
    padding: 60px 20px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.blog h1, .features h1, .examples h1, .plans h1, .contact h2, .disclaimer h1 {
    font-size: 2.2rem;
    color: var(--python-dark-blue);
    text-align: center;
    margin-bottom: 40px;
    position: relative;
    padding-bottom: 15px;
}

.blog h1:after, .features h1:after, .examples h1:after, .plans h1:after, .contact h2:after, .disclaimer h1:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--python-yellow);
}

/* Блог */
.blog article {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    margin-bottom: 30px;
    transition: transform 0.3s ease;
}

.blog article:hover {
    transform: translateY(-3px);
}

.blog article h2 {
    color: var(--python-dark-blue);
    margin-top: 0;
}

.blog article a {
    color: var(--python-light-blue);
    text-decoration: none;
    font-weight: 500;
}

.blog article a:hover {
    color: var(--python-dark-blue);
    text-decoration: underline;
}

/* Функции */
.feature {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    margin-bottom: 30px;
    transition: transform 0.3s ease;
}

.feature:hover {
    transform: translateY(-3px);
}

.feature h2 {
    color: var(--python-dark-blue);
    margin-top: 0;
}

/* Примеры */
.example {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    margin-bottom: 30px;
    transition: transform 0.3s ease;
    text-align: center;
}

.example:hover {
    transform: translateY(-3px);
}

.example img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin-bottom: 20px;
}

.example h2 {
    color: var(--python-dark-blue);
    margin-top: 0;
}

/* Планы */
.plan-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.plan-card {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
    text-align: center;
    position: relative;
    border-top: 4px solid var(--python-light-blue);
}

.plan-card:hover {
    transform: translateY(-5px);
}

.plan-card h2 {
    color: var(--python-dark-blue);
    margin-top: 0;
}

.plan-card .price {
    font-size: 1.5rem;
    color: var(--python-light-blue);
    font-weight: 700;
    margin: 20px 0;
}

/* Форма контактов */
#contact-form {
    max-width: 600px;
    margin: 0 auto;
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

#contact-form input,
#contact-form textarea {
    width: 100%;
    padding: 12px 15px;
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: 'Roboto', sans-serif;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

#contact-form input:focus,
#contact-form textarea:focus {
    outline: none;
    border-color: var(--python-light-blue);
    box-shadow: 0 0 0 3px rgba(75, 139, 190, 0.1);
}

#contact-form button {
    background-color: var(--python-dark-blue);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.3s ease;
    width: 100%;
}

#contact-form button:hover {
    background-color: var(--python-light-blue);
}

/* Дисклеймер */
.disclaimer {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

/* Уведомления */
.alert-container {
    max-width: 600px;
    margin: 20px auto;
}

.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
    border-left: 4px solid;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border-left-color: #155724;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border-left-color: #721c24;
}

/* Футер */
.footer-content {
    margin-top: auto;
    text-align: center;
    padding: 30px 20px;
    background-color: var(--python-dark-blue);
    color: white;
}

.footer-content a {
    color: var(--python-yellow);
    text-decoration: none;
}

.footer-content a:hover {
    text-decoration: underline;
}

/* Адаптивность */
@media (max-width: 968px) {
    .hero-container {
        flex-direction: column;
        gap: 30px;
    }
    
    .hero-content,
    .hero-code {
        max-width: 100%;
    }
    
    .hero-code {
        flex: 1;
    }
    
    .flex-control-nav {
        flex-wrap: wrap;
    }
    
    .flex-control-nav li {
        flex: 0 0 50%;
        margin-bottom: 10px;
    }
}

@media (max-width: 768px) {
    /* Убраны конфликтующие стили навигации */
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .service-cards,
    .plan-cards {
        grid-template-columns: 1fr;
    }
    
    .hero-code code {
        font-size: 12px;
    }
    
    .flex-control-nav li {
        flex: 0 0 100%;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 30px 15px;
    }
    
    .sections,
    .blog,
    .features,
    .examples,
    .plans,
    .contact,
    .disclaimer {
        padding: 40px 15px;
    }
    
    .card,
    .blog article,
    .feature,
    .example,
    .plan-card,
    #contact-form {
        padding: 20px;
    }
}

/* For examples  */

.example-card {
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 25px;
    margin: 25px 0;
    background: white;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.example-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.1);
}

.example-image {
    width: 100%;
    max-width: 800px;
    height: 500px;
    object-fit: contain;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #f0f0f0;
}

.feature-list {
    margin: 15px 0;
    padding-left: 0;
}

.feature-list li {
    margin-bottom: 8px;
    list-style-type: none;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #0088cc;
}

.telegram-link {
    color: #0088cc;
    text-decoration: none;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(0, 136, 204, 0.1);
}

.telegram-link:hover {
    background: rgba(0, 136, 204, 0.2);
    text-decoration: none;
}

/* Стили для страницы логина */
.login-container {
    max-width: 400px;
    margin: 60px auto;
    padding: 30px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.login-container h2 {
    color: var(--python-dark-blue);
    text-align: center;
    margin-bottom: 30px;
    position: relative;
    padding-bottom: 15px;
}

.login-container h2:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--python-yellow);
}

.login-form {
    width: 100%;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--python-dark-blue);
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: 'Roboto', sans-serif;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--python-light-blue);
    box-shadow: 0 0 0 3px rgba(75, 139, 190, 0.1);
}

.login-btn {
    width: 100%;
    background-color: var(--python-dark-blue);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    font-size: 1rem;
    transition: background-color 0.3s ease;
}

.login-btn:hover {
    background-color: var(--python-light-blue);
}

/* Сообщения об ошибках */
.flash-messages {
    margin-bottom: 20px;
}

.flash-error {
    background-color: #f8d7da;
    color: #721c24;
    padding: 10px 15px;
    border-radius: 4px;
    border-left: 4px solid #721c24;
    margin-bottom: 15px;
}

/* Адаптивность для страницы логина */
@media (max-width: 480px) {
    .login-container {
        margin: 40px 15px;
        padding: 20px;
    }
}


/* Стили для flash-сообщений */

.flash-success {
    background-color: #d4edda;
    color: #155724;
    padding: 10px 15px;
    border-radius: 4px;
    border-left: 4px solid #155724;
    margin-bottom: 15px;
}

.flash-warning {
    background-color: #fff3cd;
    color: #856404;
    padding: 10px 15px;
    border-radius: 4px;
    border-left: 4px solid #856404;
    margin-bottom: 15px;
}

.flash-info {
    background-color: #d1ecf1;
    color: #0c5460;
    padding: 10px 15px;
    border-radius: 4px;
    border-left: 4px solid #0c5460;
    margin-bottom: 15px;
}


/* Стили для статей блога */
.article-content pre {
    background: #2b2b2b;
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 20px 0;
}

.article-content code {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 14px;
    color: #f8f8f2;
}



/* Кнопка скачивания файла */
.file-download {
    display: inline-block;
    padding: 12px 20px;
    background-color: var(--python-light-blue);
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s ease;
    margin-top: 15px;
}

.file-download:hover {
    background-color: var(--python-dark-blue);
    text-decoration: none;
}

/* Адаптивность для статей */
@media (max-width: 768px) {
    .article-content pre {
        padding: 15px;
        font-size: 12px;
    }
}

/* Стили для подсветки кода из Pygments (monokai) */
.codehilite pre { line-height: 125%; }
.codehilite td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
.codehilite span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
.codehilite td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
.codehilite span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
.codehilite .hll { background-color: #49483e }
.codehilite { background: #272822; color: #f8f8f2; padding: 10px; border-radius: 4px; overflow-x: auto; }
.codehilite .c { color: #959077 } /* Comment */
.codehilite .err { color: #ed007e; background-color: #1e0010 } /* Error */
.codehilite .esc { color: #f8f8f2 } /* Escape */
.codehilite .g { color: #f8f8f2 } /* Generic */
.codehilite .k { color: #66d9ef } /* Keyword */
.codehilite .l { color: #ae81ff } /* Literal */
.codehilite .n { color: #f8f8f2 } /* Name */
.codehilite .o { color: #ff4689 } /* Operator */
.codehilite .x { color: #f8f8f2 } /* Other */
.codehilite .p { color: #f8f8f2 } /* Punctuation */
.codehilite .ch { color: #959077 } /* Comment.Hashbang */
.codehilite .cm { color: #959077 } /* Comment.Multiline */
.codehilite .cp { color: #959077 } /* Comment.Preproc */
.codehilite .cpf { color: #959077 } /* Comment.PreprocFile */
.codehilite .c1 { color: #959077 } /* Comment.Single */
.codehilite .cs { color: #959077 } /* Comment.Special */
.codehilite .gd { color: #ff4689 } /* Generic.Deleted */
.codehilite .ge { color: #f8f8f2; font-style: italic } /* Generic.Emph */
.codehilite .ges { color: #f8f8f2; font-weight: bold; font-style: italic } /* Generic.EmphStrong */
.codehilite .gr { color: #f8f8f2 } /* Generic.Error */
.codehilite .gh { color: #f8f8f2 } /* Generic.Heading */
.codehilite .gi { color: #a6e22e } /* Generic.Inserted */
.codehilite .go { color: #66d9ef } /* Generic.Output */
.codehilite .gp { color: #ff4689; font-weight: bold } /* Generic.Prompt */
.codehilite .gs { color: #f8f8f2; font-weight: bold } /* Generic.Strong */
.codehilite .gu { color: #959077 } /* Generic.Subheading */
.codehilite .gt { color: #f8f8f2 } /* Generic.Traceback */
.codehilite .kc { color: #66d9ef } /* Keyword.Constant */
.codehilite .kd { color: #66d9ef } /* Keyword.Declaration */
.codehilite .kn { color: #ff4689 } /* Keyword.Namespace */
.codehilite .kp { color: #66d9ef } /* Keyword.Pseudo */
.codehilite .kr { color: #66d9ef } /* Keyword.Reserved */
.codehilite .kt { color: #66d9ef } /* Keyword.Type */
.codehilite .ld { color: #e6db74 } /* Literal.Date */
.codehilite .m { color: #ae81ff } /* Literal.Number */
.codehilite .s { color: #e6db74 } /* Literal.String */
.codehilite .na { color: #a6e22e } /* Name.Attribute */
.codehilite .nb { color: #f8f8f2 } /* Name.Builtin */
.codehilite .nc { color: #a6e22e } /* Name.Class */
.codehilite .no { color: #66d9ef } /* Name.Constant */
.codehilite .nd { color: #a6e22e } /* Name.Decorator */
.codehilite .ni { color: #f8f8f2 } /* Name.Entity */
.codehilite .ne { color: #a6e22e } /* Name.Exception */
.codehilite .nf { color: #a6e22e } /* Name.Function */
.codehilite .nl { color: #f8f8f2 } /* Name.Label */
.codehilite .nn { color: #f8f8f2 } /* Name.Namespace */
.codehilite .nx { color: #a6e22e } /* Name.Other */
.codehilite .py { color: #f8f8f2 } /* Name.Property */
.codehilite .nt { color: #ff4689 } /* Name.Tag */
.codehilite .nv { color: #f8f8f2 } /* Name.Variable */
.codehilite .ow { color: #ff4689 } /* Operator.Word */
.codehilite .pm { color: #f8f8f2 } /* Punctuation.Marker */
.codehilite .w { color: #f8f8f2 } /* Text.Whitespace */
.codehilite .mb { color: #ae81ff } /* Literal.Number.Bin */
.codehilite .mf { color: #ae81ff } /* Literal.Number.Float */
.codehilite .mh { color: #ae81ff } /* Literal.Number.Hex */
.codehilite .mi { color: #ae81ff } /* Literal.Number.Integer */
.codehilite .mo { color: #ae81ff } /* Literal.Number.Oct */
.codehilite .sa { color: #e6db74 } /* Literal.String.Affix */
.codehilite .sb { color: #e6db74 } /* Literal.String.Backtick */
.codehilite .sc { color: #e6db74 } /* Literal.String.Char */
.codehilite .dl { color: #e6db74 } /* Literal.String.Delimiter */
.codehilite .sd { color: #e6db74 } /* Literal.String.Doc */
.codehilite .s2 { color: #e6db74 } /* Literal.String.Double */
.codehilite .se { color: #ae81ff } /* Literal.String.Escape */
.codehilite .sh { color: #e6db74 } /* Literal.String.Heredoc */
.codehilite .si { color: #e6db74 } /* Literal.String.Interpol */
.codehilite .sx { color: #e6db74 } /* Literal.String.Other */
.codehilite .sr { color: #e6db74 } /* Literal.String.Regex */
.codehilite .s1 { color: #e6db74 } /* Literal.String.Single */
.codehilite .ss { color: #e6db74 } /* Literal.String.Symbol */
.codehilite .bp { color: #f8f8f2 } /* Name.Builtin.Pseudo */
.codehilite .fm { color: #a6e22e } /* Name.Function.Magic */
.codehilite .vc { color: #f8f8f2 } /* Name.Variable.Class */
.codehilite .vg { color: #f8f8f2 } /* Name.Variable.Global */
.codehilite .vi { color: #f8f8f2 } /* Name.Variable.Instance */
.codehilite .vm { color: #f8f8f2 } /* Name.Variable.Magic */
.codehilite .il { color: #ae81ff } /* Literal.Number.Integer.Long */

/* Стиль для изображения статьи */
.article-image {
    max-width: 100%;
    height: auto;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* Исправление для hero-code на мобильных устройствах */
@media (max-width: 768px) {
    .hero-code {
        min-height: 250px; /* Уменьшаем высоту для мобильных */
        max-height: 300px; /* Ограничиваем максимальную высоту */
    }
    
    .hero-code code {
        font-size: 11px; /* Уменьшаем размер шрифта */
        line-height: 1.4; /* Уменьшаем межстрочный интервал */
    }
    
    .code-container {
        padding: 15px;
        overflow: auto; /* Включаем скролл при необходимости */
    }
    
    /* Включаем скроллбар для мобильных */
    .hero-code ::-webkit-scrollbar {
        display: block;
        width: 4px;
        height: 4px;
    }
    
    .hero-code ::-webkit-scrollbar-thumb {
        background: rgba(255,255,255,0.3);
        border-radius: 2px;
    }
}

/* Дополнительные исправления для очень маленьких экранов */
@media (max-width: 480px) {
    .hero-code {
        min-height: 200px;
        max-height: 250px;
    }
    
    .hero-code code {
        font-size: 10px;
    }
    
    .code-container {
        padding: 12px;
    }
}

/* Гарантируем, что код будет виден */
.hero-code pre {
    margin: 0;
    padding: 0;
    background: transparent !important;
}

.hero-code .codehilite {
    background: #2b2b2b !important;
    margin: 0 !important;
    padding: 15px !important;
}

/* Улучшаем читаемость кода на всех устройствах */
.python .keyword { color: #f92672 !important; }
.python .string { color: #a6e22e !important; }
.python .function { color: #66d9ef !important; }
.python .comment { color: #75715e !important; }
.python .number { color: #ae81ff !important; }
.python .class { color: #a6e22e !important; }
.python .builtin { color: #66d9ef !important; }




/* Мобильное меню - ОДИН РАЗ в конце файла */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 40px; /* Увеличено */
    height: 35px; /* Увеличено */
    cursor: pointer;
    padding: 5px;
    order: 2; /* Перемещаем вправо */
    margin-left: auto; /* Выравниваем вправо */
}

.mobile-menu-toggle span {
    width: 100%;
    height: 4px; /* Увеличено */
    background-color: white;
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* Анимация гамбургера */
.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(8px, -8px);
}

@media (max-width: 768px) {
    .nav-container {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 10px 20px;
        position: relative;
    }
    
    .mobile-menu-toggle {
        display: flex;
        order: 2; /* Перемещаем вправо */
        margin-left: auto; /* Выравниваем вправо */
    }
    
    .menu {
        display: none;
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 100%; /* Позиционируем под навигацией */
        left: 0;
        background-color: var(--python-dark-blue);
        padding: 20px;
        box-shadow: 0 5px 15px rgba(0,0,0,0.1);
        z-index: 1000;
    }
    
    .menu.active {
        display: flex;
    }
    
    .menu li {
        margin: 0;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        width: 100%;
    }
    
    .menu li:last-child {
        border-bottom: none;
    }
    
    .menu a {
        padding: 15px 0;
        display: block;
        width: 100%;
        text-align: center;
    }
    
    /* Убираем старые конфликтующие стили */
    .nav-container {
        flex-direction: row !important; /* Отменяем column */
    }
    
    .menu {
        margin-top: 0 !important; /* Убираем отступ */
        flex-direction: column !important;
    }
}

/* Для очень маленьких экранов */
@media (max-width: 480px) {
    .mobile-menu-toggle {
        width: 35px;
        height: 30px;
    }
    
    .mobile-menu-toggle span {
        height: 3px;
    }
    
    .menu {
        padding: 15px;
    }
    
    .nav-container {
        padding: 10px 15px;
    }
    
    .mobile-menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(6px, 6px);
    }
    
    .mobile-menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -6px);
    }
}

.language-switcher {
    display: flex;
    gap: 10px;
    margin-left: auto;
    padding: 0 15px;
}

.language-switcher a {
    text-decoration: none;
    color: #333;
    font-weight: bold;
    padding: 5px 10px;
    border: 1px solid #ddd;
    border-radius: 3px;
}

.language-switcher a:hover {
    background-color: #f5f5f5;
}

/* Стили для TradingView контейнера */
.tradingview-container {
    position: relative;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    height: 400px;
    margin-bottom: 20px;
    background: #fff;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.tradingview-iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.tradingview-logo {
    background-color: #1e222d;
    border-bottom-left-radius: 8px;
    z-index: 10;
    width: 32px;
    height: 32px;
}

/* Адаптивность для TradingView */
@media (max-width: 768px) {
    .tradingview-container {
        height: 300px;
        border-radius: 8px;
    }
}

@media (max-width: 480px) {
    .tradingview-container {
        height: 250px;
    }
    
    .tradingview-logo {
        width: 24px;
        height: 24px;
    }
}