/* ===================================
   БАЗОВЫЕ СТИЛИ И СБРОС
   =================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #333;
    background: #fff;
    line-height: 1.5;
}

img {
    max-width: 100%;
    height: auto;
}

a {
    text-decoration: none;
    color: inherit;
}

.btn-primary {
    display: inline-block;
    background: #e74c3c;
    color: #fff;
    padding: 1vh 2vw;
    border-radius: 4px;
    font-weight: 500;
    transition: background 0.3s, transform 0.2s;
    border: none;
    cursor: pointer;
    background-color: #d32f2f;
    line-height: 1.5;
    color: white;
}
.btn-primary:hover {
    background: #c0392b;
    transform: translateY(-2px);
}
.btn-secondary {
    display: inline-block;
    color: #fff;
    padding: 1vh 2vw;
    border-radius: 4px;
    font-weight: bold;
    border: 2px solid #fff;
    transition: background 0.3s, color 0.3s;
    font-weight: 500;
    line-height: 1.5;
}
.btn-secondary:hover {
    background: #e74c3c;
    color: #fff;
}
.auth-btn.register {
  background-color: #d32f2f;
  color: white;
}


/* ===================================
   ШАПКА
   =================================== */
.header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo a {
    display: flex;
    flex-direction: column;
}
.logo h1 {
    font-size: 1.8rem;
    color: #e74c3c;
}
.logo span {
    font-size: 0.8rem;
    color: #888;
}
.header-contacts .phone {
  text-decoration: none;
  color: #333;
  font-weight: 600;
  font-size: 18px;
}
.auth-icons {
    display: flex;
    gap: 10px;
}
.auth-btn {
    background: #f5f5f5;
    padding: 10px 20px;
    border-radius: 8px;
    color: #333;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: background 0.3s;
}
.auth-btn:hover {
    background: #e74c3c;
    color: #fff;
}
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: #333;
}
.navbar {
    padding: 10px 2vw;
    border-top: 1px solid #eee;
    line-height: 1;
    background-color: #2c3e50;
}
.navbar ul {
    display: grid;
    grid-gap: 1vh 1vw;
    list-style: none;
    grid-template-columns: 0.8fr 1.2fr 1fr 1fr 1fr;
}
.navbar a {
    padding: 10px 15px;
    border-radius: 6px;
    font-size: 0.8vw;
    color: #fff;
    transition: background 0.3s;
    display: flex;
    align-items: center;
    gap: 5px;
}
.navbar a:hover {
    background: #ffe6e6;
    color: #e74c3c;
}

/* ===================================
   HERO
   =================================== */
.hero {
  padding: 80px 0;
  background: linear-gradient(135deg, #2c3e50 0%, #4a6491 100%);
  color: white;
}
.hero-content {
    flex: 1;
}
.hero h2 {
  font-size: 42px;
  margin-bottom: 20px;
  line-height: 1.2;
  text-align: left;
}
.hero p {
    font-size: 1.2rem;
    color: #fff;
    margin-bottom: 30px;
    text-align: left;
}
.hero-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}




/* ===================================
   СЛАЙДЕР РАБОТ
   =================================== */
.showcase {
    padding: 60px 0;
    background: #fff;
}
.section-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 10px;
}
.section-subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 40px;
}
.slider-container {
    position: relative;
    overflow: hidden;
    max-width: 1000px;
    margin: 0 auto;
}
.slider {
    display: flex;
    transition: transform 0.5s ease;
}
.slide {
    flex: 0 0 100%;
}
.slide-content {
    display: flex;
    align-items: center;
    gap: 30px;
    padding: 30px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}
.site-preview {
    flex: 0 0 60%;
    position: relative;
}
.desktop-preview {
    width: 100%;
    border-radius: 12px;
}
.mobile-preview {
    position: absolute;
    bottom: -20px;
    right: -20px;
    width: 30%;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}
.slide-content h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}
.slide-content p {
    color: #666;
    margin-bottom: 15px;
}
.slide-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.tag {
    background: #f0f0f0;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
}
.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: #fff;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
}
.prev { left: 10px; }
.next { right: 10px; }
.slider-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}
.dot {
    width: 10px;
    height: 10px;
    background: #ddd;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.3s;
}
.dot.active {
    background: #e74c3c;
}

