:root {
    --primary-color: #1a365d;
    --accent-color: #2b6cb0;
    --bg-light: #f7fafc;
    --text-dark: #2d3748;
    --text-muted: #718096;
    --white: #ffffff;
}

body {
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */


header h1 {
    font-size: 2.2rem;
    color: var(--primary-color);
    margin: 10px 0;
    text-transform: uppercase;
}

.subtitle {
    font-size: 1.1rem;
    max-width: 800px;
    margin: 0 auto;
    color: var(--text-muted);
}

/* Services Grid */
.services-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center; /* Центрирует элементы в неполных рядах */
    gap: 20px;
    margin-bottom: 60px;
}

.service-card {
    background: #fff;
    padding: 25px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    position: relative;
    transition: transform 0.3s, box-shadow 0.3s;
    
    /* Магия ширины: */
    /* Вычисляем ширину для 3-х колонок с учетом gap (20px * 2 промежутка / 3 колонки) */
    flex: 0 1 calc(33.333% - 20px); 
    max-width: 280px; /* Минимальная ширина, чтобы карточки не стали слишком узкими */
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px rgba(0,0,0,0.05);
    border-color: var(--accent-color);
}

/* Адаптивность для планшетов и телефонов */
@media (max-width: 992px) {
    .service-card {
        flex: 0 1 calc(50% - 20px); /* 2 колонки на средних экранах */
    }
}

@media (max-width: 600px) {
    .service-card {
        flex: 1 1 100%; /* 1 колонка на мобильных */
    }
}

.service-card h3 {
    color: var(--primary-color);
    margin-top: 0;
	text-align: center;
}

.service-card p {
    flex-grow: 1;
    font-size: 0.95rem;
    color: var(--text-muted);
	text-align: justify;
}

.btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--white);
    padding: 12px 20px;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
    text-align: center;
    margin-top: 20px;
    transition: background 0.3s;
}

.btn:hover {
    background-color: var(--accent-color);
}

/* About Section */
.about-section {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 60px 0;
}

