/* ============================================================
   DSG STYLESHEET
   ATSG / SONNAX / TOP GEAR  —  Professional Automotive Style
   Full adaptive, mobile-first, no class names changed.
   ============================================================ */

/* ---------- RESET / BASE ---------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #f5f7fa;
    font-family: 'Segoe UI', Roboto, system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    color: #1a2332;
    padding: 0 0 20px 0;
}

/* ---------- TYPOGRAPHY ---------- */
h1, h2, h3, h4 {
    font-weight: 700;
    letter-spacing: -0.02em;
}

h1 span {
    text-shadow: 1px 1px 0 rgba(0,51,102,0.15);
}

h2 {
    font-size: 1.8rem;
    margin-bottom: 0.75rem;
}

h3 {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
}

p {
    margin-bottom: 1rem;
}

a {
    color: #0057a3;
    text-decoration: none;
    transition: color 0.2s, border-bottom 0.2s;
    border-bottom: 1px solid transparent;
}

a:hover {
    color: #003366;
    border-bottom-color: #003366;
}

ul, ol {
    padding-left: 1.5rem;
    margin-bottom: 1.25rem;
}

li {
    margin-bottom: 0.4rem;
}

/* ---------- LAYOUT CONTAINERS ---------- */
div[style*="max-width: 800px"] {
    max-width: 1100px !important;
    width: 92%;
    padding: 0 1rem !important;
}

/* ---------- MAIN HEADER ---------- */
h1[style*="text-align: center"] {
    background: linear-gradient(145deg, #e6f0fa 0%, #c8dbe9 100%) !important;
    padding: 30px 20px !important;
    margin: 0 0 20px 0 !important;
    border-bottom: 4px solid #003366;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    position: relative;
}

h1[style*="text-align: center"] span {
    font-size: 2.4rem !important;
    letter-spacing: 1px;
    text-shadow: 0 2px 4px rgba(0,51,102,0.2);
}

/* ---------- TAB SECTION (main card) ---------- */
.tab-section {
    background: #ffffff !important;
    border: none !important;
    border-radius: 16px !important;
    padding: 30px 25px !important;
    margin: 30px 0 !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.07), 0 2px 8px rgba(0,0,0,0.03);
    transition: transform 0.2s ease, box-shadow 0.3s ease;
}

.tab-section:hover {
    box-shadow: 0 16px 40px rgba(0,0,0,0.09);
}

.tab-section h2 {
    font-size: 2rem;
    border-bottom: 4px solid #003366 !important;
    padding-bottom: 14px !important;
    margin-bottom: 1.5rem !important;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    letter-spacing: 0.5px;
}

/* ---------- TECHNICAL CONTENT ---------- */
.technical-content {
    background: #fafcff;
    padding: 20px 15px;
    border-radius: 14px;
    border-left: 6px solid #003366;
    margin: 20px 0;
}

.technical-content img {
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
    background: #fff;
    padding: 6px;
    border: 1px solid #e9edf4;
    max-width: 100%;
}

.technical-content p {
    font-size: 1.05rem !important;
    color: #1a2a3a !important;
    max-width: 750px;
    margin: 16px auto 0;
    background: rgba(0,51,102,0.04);
    padding: 14px 20px;
    border-radius: 10px;
}

/* ---------- SPECS BLOCK ---------- */
.specs-block {
    background: linear-gradient(135deg, #f2f6fc 0%, #e9eff6 100%) !important;
    border-radius: 14px !important;
    padding: 25px 20px !important;
    border: 1px solid #dce3ec;
    margin: 25px 0 !important;
}

.specs-block h3 {
    font-size: 1.6rem;
    color: #003366;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 1rem;
}

.specs-block table {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.04);
}

.specs-block table th {
    background: #003366 !important;
    color: #fff !important;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    font-size: 0.9rem;
    padding: 14px 16px !important;
}

.specs-block table td {
    padding: 12px 16px !important;
    border-bottom: 1px solid #e9edf4 !important;
    font-weight: 500;
}

.specs-block table tr:last-child td {
    border-bottom: none !important;
}

.specs-block table tr:nth-child(even) td {
    background: #f8faff;
}