/* ===================================
   ФУНКЦИОНАЛ КОМПАНИИ (карточки)
   =================================== */
.work {
    padding: 60px 0;
    background: #fafafa;
}
.work h2 {
    text-align: center;
    margin-bottom: 40px;
    font-size: 2rem;
}

.work-body a {
    flex: 1 1 30%;
    min-width: 250px;
    background: #fff;
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s, box-shadow 0.3s;
    color: #333;
}
.work-body a:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 25px rgba(0,0,0,0.08);
}
.work-body h3 {
    margin-bottom: 15px;
    font-size: 1.2rem;
}
.work-body img {
    max-height: 80px;
}

/* ===================================
   КОНТАКТЫ
   =================================== */
.contact {
    padding: 60px 0;
}
.contact-content {
    display: grid;
    grid-gap: 1vh 2vw;
    grid-template-columns: 1fr 1fr;
}
.contact-info, .contact-form {
    flex: 1;
    min-width: 300px;
}
.contact-info p {
    margin: 15px 0;
    font-size: 1rem;
}
.contact-form form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.contact-form input, .contact-form textarea {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: inherit;
}
.contact-form button {
    background: #e74c3c;
    color: #fff;
    border: none;
    padding: 14px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
}

/* ===================================
   ФУТЕР
   =================================== */
.footer {
    background: #1e1e2f;
    color: #ccc;
    padding: 40px 0 20px;
}
.footer-content {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 30px;
    justify-content: space-between;
}
.footer h3, .footer h4 {
    color: #fff;
    margin-bottom: 15px;
}
.footer p {
    margin: 5px 0;
}
.social-icons {
    display: flex;
    gap: 15px;
    font-size: 1.5rem;
}
.social-icons a {
    color: #ccc;
    transition: color 0.3s;
}
.social-icons a:hover {
    color: #e74c3c;
}
.footer-bottom {
    margin-top: 30px;
    text-align: center;
    border-top: 1px solid #333;
    padding-top: 20px;
    font-size: 0.9rem;
}

/* ===================================
   МОДАЛЬНЫЕ ОКНА
   =================================== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 10000;
    justify-content: center;
    align-items: center;
}
.modal.active {
    display: flex;
}
.modal-content {
    background: #fff;
    border-radius: 16px;
    padding: 30px;
    max-width: 450px;
    width: 90%;
    position: relative;
    animation: modalIn 0.3s ease;
}
@keyframes modalIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 1.5rem;
    cursor: pointer;
    color: #888;
}
.modal h2 {
    margin-bottom: 20px;
}
.modal form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.modal input {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
}
.modal button[type="submit"] {
    background: #e74c3c;
    color: #fff;
    border: none;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
}
.modal-link {
    text-align: center;
    margin-top: 15px;
}
.modal-link a {
    color: #e74c3c;
}

/* ===================================
   РЕГИСТРАЦИЯ (бонусы)
   =================================== */
.register-bonus {
    background: #ffe6e6;
    padding: 12px;
    border-radius: 8px;
    font-size: 16px;
    text-align: center;
    margin-bottom: 8px;
}
.register-sub {
    font-size: 14px;
    color: #666;
    text-align: center;
    margin-bottom: 8px;
}
.register-tokens {
    font-size: 14px;
    color: #e74c3c;
    text-align: center;
    margin-bottom: 20px;
    font-weight: bold;
}

/* ===================================
   AI-ВИДЖЕТ (плавающая кнопка)
   =================================== */
