/* ============================================
   ПЕРЕМЕННЫЕ ТЕМЫ (определяются в theme.css)
   ============================================ */

/* Все CSS переменные теперь в файле theme.css, который генерируется автоматически */

/* ============================================
   БАЗОВЫЕ СТИЛИ
   ============================================ */

body {
    background-color: var(--body-bg);
    color: #4d4d4d;
    font-family: var(--font-family);
    font-size: var(--font-size);
    line-height: 1.6;
    margin: 0;
    padding: 0;
    min-width: 320px;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 15px;
}

/* ============================================
   ЗАГОЛОВКИ
   ============================================ */

h1, .h1 {
    font-size: 32px;
    margin: 20px 0;
    color: #333;
    position: relative;
}

h1:after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), #15803d);
    margin-top: 10px;
    border-radius: 2px;
}

h2, .h2 {
    font-size: 28px;
    margin: 20px 0;
    color: #444;
}

h3, .h3 {
    font-size: 24px;
    margin: 15px 0;
    color: #555;
}

h4, .h4 {
    font-size: 20px;
    margin: 15px 0;
    color: #666;
}

/* ============================================
   ССЫЛКИ
   ============================================ */

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

/* ============================================
   ХЛЕБНЫЕ КРОШКИ
   ============================================ */

.breadcrumb {
    background: transparent;
    padding: 0;
    margin: 0;
    font-size: 14px;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
}

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

.breadcrumb-item + .breadcrumb-item::before {
    content: "→";
    padding: 0 8px;
    color: #999;
}

.breadcrumb-item a {
    color: var(--primary-color);
    text-decoration: none;
}

.breadcrumb-item a:hover {
    text-decoration: underline;
}

.breadcrumb-item.active {
    color: #666;
}

/* ============================================
   ШАПКА САЙТА
   ============================================ */

header {
    background: #fff;
    border-bottom: 1px solid #ebebeb;
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-top {
    background: #f5f5f6;
    border-bottom: 1px solid #ebebeb;
    padding: 12px 0;
    font-size: 13px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.header-top a {
    color: #666;
    transition: color 0.3s;
}

.header-top a:hover {
    color: var(--primary-color);
}

.header-logo {
    font-size: 28px;
    font-weight: bold;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    padding-left: 60px;
}

.header-logo a {
    color: #333;
    text-decoration: none;
    display: inline-block;
    line-height: 1;
}

.header-logo a:hover {
    color: var(--primary-color);
}

.header-logo img {
    max-height: 50px;
    width: auto;
    vertical-align: middle;
    display: block;
}

.header-contacts {
    text-align: right;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding-right: 90px;
}

.header-contacts .phone {
    font-size: 18px;
    font-weight: bold;
    margin: 0;
    line-height: 1.3;
}

.header-contacts .phone a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s;
}

.header-contacts .phone a:hover {
    color: var(--primary-color);
}

.header-contacts .email {
    color: #666;
    font-size: 13px;
    margin: 0;
}

/* Кнопка мобильного меню */
.js-menu-toggle {
    display: none;
    cursor: pointer;
    font-size: 24px;
    background: none;
    border: none;
    color: #333;
    padding: 5px 10px;
    transition: color 0.3s;
}

.js-menu-toggle:hover {
    color: var(--primary-color);
}

/* Навигация */
.main-nav {
    margin: 15px 0 0;
    padding: 10px 0;
    border-top: 1px solid #ebebeb;
    transition: all 0.3s;
}

.main-nav a {
    display: inline-block;
    padding: 8px 15px;
    color: #555;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
    border-radius: 6px;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--primary-color);
    background: rgba(22,163,74,0.1);
    transform: translateY(-2px);
}

/* Выпадающее меню */
.main-nav .dropdown {
    position: relative;
    display: inline-block;
}

.main-nav .dropdown > a {
    display: inline-block;
}

.main-nav .dropdown > a:after {
    content: " ▼";
    font-size: 10px;
}

.main-nav .dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    min-width: 200px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-radius: 8px;
    padding: 8px 0;
    z-index: 1000;
}

.main-nav .dropdown:hover .dropdown-menu {
    display: block;
}

.main-nav .dropdown-menu a {
    display: block;
    padding: 10px 20px;
    color: #333;
    background: #fff;
    border-radius: 0;
    transform: none;
}

.main-nav .dropdown-menu a:hover {
    background: #f5f5f5;
    color: var(--primary-color);
    transform: none;
}

/* ============================================
   КНОПКИ
   ============================================ */

button,
.btn,
input[type="submit"],
input[type="button"],
.btn-primary,
.btn-secondary {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    background-color: var(--primary-color);
    color: #fff;
    border-radius: var(--button-radius);
}

button:hover,
.btn:hover,
input[type="submit"]:hover,
input[type="button"]:hover,
.btn-primary:hover,
.btn-secondary:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
    text-decoration: none;
}

.btn-secondary {
    background-color: var(--secondary-color);
}

.btn-secondary:hover {
    background-color: var(--primary-color);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: #fff;
}

/* ============================================
   СПИСОК ПОДСТРАНИЦ
   ============================================ */

