/* Базовые параметры */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-family: 'Segoe UI', Arial, sans-serif;
    color: #1e293b;
    background-color: #f8fafc;
}

.container {
    width: 95%;
    max-width: 1300px;
    margin: 0 auto;
}

/* ==========================================================================
   1. ТОП-БАР (Верхняя полоска)
   ========================================================================== */
.top-bar {
    background-color: #0f172a;
    color: #cbd5e1;
    font-size: 13px;
    padding: 8px 0;
    border-bottom: 1px solid #334155;
}

.top-bar-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-link {
    color: #cbd5e1;
    text-decoration: none;
    margin-right: 20px;
    transition: color 0.2s;
}

.top-link:hover {
    color: #38bdf8;
}

.top-socials a {
    color: #cbd5e1;
    text-decoration: none;
    margin-left: 15px;
    transition: color 0.2s;
}

.top-socials a:hover {
    color: #38bdf8;
}

/* ==========================================================================
   2. ШАПКА И ГЛАВНОЕ МЕНЮ
   ========================================================================== */
.main-header {
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 15px 0;
}

.header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.logo a {
    font-size: 26px;
    font-weight: 800;
    text-decoration: none;
    color: #0f172a;
}

.logo span {
    color: #2563eb;
}

/* Навигация */
.main-nav a {
    color: #475569;
    text-decoration: none;
    margin: 0 15px;
    font-weight: 500;
    transition: color 0.2s;
}

.main-nav a:hover {
    color: #2563eb;
}

/* Поиск и действия */
.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.search-form {
    display: flex;
    align-items: center;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    overflow: hidden;
    padding: 2px;
}

.search-form input {
    border: none;
    background: transparent;
    padding: 6px 12px;
    font-size: 14px;
    outline: none;
    color: #334155;
    width: 180px;
    transition: width 0.3s;
}

.search-form input:focus {
    width: 220px;
}

.search-form button {
    background: transparent;
    border: none;
    padding: 0 10px;
    cursor: pointer;
    font-size: 14px;
}

.btn-contact-header {
    background-color: #2563eb;
    color: #fff;
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: background 0.2s;
}

.btn-contact-header:hover {
    background-color: #1d4ed8;
}

.burger-menu {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: transparent;
    border: none;
    cursor: pointer;
}

.burger-menu span {
    width: 25px;
    height: 3px;
    background-color: #0f172a;
    border-radius: 2px;
}

/* ==========================================================================
   3. ХЛЕБНЫЕ КРОШКИ (Breadcrumbs)
   ========================================================================== */
.breadcrumbs-container {
    background-color: #f1f5f9;
    padding: 12px 0;
    border-bottom: 1px solid #e2e8f0;
}

.breadcrumbs {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    font-size: 13px;
}

.breadcrumbs li {
    color: #64748b;
}

.breadcrumbs li+li::before {
    content: " / ";
    padding: 0 8px;
    color: #94a3b8;
}

.breadcrumbs a {
    color: #2563eb;
    text-decoration: none;
}

.breadcrumbs a:hover {
    text-decoration: underline;
}

.breadcrumbs li.current {
    color: #475569;
    font-weight: 500;
}

/* ==========================================================================
   4. ГЛАВНЫЙ ЭКРАН (Hero 50/50)
   ========================================================================== */
.hero-section {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: #ffffff;
    padding: 80px 0;
    border-bottom: 4px solid #2563eb;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.hero-badge {
    display: inline-block;
    background: rgba(37, 99, 235, 0.2);
    border: 1px solid #2563eb;
    color: #38bdf8;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 20px;
}

.hero-text h1 {
    font-size: 42px;
    line-height: 1.2;
    font-weight: 800;
    margin-bottom: 20px;
}

.hero-text p {
    font-size: 18px;
    color: #94a3b8;
    line-height: 1.6;
    margin-bottom: 30px;
}

.hero-buttons {
    display: flex;
    gap: 15px;
}

.btn-primary {
    background-color: #2563eb;
    color: #fff;
    text-decoration: none;
    padding: 12px 28px;
    border-radius: 6px;
    font-weight: 600;
    transition: background 0.2s;
}

.btn-primary:hover {
    background-color: #1d4ed8;
}