#ai-widget {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
}
.ai-toggle-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #e74c3c;
    border: none;
    color: #fff;
    font-size: 28px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: transform 0.3s;
}
.ai-toggle-btn:hover {
    transform: scale(1.1);
}
.ai-chat-box {
    display: none;
    width: 350px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    overflow: hidden;
    margin-bottom: 10px;
    flex-direction: column;
}
#ai-widget.open .ai-chat-box {
    display: flex;
}
#ai-widget.open .ai-toggle-btn {
    display: none;
}
.ai-chat-header {
    background: #e74c3c;
    color: #fff;
    padding: 12px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
}
.ai-close-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
}
.ai-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    min-height: 300px;
    max-height: 400px;
    background: #f9f9f9;
    font-size: 14px;
}
.ai-message {
    margin-bottom: 10px;
}
.ai-message.user {
    text-align: right;
}
.ai-message.ai {
    text-align: left;
}
.ai-message span {
    display: inline-block;
    padding: 8px 12px;
    border-radius: 18px;
    max-width: 80%;
    word-wrap: break-word;
}
.ai-message.user span {
    background: #e74c3c;
    color: #fff;
}
.ai-message.ai span {
    background: #eee;
    color: #333;
}
.ai-input-area {
    display: flex;
    border-top: 1px solid #ddd;
}
.ai-input-area input {
    flex: 1;
    border: none;
    padding: 12px;
    font-size: 14px;
    outline: none;
}
.ai-input-area button {
    background: #e74c3c;
    color: #fff;
    border: none;
    padding: 12px 18px;
    cursor: pointer;
}

/* ===================================
   AI-МЕНЕДЖЕР ВИДЖЕТ (роль)
   =================================== */
#ai-manager-widget {
    position: fixed;
    bottom: 30px;
    right: 110px;
    z-index: 9998;
}
.ai-manager-btn {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    border: 3px solid #fff;
    color: #fff;
    font-size: 28px;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(231,76,60,0.4);
    transition: all 0.3s;
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(231,76,60,0.6); }
    70% { box-shadow: 0 0 0 20px rgba(231,76,60,0); }
    100% { box-shadow: 0 0 0 0 rgba(231,76,60,0); }
}
.ai-manager-btn:hover { transform: scale(1.1); }
.ai-manager-box {
    display: none;
    width: 380px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.2);
    overflow: hidden;
    margin-bottom: 10px;
}
#ai-manager-widget.open .ai-manager-box { display: block; }
#ai-manager-widget.open .ai-manager-btn { display: none; }
.ai-manager-header {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: #fff;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
    font-size: 16px;
}
.ai-manager-header button {
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
}
.role-question {
    padding: 20px 20px 10px;
    font-size: 15px;
    color: #333;
    margin: 0;
}
.role-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 20px 20px;
}
.role-btn {
    flex: 1 1 45%;
    padding: 12px 10px;
    background: #f5f5f5;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
}
.role-btn:hover {
    background: #ffe6e6;
    border-color: #e74c3c;
}
.manager-messages {
    height: 350px;
    overflow-y: auto;
    padding: 15px;
    background: #fafafa;
}
.manager-messages .msg {
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;
}
.manager-messages .msg.manager { align-items: flex-start; }
.manager-messages .msg.user { align-items: flex-end; }
.manager-messages .msg .bubble {
    max-width: 80%;
    padding: 10px 15px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.5;
}
.manager-messages .msg.manager .bubble {
    background: #fff;
    border: 1px solid #e0e0e0;
    color: #333;
}
.manager-messages .msg.user .bubble {
    background: #e74c3c;
    color: #fff;
}
.manager-input-area {
    display: flex;
    border-top: 1px solid #eee;
}
.manager-input-area input {
    flex: 1;
    border: none;
    padding: 15px;
    font-size: 14px;
    outline: none;
}
.manager-input-area button {
    background: #e74c3c;
    color: #fff;
    border: none;
    padding: 0 20px;
    cursor: pointer;
}

/* ===================================
   AI-АГЕНТЫ (карусель на главной) – GRID
   =================================== */