.about-content {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.about-content p {
    text-align: justify;
}

/* Footer Styles */
footer {
    background-color: #f1f1f1;
    text-align: center;
    padding: 20px;
    font-size: 0.8rem;
    color: var(--text-muted);
}





/* Таблицы */
.data-table { width: 100%; border-collapse: collapse; margin: 30px 0; background: #fff; }
.data-table th, .data-table td { padding: 15px; border: 1px solid #ddd; text-align: left; }
.data-table th { background: var(--primary-color); color: #fff; }

/* Формы */
.cta-form { background: #edf2f7; padding: 40px; border-radius: 8px; margin: 40px 0; }
.cta-form form { display: grid; gap: 15px; max-width: 600px; }
.cta-form input, .cta-form textarea { padding: 12px; border: 1px solid #ccc; border-radius: 4px; }

/* Шаги и списки */
.step-item { margin-bottom: 15px; display: flex; align-items: center; gap: 15px; }
.step-item span { background: var(--accent-color); color: #fff; width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.scan-placeholder { border: 2px dashed #ccc; padding: 50px; text-align: center; background: #eee; }

/* Шапка сайта */
header {
    background-color: var(--white);
    border-bottom: 1px solid #e2e8f0;
}

/* Верхняя полоска */
.top-bar {
    background-color: var(--primary-color);
    color: #fff;
    padding: 8px 0;
    font-size: 0.85rem;
}

.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-bar a {
    color: #fff;
    text-decoration: none;
    transition: opacity 0.3s;
}

.top-bar a:hover {
    opacity: 0.8;
}

/* Основная навигация */
.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 20px;
}

.logo-area {
    /*line-height: 1.2;*/
	display: inline-flex;
    flex-direction: column;
    width: fit-content; /* Контейнер подстраивается под самую широкую строку */
}
.brand-name {
    font-size: 1.5em; /* Настройте под себя */
    font-weight: 800;
    text-transform: uppercase;
    line-height: 1;
    white-space: nowrap; /* Запрещаем перенос */
}

.brand-name span {
    color: var(--accent-color); /* Ваш красный/синий акцент */
}

.brand-tagline {
    font-size: 0.7em; /* Подбирается примерно, остальное сделает justify */
    text-transform: uppercase;
    letter-spacing: 0.1px; /* Начальный интервал */
    
    /* Магия выравнивания */
    display: block;
    text-align: justify;
    text-align-last: justify; /* Растягивает последнюю (и единственную) строку */
    
    /* Чтобы justify работал, некоторым браузерам нужно "намекнуть" на ширину */
    width: 100%; 
    margin-top: 5px;
    line-height: 1;
	color: black;
}

/* Меню */
.main-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 20px;
}

.main-menu a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 600;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.main-menu a:hover {
    color: var(--accent-color);
}

/* Адаптивность для мобилок */
@media (max-width: 900px) {
    .main-header {
        flex-direction: column;
        text-align: center;
    }
    .main-menu {
        margin-top: 20px;
    }
    .top-bar-content {
        flex-direction: column;
        gap: 5px;
    }
}


/* Hero Block для внутренних страниц */
.page-hero {
    background-color: var(--primary-color);
    color: #fff;
    padding: 60px 0 40px;
    margin-bottom: 40px;
    text-align: center;
}

.page-hero h1 {
    margin: 0 0 10px;
    color: #fff; /* Принудительно белый */
}

.hero-subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    margin: 0 auto;
	text-align: justify;
}

/* Сетка ISO материалов */
.iso-materials h2 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 30px;
}

.iso-grid {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 50px;
}

.iso-card {
    display: flex;
    align-items: center;
    background: #fff;
    padding: 10px 20px;
    border-radius: 50px; /* Овальные бейджи */
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    font-weight: bold;
    font-size: 0.9rem;
}

.iso-card span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    color: #fff;
    margin-right: 10px;
    font-weight: 900;
}

/* Цвета ISO */
.iso-p span { background-color: #0066cc; } /* Сталь - Синий */
.iso-m span { background-color: #ffcc00; color: #333; } /* Нерж - Желтый */
.iso-k span { background-color: #cc0000; } /* Чугун - Красный */
.iso-n span { background-color: #33cc33; } /* Цветнина - Зеленый */
.iso-s span { background-color: #cc9966; } /* Жаропрочка - Коричневый */
.iso-h span { background-color: #999999; } /* Каленое - Серый */

/* Улучшенные карточки инструмента */
.tool-card {
    text-align: left; /* Выравнивание по левому краю */
}

.card-icon {
    font-size: 2rem;
    color: var(--accent-color);
    margin-bottom: 15px;
}

.tool-list {
    list-style: none;
    padding: 0;
    margin: 15px 0;
    font-size: 0.9rem;
    color: var(--text-dark);
}

.tool-list li {
    padding-left: 20px;
    position: relative;
    margin-bottom: 8px;
}

.tool-list li::before {
    content: "\2022";
    color: var(--accent-color);
    position: absolute;
    left: 0;
    font-weight: bold;
}

.note {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-style: italic;
    margin-top: auto; /* Прижимает текст к низу карточки */
}

/* Улучшение формы: два поля в ряд */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

@media (max-width: 600px) {
    .form-row { grid-template-columns: 1fr; }
}







/* --- Стили для страницы Оборудования --- */

/* Сетка процесса (шаги 1, 2, 3, 4) */
.process-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center; /* Центрирует элементы в неполных рядах */
    gap: 20px;
    margin-bottom: 60px;
}

.process-card {
    background: #fff;
    padding: 25px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    position: relative;
    transition: transform 0.3s, box-shadow 0.3s;
    
    /* Магия ширины: */
    /* Вычисляем ширину для 3-х колонок с учетом gap (20px * 2 промежутка / 3 колонки) */
    flex: 0 1 calc(33.333% - 20px); 
    max-width: 220px;
}

.process-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px rgba(0,0,0,0.05);
    border-color: var(--accent-color);
}

/* Адаптивность для планшетов и телефонов */
@media (max-width: 992px) {
    .process-card {
        flex: 0 1 calc(50% - 20px); /* 2 колонки на средних экранах */
    }
}

@media (max-width: 600px) {
    .process-card {
        flex: 1 1 100%; /* 1 колонка на мобильных */
    }
}

.step-number {
    font-size: 2.5rem;
    font-weight: 900;
    color: #edf2f7; /* Очень светлый серый */
    position: absolute;
    top: 10px;
    right: 20px;
    line-height: 1;
    z-index: 0;
}

.process-card h3 {
    position: relative;
    z-index: 1;
    color: var(--primary-color);
    margin-top: 10px;
	text-align: center;
}

.process-card p {
    position: relative;
    z-index: 1;
    font-size: 0.9rem;
    color: var(--text-muted);
	text-align: justify;
}

/* Стилизация input type="file" */
.file-upload-wrapper {
    margin: 15px 0 25px;
}

input[type="file"] {
    display: none; /* Прячем стандартную страшную кнопку */
}

.custom-file-upload {
    border: 2px dashed #cbd5e0;
    display: inline-block;
    padding: 12px 24px;
    cursor: pointer;
    border-radius: 4px;
    color: var(--text-muted);
    font-weight: 600;
    width: 100%;
    text-align: center;
    box-sizing: border-box;
    transition: all 0.3s;
}

.custom-file-upload:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
    background-color: #f7fafc;
}

/* Дополнительно для карточек оборудования */
.equipment-card {
    text-align: center; /* Центрируем иконки и заголовки в карточках оборудования */
}







/* --- Стили для страницы Производство --- */

/* Улучшенная таблица */
.table-responsive {
    overflow-x: auto; /* Чтобы таблица не ломала мобилку */
}

.styled-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 0.95rem;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.05);
    background: #fff;
    border-radius: 8px; /* Скругление углов */
    overflow: hidden;   /* Чтобы скругление работало на table */
}

.styled-table thead tr {
    background-color: var(--primary-color);
    color: #ffffff;
    text-align: left;
}

.styled-table th, .styled-table td {
    padding: 15px 20px;
}

.styled-table tbody tr {
    border-bottom: 1px solid #dddddd;
}

.styled-table tbody tr:nth-of-type(even) {
    background-color: #f3f3f3; /* Зебра */
}

.styled-table tbody tr:last-of-type {
    border-bottom: 2px solid var(--primary-color);
}

.text-sm {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: normal;
}

.highlight-green { color: #2ecc71; font-weight: bold; }
.highlight-blue { color: var(--accent-color); font-weight: bold; }

/* Timeline (Схема работы) */
.scheme-section { margin: 60px 0; }

.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

/* Вертикальная линия */
.timeline::after {
    content: '';
    position: absolute;
    width: 4px;
    background-color: #e2e8f0;
    top: 0;
    bottom: 0;
    left: 20px; /* Отступ слева для линии */
    margin-left: -2px;
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    background-color: inherit;
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 20px;
}

.timeline-icon {
    position: absolute;
    left: 0;
    top: 15px;
    width: 40px;
    height: 40px;
    right: auto;
    background-color: var(--white);
    border: 4px solid var(--accent-color);
    border-radius: 50%;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
}

.timeline-content {
    padding: 20px;
    background-color: white;
    position: relative;
    border-radius: 6px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    border-left: 4px solid var(--accent-color); /* Цветная полоска слева */
}

.timeline-content h3 { margin-top: 0; color: var(--primary-color); font-size: 1.1rem; }
.timeline-content p { margin-bottom: 0; color: var(--text-muted); font-size: 0.9rem; }

/* Блок QC (Контроль качества) */
.qc-block {
    background: linear-gradient(135deg, #1a365d 0%, #2a4365 100%);
    color: white;
    padding: 40px;
    border-radius: 8px;
    margin-bottom: 50px;
}

.qc-content {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.qc-content p {
	text-align: justify;
}

.qc-icon {
    font-size: 3rem;
    color: #48bb78; /* Зеленый щит */
    flex-shrink: 0;
}

.qc-block h3 { margin-top: 0; color: #fff; }
.qc-block p { opacity: 0.9; line-height: 1.6; }

@media (max-width: 600px) {
    .qc-content { flex-direction: column; text-align: center; }
    .qc-icon { margin: 0 auto; }
}





/* --- Стили для страницы О Компании --- */

/* Статистика */
.stats-bar {
    display: flex;
    justify-content: space-around;
    background-color: #fff;
    padding: 30px 0;
    margin-top: -30px; /* Заезжает на Hero блок */
    margin-bottom: 50px;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    position: relative;
    z-index: 2;
    flex-wrap: wrap;
    gap: 20px;
}

.stat-item {
    text-align: center;
    flex: 1;
    min-width: 150px;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--accent-color);
    line-height: 1;
    margin-bottom: 5px;
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 600;
}

/* Сетка принципов */
.principles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    margin: 50px 0;
}

.principle-card {
    background: #f8fafc;
    padding: 30px;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.principle-icon {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.principle-card h3 {
    margin-top: 0;
    color: var(--text-dark);
}

/* Реквизиты */
.requisites-section {
    margin-bottom: 60px;
}

.requisites-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.req-block {
    background: #fff;
    border: 1px solid #e2e8f0;
    padding: 30px;
    border-radius: 8px;
}

.bank-block {
    background-color: #fcfcfc; /* Чуть серее */
}

.req-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.req-table td {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
    vertical-align: top;
}

.req-table tr:last-child td {
    border-bottom: none;
}

.req-table td:first-child {
    color: var(--text-muted);
    width: 140px; /* Фикс. ширина заголовков */
}

/* Кнопка скачивания */
.btn-download {
    display: inline-block;
    margin-top: 20px;
    text-decoration: none;
    color: var(--accent-color);
    border: 2px solid var(--accent-color);
    padding: 10px 20px;
    border-radius: 4px;
    font-weight: bold;
    transition: all 0.3s;
}

.btn-download:hover {
    background-color: var(--accent-color);
    color: #fff;
}

/* Мобильная адаптация */
@media (max-width: 768px) {
    .requisites-container {
        grid-template-columns: 1fr;
    }
    .stats-bar {
        margin-top: 20px;
        box-shadow: none;
        border: 1px solid #eee;
    }
}




/* --- Стили для блока Гарантий --- */
.quality-control p {
	text-align: justify;
}

.quality-control .section-title {
	text-align: center;
}

.guarantees-section {
    padding: 60px 0;
    border-radius: 12px;
    margin: 40px 0;
}

.guarantees-section h2 {
	text-align: center;
	font-size: 8em;
}

.section-subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 40px;
    font-size: 1.1rem;
}

.guarantees-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

.guarantee-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    background: #fff;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.guarantee-icon-wrapper {
    background: var(--primary-color);
    color: #fff;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.guarantee-text h3 {
    margin-top: 0;
    margin-bottom: 10px;
    color: var(--primary-color);
    font-size: 1.2rem;
}

.guarantee-text p {
    margin: 0;
    line-height: 1.6;
    font-size: 0.95rem;
    color: #4a5568;
}

/* Адаптация для мобильных */
@media (max-width: 768px) {
    .guarantees-grid {
        grid-template-columns: 1fr;
    }
    
    .guarantee-item {
        flex-direction: column;
        text-align: center;
    }
    
    .guarantee-icon-wrapper {
        margin: 0 auto;
    }
}








/* Сетка контактов */
.contacts-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 50px;
    margin: 50px 0;
}

.contact-card {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    align-items: flex-start;
}

.icon-box {
    color: #ff5b4d;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    flex-shrink: 0;
}

.contact-card h4 {
    margin: 0 0 5px 0;
    color: var(--primary-color);
    font-size: 1.1rem;
}

.phone-link, .email-link {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 5px 0;
}

.working-hours {
    font-size: 0.85rem;
    color: var(--text-muted);
    background: #f1f5f9;
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
}

/* Мессенджеры */
.social-buttons {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

.social-btn {
    text-decoration: none;
    color: #fff;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: transform 0.2s;
}

.social-btn.tg { background: #0088cc; }
.social-btn.wa { background: #25d366; }
.social-btn:hover { transform: translateY(-3px); }

/* Улучшенная форма */
.card-shadow {
    background: #fff;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.08);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
}

.file-upload-simple {
    margin: 15px 0;
}

.file-upload-simple label {
    display: block;
    padding: 10px;
    border: 2px dashed #cbd5e1;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    color: var(--text-muted);
    transition: all 0.3s;
}

.file-upload-simple label:hover {
    background: #f8fafc;
    border-color: var(--accent-color);
}

/* Карта */
.map-section {
    margin-bottom: 80px;
}

.map-wrapper {
    overflow: hidden;
    border-radius: 15px;
    line-height: 0;
}

@media (max-width: 992px) {
    .contacts-grid {
        grid-template-columns: 1fr;
    }
}