/* Общие стили */
body {
    font-family: "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f8f9fa;
    color: #333;
    font-size: 14px;
    line-height: 1.5;
}

/* Основная рабочая область */
.workarea {
    min-height: 100vh;
    padding: 0;
    background-color: #fff;
    display: flex;
    flex-direction: column;
    padding-top: 90px;
}

/* Обновленная шапка сайта */
.header {
    background-color: #fff;
    color: #333;
    padding: 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
    transition: transform 0.3s ease;
}

/* Скрываем хедер при скролле вниз */
.header.hidden {
    transform: translateY(-100%);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 8px 15px;
    border-bottom: 1px solid #eef2f4;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.logo img {
    height: 32px;
    width: auto;
}

.logo-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.portal-info {
    font-size: 13px;
    color: #525c69;
}

/* Обновляем основную секцию для правильного отступа от футера */
.main-section {
    padding: 20px 15px 40px;
    flex: 1;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    min-height: auto;
}

/* Заголовок страницы в стиле Битрикс24 */
.pagetitle-wrap {
    margin: 0 0 20px;
    border-bottom: 1px solid #eef2f4;
}

.pagetitle {
    font-size: 24px;
    margin: 0;
    padding: 21px 0 21px 5px;
    display: flex;
    align-items: center;
}

.pagetitle-item {
    color: #333;
    font-weight: 500;
}

/* Табы категорий */
.category-tabs {
    display: flex;
    border-bottom: 1px solid #eef2f4;
    margin-bottom: 20px;
    overflow-x: auto;
    scrollbar-width: thin;
}

.category-tab {
    padding: 12px 20px;
    cursor: pointer;
    font-weight: 500;
    color: #525c69;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
}

.category-tab i {
    font-size: 16px;
}

.category-tab:hover {
    color: #2067b0;
    background-color: #f5f7f8;
}

.category-tab.active {
    color: #2067b0;
    border-bottom: 2px solid #2067b0;
}

/* Секции категорий */
.category-section {
    display: none;
    animation: fadeIn 0.3s ease;
}

.category-section.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.category-header {
    margin-bottom: 20px;
}

.category-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 5px;
    color: #333;
}

.category-description {
    color: #525c69;
    margin-top: 0;
    font-size: 14px;
}

/* Сетка карточек роботов */
.robot-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