/* ---------- MAINTENANCE TIPS ---------- */
.maintenance-tips {
    background: linear-gradient(135deg, #e5f0fd 0%, #d3e4f5 100%) !important;
    border-radius: 14px !important;
    padding: 25px 20px !important;
    border: 1px solid #b8cee5;
    margin-top: 25px !important;
}

.maintenance-tips h3 {
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.maintenance-tips ul {
    list-style: none !important;
    padding-left: 0 !important;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px 30px;
    margin: 10px 0 0;
}

.maintenance-tips ul li {
    background: #ffffff;
    padding: 10px 22px;
    border-radius: 40px;
    font-weight: 600;
    color: #003366;
    box-shadow: 0 2px 6px rgba(0,51,102,0.10);
    border-left: 4px solid #003366;
    font-size: 0.95rem;
}

/* ---------- CONSTRUCTION DETAILS ---------- */
.construction-details {
    background: #ffffff;
    border-radius: 16px;
    padding: 30px 25px !important;
    box-shadow: 0 8px 24px rgba(0,0,0,0.05);
    margin: 30px 0 !important;
}

.construction-details h2 {
    font-size: 2rem;
    border-bottom: 3px solid #003366;
    padding-bottom: 12px;
    display: inline-block;
    margin-bottom: 1.5rem;
}

.construction-details > div[style*="display: grid"] {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 30px !important;
    align-items: center;
}

.construction-details img {
    border-radius: 14px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.07);
    border: 1px solid #e9edf4;
    background: #fff;
    padding: 5px;
}

.construction-details h3 {
    font-size: 1.4rem;
    color: #003366;
    margin-bottom: 0.75rem;
}

.construction-details ul {
    list-style: none;
    padding-left: 0;
}

.construction-details ul li {
    padding: 8px 0 8px 32px;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="%23003366" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"></polyline></svg>') left center no-repeat;
    background-size: 18px;
    font-weight: 500;
    border-bottom: 1px solid #eef3f8;
}

/* ---------- OPERATION PRINCIPLE ---------- */
.operation-principle {
    background: linear-gradient(145deg, #fff6ea 0%, #faeade 100%) !important;
    border-radius: 16px !important;
    padding: 30px 25px !important;
    border: 1px solid #f0dcc8;
    margin: 30px 0 !important;
}

.operation-principle h2 {
    color: #003366;
    font-size: 2rem;
    border-bottom: 3px solid #b87333;
    padding-bottom: 12px;
    display: inline-block;
}

.operation-principle > div {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 30px !important;
    align-items: center;
    margin-top: 15px;
}

.operation-principle img {
    border-radius: 14px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.07);
    border: 1px solid #e6d6c4;
}

.operation-principle p {
    background: rgba(255,255,255,0.7);
    padding: 18px 22px;
    border-radius: 12px;
    backdrop-filter: blur(2px);
    font-size: 1.05rem;
    border-left: 6px solid #b87333;
}

/* ---------- GEAR TABLE ---------- */
.gear-table {
    background: #ffffff;
    border-radius: 16px;
    padding: 30px 25px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.05);
    margin: 30px 0 !important;
}

.gear-table h3 {
    font-size: 1.8rem;
    color: #003366;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.gear-table table {
    background: #fafcff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.04);
}

.gear-table table th {
    background: #003366 !important;
    color: #fff !important;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 14px 20px !important;
}

.gear-table table td {
    padding: 12px 20px !important;
    border-bottom: 1px solid #e9edf4 !important;
    font-weight: 500;
    text-align: center;
}

.gear-table table tr:last-child td {
    border-bottom: none;
}

.gear-table table tr:nth-child(even) td {
    background: #f4f8fe;
}

