/* ════════════════════════════════════════
   MAIN.CSS — MetalGid
   Порядок: Base → Layout → Header → Sidebar
            → Content → Forms → Components
            → Pages → Footer
   ════════════════════════════════════════ */

/* ── Base ── */
* { box-sizing: border-box; }

body {
    width: 100%;
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    font-size: 14px;
    color: #1a1a1a;
    background: #f5f5f5;
}

/* ── Layout ── */
main, .container {
    margin: 0;
    padding: 0;
    width: 100%;
    height: auto;
    display: flex;
}

.content {
    margin: 0;
    padding: 20px;
    width: 100%;
    height: auto;
}

/* ── Header ── */
header {
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}

.top-container {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 5px;
    margin-left: 10px;
    padding: 0;
}

header .logo { height: 120px; width: auto; }

.filter-form select {
    appearance: none;
    background-color: #f4f4f4;
    color: #1a1a1a;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 10px 40px 10px 14px;
    font-size: 14px;
    min-width: 220px;
    cursor: pointer;
    outline: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23888' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    transition: border-color 0.15s;
}

.filter-form select:hover { border-color: #bbb; }
.filter-form select:focus { border-color: #666; }

header nav { background-color: #666; padding: 0 10px; }

header nav .navigation {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    min-height: 50px;
    margin: 0;
    padding: 0;
}

.navigation li { list-style: none; }

header nav a {
    display: flex;
    align-items: center;
    color: white;
    text-decoration: none;
    padding: 10px 20px;
}

header nav a:hover { color: #000; }
.navigation a.active { color: #000; }

.btn {
    display: flex;
    align-items: center;
    padding: 8px 15px;
    background-color: #ff8000;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    height: auto;
}

.btn-app {
    display: flex;
    align-items: center;
    padding: 8px 15px;
    background-color: green;
    border-radius: 5px;
    border: none;
    cursor: pointer;
}

/* ── Sidebar ── */
main .category {
    margin: 0;
    padding: 20px;
    width: 25%;
    min-width: 200px;
    background-color: #ccc;
    border-right: 2px solid #666;
}

.search-form { display: flex; flex-direction: column; gap: 8px; }

.search-form input {
    appearance: none;
    background-color: #f4f4f4;
    color: #1a1a1a;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.15s;
}

.search-form input::placeholder { color: #aaa; }
.search-form input:hover { border-color: #bbb; }
.search-form input:focus { border-color: #666; box-shadow: 0 0 0 3px rgba(0,0,0,0.07); }

.search-form button {
    background-color: #1a1a1a;
    color: #f4f4f4;
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    font-size: 14px;
    cursor: pointer;
    transition: opacity 0.15s;
}

.search-form button:hover { opacity: 0.8; }

.sidebar-columns { display: flex; gap: 12px; margin-top: 10px; }

.category-list { width: 60%; padding: 0; margin: 0; list-style: none; }
.category-list li { list-style: none; padding-bottom: 8px; }
.category-list a { display: block; color: black; text-decoration: none; font-size: 12px; }
.category-list a:hover { font-weight: bold; }

.size-list { width: 40%; padding: 0 0 0 12px; margin: 0; border-left: 2px solid #999; list-style: none; }
.size-list-header { font-weight: bold; font-size: 12px; color: #444; padding-bottom: 6px; margin-bottom: 4px; border-bottom: 1px solid #ccc; }
.size-list li { padding-bottom: 4px; }
.size-list li a { display: block; padding: 2px 0; font-size: 12px; color: #1a1a1a; text-decoration: none; }
.size-list li a:hover, .size-list li a.active { font-weight: bold; color: #ff8000; }

/* совместимость */
.category ul { margin: 0; padding: 0; width: 100%; }
.category li { width: 100%; list-style: none; margin-left: 0; padding-bottom: 8px; }
.category a { display: block; color: black; text-decoration: none; font-size: 12px; }
.category_item { position: relative; }

.subcategory {
    display: none;
    position: static;
    margin: 4px 0 0 8px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    list-style: none;
    padding: 4px;
}

.category_item:hover .subcategory { display: block; }
.subcategory li { padding-bottom: 2px; }
.subcategory a { display: block; padding: 3px 4px; color: #1a1a1a; text-decoration: none; font-size: 11px; }
.subcategory a:hover { font-weight: bold; }
.category-toggle { display: none; }

/* ── Tabs ── */
.tab-content { display: none; }
.tab-content.active { display: block; }
.content h2 { text-align: left; }

/* ── Forms ── */
.form-group { display: flex; flex-direction: column; gap: 4px; margin-bottom: 14px; }
.form-group label { font-size: 13px; font-weight: bold; color: #444; }

.form-group input,
.form-group select,
.form-group textarea {
    appearance: none;
    background-color: #f4f4f4;
    color: #1a1a1a;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 14px;
    font-family: Arial, sans-serif;
    width: 100%;
    max-width: 400px;
    outline: none;
    transition: border-color 0.15s;
}

.form-group input:hover, .form-group select:hover, .form-group textarea:hover { border-color: #bbb; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: #666; box-shadow: 0 0 0 3px rgba(0,0,0,0.07); }
.form-group textarea { resize: vertical; min-height: 80px; }
.form-error { color: #c00; font-size: 12px; }

.btn-submit {
    padding: 10px 28px;
    background: #1a1a1a;
    color: #f4f4f4;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: opacity 0.15s;
}

.btn-submit:hover { opacity: 0.8; }

.btn-download {
    display: inline-block;
    padding: 10px 20px;
    background: #ff8000;
    color: #fff;
    border-radius: 5px;
    text-decoration: none;
    font-size: 14px;
    border: none;
    cursor: pointer;
}

.btn-download:hover { opacity: 0.85; }

/* ── Shared Components ── */
.home-section-title {
    font-size: 18px;
    font-weight: bold;
    color: #1a1a1a;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid #ff8000;
}

.home-cta {
    background: #f4f4f4;
    border-radius: 10px;
    padding: 24px;
    text-align: center;
    border: 1px solid #e0e0e0;
}

.home-cta p { font-size: 16px; font-weight: bold; margin-bottom: 14px; }

.hero-btn-primary {
    padding: 10px 24px;
    background: #ff8000;
    color: #fff;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    font-weight: bold;
}

.hero-btn-primary:hover { opacity: 0.85; }

.hero-btn-secondary {
    padding: 10px 24px;
    background: transparent;
    color: #fff;
    border: 2px solid #fff;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
}

.hero-btn-secondary:hover { background: rgba(255,255,255,0.1); }

.steps { display: flex; flex-direction: column; gap: 24px; margin-top: 20px; }

.step {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    background: #f4f4f4;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
}

.step-number {
    min-width: 40px;
    height: 40px;
    background: #666;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: bold;
    flex-shrink: 0;
}

.step-text h3 { font-size: 16px; margin-bottom: 6px; }
.step-text p { color: #555; margin-bottom: 12px; font-size: 14px; }

.office { display: flex; flex-direction: column; gap: 12px; }

.office a {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #1a1a1a;
    font-size: 15px;
}

.office a i { width: 20px; text-align: center; font-size: 16px; }
.office a:hover { color: #ff8000; }
.office a .fa-whatsapp { color: #25D366; }
.office a .fa-envelope { color: #666; }
.office a .fa-phone    { color: #666; }

/* ── Page: Главная ── */
.home-hero {
    text-align: center;
    padding: 40px 20px 30px;
    background: linear-gradient(135deg, #1a1a1a 0%, #444 100%);
    border-radius: 12px;
    color: #fff;
    margin-bottom: 32px;
}

.home-hero h1 { font-size: 36px; margin-bottom: 12px; color: #ff8000; }
.home-hero p { font-size: 15px; color: #ddd; max-width: 600px; margin: 0 auto 24px; line-height: 1.6; }
.home-hero-btns { display: flex; gap: 12px; justify-content: center; }

.home-services {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 32px;
}

.home-service-card {
    background: #f4f4f4;
    border-radius: 10px;
    padding: 18px 14px;
    text-align: center;
    border: 1px solid #e0e0e0;
    transition: box-shadow 0.15s;
}

.home-service-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.service-icon { font-size: 28px; margin-bottom: 10px; }
.home-service-card h3 { font-size: 13px; margin-bottom: 8px; }
.home-service-card p { font-size: 12px; color: #666; line-height: 1.5; }

.info {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-top: 24px;
}

.info-container {
    background: #fff;
    border-radius: 12px;
    padding: 20px 16px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.info-container img { width: 80px; height: 80px; object-fit: contain; }
.info-container p { font-size: 13px; color: #444; line-height: 1.5; }
.info-container strong { display: block; font-size: 14px; margin-bottom: 6px; line-height: 1.4; }

/* ── Page: О нас ── */
.about-lead {
    font-size: 14px;
    color: #333;
    line-height: 1.7;
    background: #f4f4f4;
    border-left: 3px solid #ff8000;
    padding: 12px 16px;
    border-radius: 0 6px 6px 0;
}

.about-steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.about-step { background: #fff; border: 1px solid #e0e0e0; border-radius: 8px; padding: 14px; text-align: center; }

.about-step-num {
    width: 32px;
    height: 32px;
    background: #1a1a1a;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
    margin: 0 auto 10px;
}

.about-step p { font-size: 12px; color: #555; line-height: 1.5; }

.about-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 20px; }

.about-col { background: #f4f4f4; border-radius: 8px; padding: 16px; border: 1px solid #e0e0e0; }

.about-col-title { font-weight: bold; font-size: 14px; margin-bottom: 10px; padding-bottom: 8px; border-bottom: 2px solid #ff8000; }

.about-list { list-style: none; padding: 0; margin: 0; }
.about-list li { font-size: 13px; color: #444; padding: 4px 0 4px 16px; position: relative; line-height: 1.5; }
.about-list li::before { content: '—'; position: absolute; left: 0; color: #ff8000; }

.about-note { background: #fff8f0; border: 1px solid #ffd199; border-radius: 8px; padding: 14px 16px; font-size: 13px; color: #555; line-height: 1.6; margin-bottom: 8px; }

/* ── Page: Контакты ── */
.contacts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 8px; }

.contacts-card { background: #f4f4f4; border: 1px solid #e0e0e0; border-radius: 10px; padding: 20px; }
.contacts-card-icon { font-size: 28px; margin-bottom: 10px; }
.contacts-card h3 { font-size: 15px; margin-bottom: 10px; padding-bottom: 8px; border-bottom: 2px solid #ff8000; }
.contacts-card p { font-size: 13px; color: #555; line-height: 1.6; }

/* ── Page: Тарифы ── */
.tariff-included { background: #f0f7f0; border: 1px solid #c3e6c3; border-radius: 10px; padding: 16px 20px; margin-bottom: 24px; }
.tariff-included-title { font-weight: bold; font-size: 14px; margin-bottom: 12px; }
.tariff-included-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 24px; }
.tariff-included-grid span { font-size: 13px; color: #444; line-height: 1.6; }

.tariffs-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }

.tariff-card { background: #f4f4f4; border: 1px solid #e0e0e0; border-radius: 10px; padding: 24px 20px; position: relative; text-align: center; }
.tariff-card-featured { background: #1a1a1a; border-color: #1a1a1a; }

.tariff-badge { position: absolute; top: -10px; left: 50%; transform: translateX(-50%); background: #ff8000; color: #fff; font-size: 11px; font-weight: bold; padding: 3px 12px; border-radius: 20px; white-space: nowrap; }

.tariff-name { font-size: 18px; font-weight: bold; margin-bottom: 16px; }
.tariff-card-featured .tariff-name { color: #fff; }

.tariff-prices { background: #fff; border-radius: 8px; padding: 12px; margin-bottom: 16px; }
.tariff-card-featured .tariff-prices { background: rgba(255,255,255,0.1); }

.tariff-price-row { display: flex; justify-content: space-between; align-items: center; padding: 4px 0; font-size: 13px; border-bottom: 1px solid #f0f0f0; }
.tariff-price-row:last-child { border-bottom: none; }
.tariff-card-featured .tariff-price-row { border-bottom-color: rgba(255,255,255,0.1); }
.tariff-price-row span { color: #666; }
.tariff-card-featured .tariff-price-row span { color: #aaa; }
.tariff-price-row strong { color: #1a1a1a; font-size: 14px; }
.tariff-card-featured .tariff-price-row strong { color: #fff; }

.tariff-price-year { background: #fff8f0; border-radius: 4px; padding: 6px 4px !important; margin-top: 4px; }
.tariff-card-featured .tariff-price-year { background: rgba(255,128,0,0.15); }
.tariff-price-year strong { color: #ff8000 !important; }

.tariff-list { list-style: none; padding: 0; margin: 0; text-align: left; }
.tariff-list li { font-size: 13px; color: #555; padding: 5px 0 5px 16px; position: relative; line-height: 1.4; }
.tariff-card-featured .tariff-list li { color: #ddd; }
.tariff-list li::before { content: '✓'; position: absolute; left: 0; color: #ff8000; font-weight: bold; }

.tariff-extra-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.tariff-extra-card { background: #f4f4f4; border: 1px solid #e0e0e0; border-radius: 8px; padding: 16px; }
.tariff-extra-name { font-weight: bold; font-size: 13px; margin-bottom: 10px; padding-bottom: 8px; border-bottom: 2px solid #ff8000; }
.tariff-extra-list { list-style: none; padding: 0; margin: 0; }
.tariff-extra-list li { font-size: 12px; color: #555; padding: 4px 0; line-height: 1.5; }

/* ── Page: Заявки ── */
.applications-hint { font-size: 14px; color: #555; margin-bottom: 20px; }
.applications-hint a { color: #ff8000; text-decoration: none; font-weight: bold; margin-left: 12px; }
.applications-hint a:first-of-type { margin-left: 0; }
.applications-hint .fa-whatsapp { color: #25D366; }

.applications-filter { display: flex; gap: 8px; margin-bottom: 16px; }

.applications-filter select {
    appearance: none;
    background-color: #f4f4f4;
    color: #1a1a1a;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 7px 36px 7px 14px;
    font-size: 13px;
    cursor: pointer;
    outline: none;
    min-width: 180px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23888' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
}

.applications-filter select:hover { border-color: #bbb; }

.applications-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.request-card { background: #f4f4f4; border: 1px solid #ddd; border-radius: 8px; padding: 16px; position: relative; }
.request-number { position: absolute; top: 10px; right: 12px; font-size: 12px; color: #999; font-weight: bold; }
.request-card p { margin-bottom: 6px; font-size: 14px; }
.request-card a { color: #ff8000; text-decoration: none; font-size: 14px; }
.request-date { color: #999; font-size: 12px; margin-top: 8px; }

/* ── Footer ── */
footer { margin: 0; background-color: #1a1a1a; color: #ccc; }

.footer-inner { display: flex; align-items: center; justify-content: space-between; padding: 20px 30px; gap: 20px; border-bottom: 1px solid #333; }

.footer-brand { display: flex; flex-direction: column; gap: 4px; }
.footer-logo { font-size: 18px; font-weight: bold; color: #ff8000; }
.footer-tagline { font-size: 11px; color: #888; }

.footer-contacts { display: flex; gap: 20px; }
.footer-contacts a { color: #ccc; text-decoration: none; font-size: 13px; display: flex; align-items: center; gap: 6px; }
.footer-contacts a:hover { color: #ff8000; }
.footer-contacts .fa-whatsapp { color: #25D366; }

.footer-navigation { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; text-align: right; }
.footer-navigation li a { color: #888; text-decoration: none; font-size: 12px; }
.footer-navigation li a:hover { color: #fff; }

.footer-bottom { padding: 12px 30px; text-align: center; }
.footer-bottom p { font-size: 11px; color: #555; }