.ai-agents-section {
    background: #f5f7fa;
    padding: 70px 0;
}
.agents-slider-container {
    position: relative;
    max-width: 900px;
    margin: 40px auto 0;
    overflow: hidden;
}
.agents-slider {
    display: flex;
    transition: transform 0.5s ease;
}
.agent-card {
    flex: 0 0 98%;
    display: grid;
    grid-template-columns: 1fr 1fr;   /* горизонтально: картинка | текст */
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.agent-card-visual {
    position: relative;
    background: #1e1e2f;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
}
.agent-card-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.9;
}
.typing-simulation {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background: rgba(255,255,255,0.9);
    border-radius: 12px;
    padding: 12px 15px;
    font-size: 14px;
    color: #333;
    animation: fadeInOut 4s infinite;
}
.typing-simulation .cursor {
    display: inline-block;
    width: 2px;
    height: 16px;
    background: #333;
    margin-left: 4px;
    animation: blink 0.8s infinite;
}
@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}
@keyframes fadeInOut {
    0%, 100% { opacity: 0; transform: translateY(10px); }
    20%, 80% { opacity: 1; transform: translateY(0); }
}
.agent-card-info {
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.agent-card-info h3 {
    font-size: 22px;
    margin-bottom: 10px;
}
.agent-features {
    list-style: none;
    padding: 0;
    margin: 15px 0;
}
.agent-features li {
    padding: 5px 0;
    font-size: 15px;
}
.agent-features i {
    color: #2ecc71;
    margin-right: 8px;
}
.agent-card-info .btn-primary {
    align-self: flex-start;
    margin-top: 15px;
}

/* Модальное окно теста агента (без изменений) */
.agent-modal-content {
    max-width: 800px;
    padding: 0;
    border-radius: 20px;
    overflow: hidden;
}
.agent-test-container {
    display: flex;
    height: 500px;
}
.agent-test-visual {
    flex: 0 0 40%;
    background: #1e1e2f;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}
.agent-test-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.agent-typing-indicator {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background: rgba(0,0,0,0.7);
    color: #fff;
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 13px;
}
.agent-test-chat {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #fff;
}
.test-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}
.test-messages .msg {
    margin-bottom: 10px;
}
.test-messages .msg.agent { text-align: left; }
.test-messages .msg.user { text-align: right; }
.test-messages .msg span {
    display: inline-block;
    padding: 8px 12px;
    border-radius: 12px;
    max-width: 70%;
    font-size: 14px;
}
.test-messages .msg.agent span { background: #f0f0f0; }
.test-messages .msg.user span { background: #e74c3c; color: #fff; }
.test-input-row {
    display: flex;
    border-top: 1px solid #eee;
}
.test-input-row input {
    flex: 1;
    border: none;
    padding: 15px;
}
.test-input-row button {
    background: #e74c3c;
    color: #fff;
    border: none;
    padding: 0 25px;
    cursor: pointer;
}

/* ===================================
   СТРАНИЦА УСЛУГ (services)
   =================================== */
.services-page .container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px 20px;
}
.service-block {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 25px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s;
}
.service-block:hover {
    transform: translateY(-5px);
}
.service-block i {
    font-size: 2.5rem;
    color: #e74c3c;
    margin-bottom: 15px;
    display: block;
}
.service-block h2 {
    margin: 0 0 10px;
    font-size: 1.5rem;
    color: #222;
}
.service-block p {
    color: #555;
    line-height: 1.6;
}

/* ===================================
   ГОТОВЫЕ САЙТЫ (store)
   =================================== */
.store-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-top: 30px;
}
.store-item {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s;
}
.store-item:hover {
    transform: translateY(-5px);
}
.store-item img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 15px;
}
.store-item h3 {
    margin: 0 0 10px;
    font-size: 1.3rem;
}
.store-item .price {
    font-size: 1.5rem;
    font-weight: bold;
    color: #e74c3c;
    margin: 15px 0;
}

/* ===================================
   ВИДЕО-КАРУСЕЛЬ
   =================================== */
.video-showcase {
    background: #f9f9f9;
    padding: 60px 0;
}
.video-carousel {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding-bottom: 20px;
}
.video-slide {
    flex: 0 0 400px;
    max-width: 400px;
}
.video-slide video {
    width: 100%;
    border-radius: 10px;
    background: #000;
}
.video-caption {
    text-align: center;
    margin-top: 8px;
    font-weight: bold;
}
.video-cta {
    text-align: center;
    margin-top: 30px;
}

/* ===================================
   ГЕНЕРАТОР БАННЕРОВ
   =================================== */
.generator-box {
    max-width: 600px;
    margin: 50px auto;
    padding: 30px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}
.generator-box textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
}
.generator-box button {
    background: #e74c3c;
    color: #fff;
    border: none;
    padding: 12px 30px;
    margin-top: 10px;
    border-radius: 8px;
    cursor: pointer;
}
.result-img {
    margin-top: 20px;
    text-align: center;
}
.result-img img {
    max-width: 100%;
    border-radius: 8px;
}