/* ---------- LUBRICATION SYSTEM ---------- */
.lubrication-system {
    background: linear-gradient(145deg, #f2f6fc 0%, #e4ebf3 100%) !important;
    border-radius: 16px !important;
    padding: 30px 25px !important;
    border: 1px solid #cdd9e6;
    margin: 30px 0 !important;
}

.lubrication-system h3 {
    font-size: 1.8rem;
    color: #003366;
    display: flex;
    align-items: center;
    gap: 12px;
}

.lubrication-system > div {
    display: grid !important;
    grid-template-columns: 200px 1fr !important;
    gap: 30px !important;
    align-items: center;
    margin-top: 15px;
}

.lubrication-system img {
    border-radius: 14px;
    box-shadow: 0 6px 16px rgba(0,0,0,0.07);
    border: 1px solid #d2dce8;
    background: #fff;
    padding: 4px;
}

.lubrication-system p {
    background: #ffffff;
    padding: 18px 24px;
    border-radius: 12px;
    border-left: 6px solid #003366;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

/* ---------- MECHATRONIC BLOCK ---------- */
.mechatronic-block {
    background: #ffffff;
    border-radius: 16px;
    padding: 30px 25px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.05);
    margin: 30px 0 !important;
}

.mechatronic-block h3 {
    font-size: 1.8rem;
    color: #003366;
    display: flex;
    align-items: center;
    gap: 12px;
}

.mechatronic-block > div {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 30px !important;
    align-items: center;
    margin-top: 15px;
}

.mechatronic-block img {
    border-radius: 14px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.07);
    border: 1px solid #e9edf4;
    background: #fff;
    padding: 6px;
    max-width: 100%;
}

.mechatronic-block ul {
    list-style: none;
    padding-left: 0;
}

.mechatronic-block ul li {
    padding: 10px 0 10px 36px;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="%23003366" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><rect x="2" y="7" width="20" height="14" rx="2" ry="2"></rect><path d="M16 21V5a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16"></path></svg>') left center no-repeat;
    background-size: 22px;
    font-weight: 500;
    border-bottom: 1px solid #edf2f8;
}

/* ---------- CONCLUSION (blue banner) ---------- */
.conclusion {
    background: linear-gradient(145deg, #003366 0%, #001f3f 100%) !important;
    color: #ffffff !important;
    border-radius: 16px !important;
    padding: 35px 25px !important;
    text-align: center !important;
    box-shadow: 0 12px 32px rgba(0,51,102,0.25);
    margin: 30px 0 !important;
}

.conclusion h3 {
    font-size: 2rem;
    color: #fff !important;
    letter-spacing: 0.5px;
}

.conclusion > div {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 20px !important;
    margin-top: 25px !important;
}

.conclusion > div > div {
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(4px);
    padding: 18px 12px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.12);
    transition: transform 0.2s, background 0.2s;
}

.conclusion > div > div:hover {
    background: rgba(255,255,255,0.15);
    transform: translateY(-3px);
}

.conclusion > div > div div {
    font-size: 2.4rem !important;
    line-height: 1.2;
}

.conclusion > div > div p {
    font-size: 1rem;
    font-weight: 600;
    margin: 6px 0 0;
    color: #f0f8ff;
}