/* Карточка робота */
.robot-card {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    padding: 20px;
    transition: all 0.2s ease;
    position: relative;
    border: 1px solid #edeef0;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.robot-card:hover {
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

/* Заголовок робота */
.robot-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.robot-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Всплывающие подсказки */
.tooltip {
    position: relative;
    display: inline-block;
    margin-left: 5px;
    cursor: pointer;
    color: #6a737d;
}

.tooltip i {
    font-size: 16px;
}

.tooltip-text {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #333;
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    width: 200px;
    z-index: 10;
    font-size: 12px;
    font-weight: normal;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.tooltip-text::after {
    content: "";
    position: absolute;
    bottom: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: transparent transparent #333 transparent;
}

/* Описание робота */
.robot-description {
    color: #525c69;
    margin-bottom: 20px;
    font-size: 14px;
    line-height: 1.5;
    flex: 1;
}

/* Статус установки */
.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.installed {
    background-color: #d7f4d3;
    color: #589f50;
}

.not-installed {
    background-color: #f5e9e9;
    color: #a83b3b;
}

/* Действия робота */
.robot-actions {
    margin-top: auto;
}

/* Кнопки в стиле Битрикс24 */
.ui-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 19px;
    border: none;
    border-radius: 4px;
    height: 39px;
    font-family: "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    line-height: 39px;
    text-align: center;
    cursor: pointer;
    transition: background 0.2s linear, color 0.2s linear;
    outline: none;
    text-decoration: none;
    width: 100%;
}

.ui-btn i {
    font-size: 14px;
}

.ui-btn-success {
    background-color: #bbed21;
    color: #535c69;
}

.ui-btn-success:hover {
    background-color: #d2f95f;
}

.ui-btn-danger {
    background-color: #ff5752;
    color: #fff;
}

.ui-btn-danger:hover {
    background-color: #ff1a13;
}

/* Сообщения */
.ui-alert {
    position: relative;
    margin-bottom: 16px;
    padding: 14px 20px;
    border-radius: 4px;
    font-size: 13px;
    line-height: 16px;
    background-color: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,.12);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from { transform: translateY(-20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.ui-alert-success {
    background-color: #e6f8de;
    border-left: 3px solid #9dcf00;
}

.ui-alert-error {
    background-color: #fae5e5;
    border-left: 3px solid #ff5752;
}

.ui-alert-message {
    color: #525c69;
    font-weight: 500;
}

.ui-alert-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #525c69;
}

/* FAQ секция */
.faq-section {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #eef2f4;
}

.section-title {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #333;
}

.faq-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.faq-item {
    border: 1px solid #edeef0;
    border-radius: 8px;
    overflow: hidden;
    background-color: white;
    box-shadow: 0 1px 5px rgba(0,0,0,0.05);
}

.faq-question {
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    background-color: #f9f9f9;
    transition: background-color 0.2s ease;
}

.faq-question:hover {
    background-color: #f5f5f5;
}

.faq-question h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.faq-toggle {
    transition: transform 0.3s ease;
}

.faq-item.active .faq-toggle {
    transform: rotate(180deg);
}

.faq-answer {
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item.active .faq-answer {
    padding: 15px 20px;
    max-height: 500px;
}

.faq-answer p {
    margin-top: 0;
    color: #525c69;
}

.faq-answer ol, .faq-answer ul {
    margin-top: 10px;
    padding-left: 20px;
}

.faq-answer li {
    margin-bottom: 5px;
}

/* Обновляем стили футера */
.footer {
    margin-top: auto;
    padding: 20px 0;
    background-color: #f0f2f5;
    color: #333;
    position: relative;
    width: 100%;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    flex-wrap: wrap;
    gap: 30px;
}

.footer-logo img {
    max-height: 40px;
    width: auto;
}

.footer-info {
    font-size: 13px;
}

.footer-info p {
    margin: 5px 0;
}

.footer-contacts {
    font-size: 13px;
}

.footer-contacts h4 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 16px;
    font-weight: 600;
}

.footer-contacts p {
    margin: 8px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-contacts a {
    color: #e6b800;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-contacts a:hover {
    color: #b38f00;
    text-decoration: underline;
}

/* Обновляем медиа-запросы для адаптивности */
@media (max-width: 768px) {
    .robot-cards {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-logo {
        margin-right: 0;
        margin-bottom: 15px;
    }
    
    .category-tab {
        padding: 10px 15px;
        font-size: 13px;
    }
    
    .footer-contacts p {
        justify-content: center;
    }
    
    .header-content {
        padding: 10px 15px;
    }
    
    .logo-title {
        font-size: 18px;
    }
    
    .portal-info {
        font-size: 13px;
    }
    
    .main-section {
        padding: 15px 15px 30px;
    }
}

/* Темная тема (опционально) */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #1e1e1e;
        color: #e0e0e0;
    }
    
    .workarea {
        background-color: #2d2d2d;
    }
    
    .robot-card, .faq-item {
        background-color: #333;
        border-color: #444;
    }
    
    .robot-title, .category-title, .pagetitle-item, .section-title, .faq-question h3 {
        color: #e0e0e0;
    }
    
    .robot-description, .category-description, .faq-answer p {
        color: #b0b0b0;
    }
    
    .category-tab {
        color: #b0b0b0;
    }
    
    .category-tab.active {
        color: #bbed21;
        border-bottom-color: #bbed21;
    }
    
    .faq-question {
        background-color: #3a3a3a;
    }
    
    .faq-question:hover {
        background-color: #444;
    }
    
    .ui-alert {
        background-color: #333;
    }
    
    .ui-alert-message {
        color: #e0e0e0;
    }
    
    .header {
        background-color: #2d2d2d;
        color: #e0e0e0;
    }
    
    .footer {
        background-color: #2d2d2d;
        color: #e0e0e0;
    }
    
    .footer-contacts a {
        color: #ffcc00;
    }
    
    .footer-contacts a:hover {
        color: #ffdd33;
    }
}

/* Навигация */
.main-nav {
    background-color: #fff;
    padding: 0 15px;
}

.main-nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    max-width: 1200px;
    margin: 0 auto;
    height: 40px;
}

.main-nav li {
    margin-right: 20px;
}

.main-nav a {
    display: flex;
    align-items: center;
    height: 40px;
    padding: 0 10px;
    color: #525c69;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
}

.main-nav a:hover {
    color: #2067b0;
}

.main-nav a.active {
    color: #2067b0;
    border-bottom: 2px solid #2067b0;
}

/* Адаптивность для навигации */
@media (max-width: 768px) {
    .main-nav ul {
        justify-content: center;
    }
    
    .main-nav li {
        margin: 0 10px;
    }
}

/* Темная тема для навигации */
@media (prefers-color-scheme: dark) {
    .main-nav {
        background-color: #2d2d2d;
        border-bottom-color: #444;
    }
    
    .main-nav a {
        color: #b0b0b0;
    }
    
    .main-nav a:hover, .main-nav a.active {
        color: #bbed21;
    }
    
    .main-nav a.active {
        border-bottom-color: #bbed21;
    }
    
    .logo-title {
        color: #e0e0e0;
    }
} 