/* ===================================
   ПЛАШКА РЕГИСТРАЦИИ (видео-карусель)
   =================================== */
.registration-prompt {
    background: #fff3cd;
    text-align: center;
    padding: 20px;
    font-size: 18px;
}
.registration-prompt a {
    color: #e74c3c;
    font-weight: bold;
    text-decoration: underline;
}

/* ==================================================
   АДАПТИВНОСТЬ
   ================================================== */
@media screen and (max-width: 1600px) {
    .container {
        max-width: 1100px;
        padding: 0 25px;
    }
    .hero h2 {
        font-size: 2rem;
    }
    .hero p {
        font-size: 1rem;
    }
    .hero-content {
        gap: 20px;
    }
}

@media screen and (max-width: 1400px) {
    .container {
        max-width: 1000px;
    }
    .logo h1 {
        font-size: 1.4rem;
    }
    .logo span {
        font-size: 0.75rem;
    }
    .header-contacts .phone {
        font-size: 0.9rem;
    }
    .slide-content {
        padding: 25px;
    }
    .desktop-preview {
        max-height: 300px;
    }
    .work-body a {
        flex: 1 1 45%;
    }
    .store-grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
        gap: 20px;
    }
    .agent-card {
        flex-direction: column;
    }
    .agent-card-visual {
        flex: 0 0 250px;
    }
    .agent-card-info {
        padding: 20px;
    }
}

@media screen and (max-width: 1366px) {
    .container {
        max-width: 960px;
    }
    .hero {
        padding: 40px 0;
    }
    .hero h2 {
        font-size: 1.8rem;
    }
    .contact-content {
        flex-direction: column;
    }
    section {
        padding: 40px 0;
    }
    #ai-widget .ai-toggle-btn {
        width: 50px;
        height: 50px;
        font-size: 22px;
    }
    #ai-widget .ai-chat-box {
        width: 320px;
    }
    .agent-test-container {
        flex-direction: column;
        height: auto;
        max-height: 80vh;
    }
    .agent-test-visual {
        height: 200px;
        flex: none;
    }
    .calculator {
        max-width: 500px;
    }
}

@media screen and (max-width: 1024px) {
    .navbar a {
        font-size: 1vw;
        padding: 8px 10px;
    }
    .hero {
        flex-direction: column;
        text-align: center;
    }
    .slide-content {
        flex-direction: column;
    }
    .agent-card {
        flex-direction: column;
    }
    .agent-card-info {
        padding: 15px;
    }
    #ai-manager-widget .ai-manager-btn {
        width: 55px;
        height: 55px;
        font-size: 24px;
    }
    #ai-manager-widget .ai-manager-box {
        width: 320px;
    }
}

@media screen and (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    .mobile-menu-btn {
        display: block;
    }
    .navbar {
        display: none;
        flex-direction: column;
    }
    .navbar.active {
        display: flex;
    }
    .work-body a {
        flex: 1 1 100%;
    }
    .agents-slider-container .slider-btn {
        display: none;
    }
}





/* Приложения – анимированные карточки */
.apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 25px;
    margin-top: 40px;
}
.app-card {
    background: #fff;
    border-radius: 16px;
    padding: 30px 20px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: default;
}
.app-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(231,76,60,0.15);
}
.app-card i {
    color: #e74c3c;
    margin-bottom: 15px;
    transition: transform 0.3s;
}
.app-card:hover i {
    transform: scale(1.2) rotate(5deg);
}


/* Готовые сайты – превью */
.ready-sites .site-preview {
    position: relative;
    display: inline-block;
    width: 100%;
    padding-top: 66%; /* соотношение 3:2 */
    background: #f0f0f0;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 15px;
}
.ready-sites .desktop-preview {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}
.ready-sites .mobile-preview {
    position: absolute;
    bottom: -10px;
    right: -15px;
    width: 45%;
    height: auto;
    border-radius: 12px;
    box-shadow: -5px 5px 15px rgba(0,0,0,0.3);
    border: 2px solid #fff;
    z-index: 2;
    transform: rotate(2deg);
}