/* ---------- FOOTER LOGO ---------- */
div[style*="background: #003366; color: white; text-align: center; padding: 20px"] {
    background: linear-gradient(145deg, #002b4d 0%, #001a33 100%) !important;
    border-radius: 16px 16px 0 0;
    margin-top: 40px !important;
    padding: 30px 20px !important;
}

div[style*="background: #003366; color: white; text-align: center; padding: 20px"] img {
    width: 140px !important;
    filter: brightness(0) invert(1);
    opacity: 0.9;
}

/* ---------- ADDITIONAL CONTENT BLOCKS (from bottom) ---------- */
/* inline styles for tables, headings etc — we enhance them */
table[style*="margin-left: auto; margin-right: auto;"] {
    background: #ffffff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
    border-collapse: collapse !important;
    width: 100%;
    max-width: 700px;
}

table[style*="margin-left: auto; margin-right: auto;"] td {
    padding: 12px 18px !important;
    border-bottom: 1px solid #e9edf4 !important;
    font-weight: 500;
}

table[style*="margin-left: auto; margin-right: auto;"] tr:first-child td {
    background: #003366;
    color: #fff;
    font-weight: 700;
    font-size: 1.05rem;
}

/* blockquotes */
blockquote {
    background: #eef4fa;
    border-left: 6px solid #003366;
    padding: 18px 24px;
    border-radius: 0 14px 14px 0;
    margin: 25px 0;
}

blockquote p {
    margin: 0;
    font-size: 1.1rem;
}

/* hr */
hr {
    border: none;
    height: 3px;
    background: linear-gradient(90deg, transparent, #003366, transparent);
    margin: 30px 0;
    opacity: 0.25;
}

/* images inside text */
img[style*="display: block; margin-left: auto; margin-right: auto;"] {
    border-radius: 14px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.06);
    border: 1px solid #e9edf4;
    background: #fff;
    padding: 6px;
    max-width: 100%;
    height: auto;
}

/* seo block */
div[style*="background: #2c3e50; color: white; padding: 30px; border-radius: 12px;"] {
    background: linear-gradient(145deg, #1e2a3a 0%, #0f1722 100%) !important;
    border-radius: 16px !important;
    padding: 30px 25px !important;
}

div[style*="background: #2c3e50; color: white; padding: 30px; border-radius: 12px;"] h3 {
    color: #ffffff !important;
}

div[style*="background: #2c3e50; color: white; padding: 30px; border-radius: 12px;"] ul {
    columns: 2;
    column-gap: 40px;
    list-style: none;
    padding-left: 0;
}

div[style*="background: #2c3e50; color: white; padding: 30px; border-radius: 12px;"] ul li {
    padding: 6px 0 6px 28px;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="%23ecf0f1" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"></polyline></svg>') left center no-repeat;
    background-size: 16px;
    color: #ecf0f1;
}

/* "Читайте также" */
div[style*="background: #f4f4f4; padding: 30px; margin-top: 40px; border-radius: 12px;"] {
    background: #f8faff !important;
    border-radius: 16px !important;
    padding: 30px 25px !important;
    border: 1px solid #e2e8f0;
}

div[style*="background: #f4f4f4; padding: 30px; margin-top: 40px; border-radius: 12px;"] h3 {
    color: #003366 !important;
}

div[style*="background: #f4f4f4; padding: 30px; margin-top: 40px; border-radius: 12px;"] ul {
    columns: 2;
    column-gap: 40px;
    list-style: none;
    padding-left: 0;
}

div[style*="background: #f4f4f4; padding: 30px; margin-top: 40px; border-radius: 12px;"] ul li {
    padding: 6px 0 6px 28px;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="%23003366" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"></polyline></svg>') left center no-repeat;
    background-size: 16px;
}

div[style*="background: #f4f4f4; padding: 30px; margin-top: 40px; border-radius: 12px;"] ul li a {
    font-weight: 500;
}

/* ---------- RESPONSIVE: TABLETS & MOBILE ---------- */
@media screen and (max-width: 992px) {
    .construction-details > div[style*="display: grid"],
    .operation-principle > div,
    .mechatronic-block > div {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }

    .lubrication-system > div {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }

    .lubrication-system img {
        max-width: 260px;
        margin: 0 auto;
    }

    .conclusion > div {
        grid-template-columns: 1fr 1fr !important;
    }

    h1[style*="text-align: center"] span {
        font-size: 2rem !important;
    }

    .tab-section h2 {
        font-size: 1.7rem;
    }

    .gear-table h3,
    .mechatronic-block h3,
    .lubrication-system h3 {
        font-size: 1.5rem;
    }
}

@media screen and (max-width: 768px) {
    body {
        padding: 0 0 10px 0;
    }

    div[style*="max-width: 800px"] {
        width: 98%;
        padding: 0 0.5rem !important;
    }

    .tab-section {
        padding: 20px 15px !important;
        margin: 20px 0 !important;
    }

    .tab-section h2 {
        font-size: 1.4rem;
        flex-wrap: wrap;
    }

    .technical-content p {
        font-size: 0.95rem !important;
        padding: 12px 16px;
    }

    .specs-block h3 {
        font-size: 1.3rem;
        flex-wrap: wrap;
    }

    .specs-block table th,
    .specs-block table td {
        padding: 10px 12px !important;
        font-size: 0.85rem;
    }

    .maintenance-tips ul {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .maintenance-tips ul li {
        text-align: center;
        padding: 10px 16px;
    }

    .construction-details {
        padding: 20px 15px !important;
    }

    .construction-details h2 {
        font-size: 1.5rem;
    }

    .operation-principle {
        padding: 20px 15px !important;
    }

    .operation-principle h2 {
        font-size: 1.5rem;
    }

    .operation-principle p {
        font-size: 0.95rem;
        padding: 14px 18px;
    }

    .gear-table {
        padding: 20px 15px !important;
    }

    .gear-table h3 {
        font-size: 1.4rem;
    }

    .gear-table table th,
    .gear-table table td {
        padding: 10px 12px !important;
        font-size: 0.85rem;
    }

    .lubrication-system {
        padding: 20px 15px !important;
    }

    .lubrication-system h3 {
        font-size: 1.3rem;
    }

    .mechatronic-block {
        padding: 20px 15px !important;
    }

    .mechatronic-block h3 {
        font-size: 1.3rem;
    }

    .conclusion {
        padding: 25px 15px !important;
    }

    .conclusion h3 {
        font-size: 1.5rem;
    }

    .conclusion > div {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }

    .conclusion > div > div {
        padding: 14px 10px;
    }

    .conclusion > div > div div {
        font-size: 2rem !important;
    }

    div[style*="background: #2c3e50; color: white; padding: 30px; border-radius: 12px;"] ul,
    div[style*="background: #f4f4f4; padding: 30px; margin-top: 40px; border-radius: 12px;"] ul {
        columns: 1;
        column-gap: 0;
    }

    div[style*="background: #2c3e50; color: white; padding: 30px; border-radius: 12px;"],
    div[style*="background: #f4f4f4; padding: 30px; margin-top: 40px; border-radius: 12px;"] {
        padding: 20px 15px !important;
    }

    h1[style*="text-align: center"] {
        padding: 20px 12px !important;
    }

    h1[style*="text-align: center"] span {
        font-size: 1.7rem !important;
    }

    table[style*="margin-left: auto; margin-right: auto;"] td {
        padding: 8px 12px !important;
        font-size: 0.85rem;
    }

    blockquote {
        padding: 14px 18px;
        font-size: 0.95rem;
    }

    hr {
        margin: 20px 0;
    }

    .construction-details ul li,
    .mechatronic-block ul li {
        font-size: 0.95rem;
        padding: 8px 0 8px 30px;
        background-size: 18px;
    }
}

@media screen and (max-width: 480px) {
    h1[style*="text-align: center"] span {
        font-size: 1.4rem !important;
    }

    .tab-section h2 {
        font-size: 1.2rem;
    }

    .specs-block table th,
    .specs-block table td,
    .gear-table table th,
    .gear-table table td {
        font-size: 0.75rem;
        padding: 8px 8px !important;
    }

    .conclusion h3 {
        font-size: 1.2rem;
    }

    .lubrication-system > div {
        grid-template-columns: 1fr !important;
    }

    .lubrication-system img {
        max-width: 180px;
    }

    .operation-principle > div {
        grid-template-columns: 1fr !important;
    }

    .mechatronic-block > div {
        grid-template-columns: 1fr !important;
    }

    .construction-details > div[style*="display: grid"] {
        grid-template-columns: 1fr !important;
    }

    .technical-content p {
        font-size: 0.85rem !important;
        padding: 10px 14px;
    }

    .maintenance-tips ul li {
        font-size: 0.85rem;
        padding: 8px 14px;
    }

    div[style*="background: #003366; color: white; text-align: center; padding: 20px"] {
        padding: 20px 12px !important;
    }

    div[style*="background: #003366; color: white; text-align: center; padding: 20px"] img {
        width: 100px !important;
    }

    .mechatronic-block ul li {
        font-size: 0.85rem;
        padding: 6px 0 6px 28px;
        background-size: 16px;
    }

    .construction-details ul li {
        font-size: 0.85rem;
        padding: 6px 0 6px 28px;
        background-size: 16px;
    }

    table[style*="margin-left: auto; margin-right: auto;"] td {
        font-size: 0.75rem;
        padding: 6px 8px !important;
    }
}

/* ---------- PRINT / ACCESSIBILITY ---------- */
@media print {
    body {
        background: #fff;
        color: #000;
    }
    .tab-section,
    .construction-details,
    .gear-table,
    .mechatronic-block,
    .lubrication-system {
        box-shadow: none !important;
        border: 1px solid #ccc !important;
    }
    .conclusion {
        background: #003366 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}