.btn-secondary {
    background-color: transparent;
    color: #fff;
    border: 2px solid #475569;
    text-decoration: none;
    padding: 10px 26px;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background-color: #475569;
    border-color: #475569;
}

/* Заглушка под картинку */
.image-placeholder {
    background: #334155;
    border: 2px dashed #475569;
    border-radius: 12px;
    height: 350px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    text-align: center;
    padding: 20px;
}

/* ==========================================================================
   5. МАКЕТ С САЙДБАРОМ И СЕКЦИЯМИ
   ========================================================================== */
.main-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
    margin-top: 40px;
    margin-bottom: 60px;
    align-items: start;
}

.left-sidebar {
    position: sticky;
    top: 90px;
}

.sidebar-box {
    background: #ffffff;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    margin-bottom: 20px;
}

.sidebar-box h3, .sidebar-box h4 {
    font-size: 18px;
    margin-bottom: 15px;
    color: #0f172a;
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 8px;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.sidebar-nav a {
    color: #475569;
    text-decoration: none;
    padding: 10px 12px;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.2s;
}

.sidebar-nav a:hover, .sidebar-nav a.active {
    background-color: #eff6ff;
    color: #2563eb;
}

.promo-box {
    background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%);
    border: 1px solid #bfdbfe;
}

.promo-box p {
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 15px;
    color: #1e3a8a;
}

.btn-sidebar {
    display: block;
    text-align: center;
    background: #2563eb;
    color: #fff;
    text-decoration: none;
    padding: 10px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
}

/* Контентные блоки */
.content-block {
    background: #ffffff;
    padding: 40px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    margin-bottom: 30px;
}

.block-title {
    font-size: 26px;
    margin-bottom: 30px;
    position: relative;
    padding-bottom: 10px;
}

.block-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background-color: #2563eb;
}

/* Сетки */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}

.service-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 25px;
    border-radius: 8px;
}

.s-icon { font-size: 32px; margin-bottom: 15px; }

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    text-align: center;
}

.stat-num { font-size: 40px; font-weight: 800; color: #2563eb; }

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.portfolio-item {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
}

.portfolio-img-stub {
    background: #cbd5e1;
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #475569;
    font-weight: bold;
}

.portfolio-info { padding: 20px; }

/* ==========================================================================
   6. МНОГОКОЛОНОЧНЫЙ ФУТЕР (В стиле joomla.center)
   ========================================================================== */
.main-footer {
    background-color: #0f172a;
    color: #94a3b8;
    padding-top: 60px;
    border-top: 4px solid #2563eb;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h4 {
    color: #ffffff;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    position: relative;
}

.footer-logo {
    font-size: 28px;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 15px;
}

.footer-logo span {
    color: #2563eb;
}

.footer-about-text {
    font-size: 14px;
    line-height: 1.6;
}

.footer-menu {
    list-style: none;
}

.footer-menu li {
    margin-bottom: 10px;
}

.footer-menu a {
    color: #94a3b8;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

.footer-menu a:hover {
    color: #ffffff;
    padding-left: 5px; /* Эффект сдвига при наведении */
}

.footer-contacts-list {
    list-style: none;
    font-size: 14px;
}

.footer-contacts-list li {
    margin-bottom: 12px;
    line-height: 1.4;
}

.footer-contacts-list a {
    color: #94a3b8;
    text-decoration: none;
}

.footer-contacts-list a:hover {
    color: #ffffff;
}

/* Нижняя плашка */
.footer-bottom {
    background-color: #020617;
    padding: 20px 0;
    font-size: 13px;
    border-top: 1px solid #1e293b;
}

.footer-bottom-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.footer-bottom-links a {
    color: #64748b;
    text-decoration: none;
    margin-left: 20px;
}

.footer-bottom-links a:hover {
    color: #94a3b8;
}

/* ==========================================================================
   7. АДАПТИВНОСТЬ
   ========================================================================== */
@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .hero-buttons {
        justify-content: center;
    }
    .main-layout {
        grid-template-columns: 1fr;
    }
    .main-nav {
        display: none; /* Логика скрытия */
    }
    .search-form {
        display: none; /* Убираем на планшетах/мобильных из шапки */
    }
    .burger-menu {
        display: flex;
    }
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    .footer-bottom-flex {
        flex-direction: column;
        text-align: center;
    }
    .footer-bottom-links a {
        margin: 0 10px;
    }
}