/* Планшеты (портрет и ландшафт) */
@media screen and (min-width: 768px) and (max-width: 1024px) {
    /* Шапка — не разваливаем в столбик */
    .logo {
        flex: 1 1 auto;
        text-align: left;
    }
    .header-contacts {
        flex: 1 1 auto;
        text-align: center;
        font-size: 16px;
    }
    .auth-icons {
        flex: 1 1 auto;
        justify-content: flex-end;
    }
    /* Меню — горизонтальное, но уменьшаем шрифт */
    .navbar ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 5px;
    }
    .navbar a {
        font-size: 14px;
        padding: 8px 10px;
    }

    /* Hero — уменьшаем отступы и шрифт */
    .hero h2 {
        font-size: 2rem;
    }
    .hero p {
        font-size: 1.1rem;
    }
    /* Калькулятор */
    .calculator {
        max-width: 400px;
    }
}
@media screen (max-width: 640px) {
    display: block;    
}




/* ==========================================
   ВИТРИНА ПОРТФОЛИО: КАРТОЧКА САЙТА
   ========================================== */

.portfolio-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    max-width: 1200px;
    margin: 0 auto 40px;
    transform: scale(0.85);
    transform-origin: top center;
}

/* 1. Верхняя панель */
.portfolio-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 30px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    gap: 20px;
}

.portfolio-socials {
    display: flex;
    gap: 8px;
}

.social-icon {
    width: 24px;
    height: 24px;
    background: #1a1a1a;
    border-radius: 50%;
    display: inline-block;
}

.portfolio-search {
    padding: 8px 20px;
    background: #e9ecef;
    border-radius: 20px;
    color: #999;
    font-size: 13px;
    min-width: 200px;
}

.portfolio-nav {
    display: flex;
    gap: 18px;
    font-size: 13px;
    color: #1a1a1a;
    font-weight: 500;
}

/* 2. Инфопанель */
.portfolio-infobar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 30px;
    border-bottom: 1px solid #e9ecef;
}

.portfolio-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    font-size: 36px;
}

.portfolio-logo strong {
    display: block;
    font-size: 20px;
    color: #1a1a1a;
}

.portfolio-logo small {
    color: #666;
    font-size: 12px;
}

.portfolio-contacts {
    display: flex;
    align-items: center;
    gap: 20px;
}

.portfolio-phone {
    font-size: 22px;
    font-weight: 700;
    color: #1a1a1a;
}

.portfolio-address {
    font-size: 13px;
    color: #666;
}

.btn-green {
    padding: 12px 28px;
    background: #4CDF2B;
    color: #fff;
    border: none;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.btn-green:hover {
    background: #3db820;
}

/* 3. Hero */
.portfolio-hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    padding: 50px 30px;
    gap: 40px;
}

.portfolio-hero-left h1 {
    font-size: 36px;
    font-weight: 800;
    color: #1a1a1a;
    line-height: 1.2;
    margin-bottom: 16px;
}

.portfolio-hero-left p {
    font-size: 16px;
    color: #333;
    margin-bottom: 30px;
}

.portfolio-hero-btns {
    display: flex;
    gap: 12px;
}

.btn-outline {
    padding: 12px 28px;
    background: #fff;
    color: #1a1a1a;
    border: 2px solid #1a1a1a;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.btn-outline:hover {
    background: #1a1a1a;
    color: #fff;
}

.portfolio-hero-right img {
    width: 100%;
    height: auto;
    border-radius: 12px;
}

/* Адаптив */
@media (max-width: 900px) {
    .portfolio-topbar {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .portfolio-nav {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .portfolio-infobar {
        flex-direction: column;
        gap: 16px;
    }
    
    .portfolio-contacts {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .portfolio-hero {
        grid-template-columns: 1fr;
        padding: 30px 20px;
    }
    
    .portfolio-hero-left h1 {
        font-size: 24px;
    }
    
    .portfolio-card {
        transform: scale(1);
    }
}

@media (max-width: 460px) {
    .portfolio-search {
        min-width: auto;
        width: 100%;
    }
    
    .portfolio-nav {
        font-size: 11px;
        gap: 6px;
    }
    
    .portfolio-phone {
        font-size: 18px;
    }
    
    .portfolio-hero-left h1 {
        font-size: 20px;
    }
    
    .btn-green,
    .btn-outline {
        padding: 10px 20px;
        font-size: 12px;
    }
}