.subpages {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    margin-top: 30px;
    border-top: 1px solid #e5e5e5;
}

.subpages h3 {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 12px;
    color: #333;
}

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

.subpages li {
    margin-bottom: 8px;
}

.subpages a {
    color: var(--primary-color);
    text-decoration: none;
}

.subpages a:hover {
    text-decoration: underline;
}

/* ============================================
   КНОПКА "НАВЕРХ"
   ============================================ */

#move-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, var(--primary-color), #15803d);
    color: #fff;
    border-radius: 50%;
    text-align: center;
    line-height: 45px;
    cursor: pointer;
    z-index: 100;
    display: none;
    transition: all 0.3s;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

#move-to-top:hover {
    background: var(--secondary-color);
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(22,163,74,0.4);
}

#move-to-top:before {
    content: '↑';
    font-size: 20px;
    font-weight: bold;
}

/* ============================================
   ОСНОВНОЙ КОНТЕНТ
   ============================================ */

main {
    min-height: 400px;
    padding: 30px 0;
}

.content {
    background: #fff;
    border: 1px solid #ebebeb;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: box-shadow 0.3s;
}

.content:hover {
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

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

/* ============================================
   ПОДВАЛ
   ============================================ */

footer {
    background: linear-gradient(135deg, #1e293b, #0f172a);
    padding: 40px 0 20px;
    color: #e2e8f0;
    margin-top: 40px;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin-bottom: 30px;
}

.footer-section {
    flex: 1;
    min-width: 200px;
}

.footer-section h3 {
    margin: 0 0 15px;
    font-size: 18px;
    color: #fff;
    position: relative;
    padding-bottom: 8px;
}

.footer-section h3:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--primary-color);
}

.footer-section p {
    margin: 8px 0;
    line-height: 1.5;
}

.footer-section a {
    color: #cbd5e1;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: var(--primary-color);
    text-decoration: none;
}

.footer-section i {
    width: 20px;
    color: var(--primary-color);
    margin-right: 8px;
}

.footer-bottom {
    border-top: 1px solid #334155;
    padding-top: 20px;
    text-align: center;
    font-size: 13px;
    color: #94a3b8;
}

.footer-bottom a {
    color: #94a3b8;
}

.footer-bottom a:hover {
    color: var(--primary-color);
}

/* ============================================
   АДАПТИВНОСТЬ
   ============================================ */

@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    h1, .h1 { font-size: 28px; }
    h2, .h2 { font-size: 24px; }
    h3, .h3 { font-size: 20px; }
    
    .footer-content {
        flex-direction: column;
        gap: 25px;
    }
    
    .header-top {
        flex-direction: column;
        text-align: center;
        padding: 15px 0;
    }
    
    .header-logo {
        text-align: center;
        justify-content: center;
        padding-left: 0;
    }
    
    .header-contacts {
        text-align: center;
        align-items: center;
        padding-right: 0;
    }
    
    .header-contacts .phone,
    .header-contacts .email {
        display: inline-block;
        margin: 0 5px;
    }
    
    .js-menu-toggle {
        display: inline-block;
    }
    
    .main-nav {
        display: none !important;
        position: fixed !important;
        top: 80px !important;
        left: 0 !important;
        right: 0 !important;
        background: white !important;
        z-index: 999999 !important;
        box-shadow: 0 5px 15px rgba(0,0,0,0.2) !important;
        margin: 0 !important;
        padding: 0 !important;
        border-top: 1px solid #ebebeb !important;
    }
    
    .main-nav.show {
        display: block !important;
    }
    
    .main-nav a {
        display: block !important;
        padding: 15px 20px !important;
        border-bottom: 1px solid #f0f0f0 !important;
        margin: 0 !important;
        border-radius: 0 !important;
        text-decoration: none !important;
        color: #333 !important;
        background: white !important;
        font-size: 16px !important;
    }
    
    .main-nav a:hover {
        background: #f5f5f5 !important;
        transform: none !important;
    }
    
    .main-nav a:last-child {
        border-bottom: none !important;
    }
    
    .main-nav .dropdown {
        display: block;
        position: relative;
    }
    
    .main-nav .dropdown > a:after {
        content: " ▼";
        float: right;
    }
    
    .main-nav .dropdown-menu {
        position: static;
        display: none;
        box-shadow: none;
        padding-left: 20px;
    }
    
    .main-nav .dropdown.active .dropdown-menu {
        display: block;
    }
}

@media (max-width: 480px) {
    .content {
        padding: 20px;
    }
    
    .header-logo {
        font-size: 22px;
        padding-left: 0;
    }
    
    .header-contacts .phone {
        font-size: 16px;
    }
}

/* ============================================
   ХЛЕБНЫЕ КРОШКИ В СТРОЧКУ
   ============================================ */

.breadcrumbs {
    margin-bottom: 20px;
    font-size: 14px;
}

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

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

.breadcrumb-item a {
    color: var(--primary-color);
    text-decoration: none;
}

.breadcrumb-item a:hover {
    text-decoration: underline;
}

.breadcrumb-item .separator {
    margin: 0 8px;
    color: #999;
}

.breadcrumb-item span {
    color: #666;
}