/* ===== ОСНОВНЫЕ СТИЛИ ===== */
.text-style p {
    color: var(--accent);
}

.servises-block h1 {
    margin-left: 30px;
    margin-bottom: 0;
}

/* ===== КНОПКИ ВЫБОРА СЕРВИСА ===== */
.button-selection {
    width: 270px;
    height: 50px;
    margin-left: 15px;
    margin-top: 15px;
    padding-left: 15px;
    border-radius: var(--br-md);
    border: none;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    transition: 0.3s all;
    background: none;
}

.button-selection svg {
    margin-right: 10px;
}

.button-selection:active svg > path {
    fill: white;
}

.button-selection:hover {
    background-color: #EBF5FE;
}

.button-selection:active {
    background: #479FF8;
}

.button-selection p {
    transition: 0.3s all;
    font-size: var(--font-md);
}

.button-selection:active p {
    color: white;
    fill: white;
}

/* ===== БЛОКИ СЕРВИСОВ ===== */
.service-wrapper {
    width: 100%;
    justify-content: space-between;
}

/* ===== БЛОКИ СЕРВИСОВ ===== */
.servises-block {
    width: 308px;
    height: 301px;
    border-radius: var(--br-xl);
    top: 120px;
    position: sticky;
    background: var(--main);
    overflow-y: auto;           /* ← ДОБАВИТЬ */
    overflow-x: hidden;         /* ← ДОБАВИТЬ */
    display: flex;              /* ← ДОБАВИТЬ */
    flex-direction: column;     /* ← ДОБАВИТЬ */
}

/* Стили скроллбара для ПК */
.servises-block::-webkit-scrollbar {
    width: 6px;
}

.servises-block::-webkit-scrollbar-track {
    background: transparent;
}

.servises-block::-webkit-scrollbar-thumb {
    background: #479FF8;
    border-radius: 3px;
}

.servises-block::-webkit-scrollbar-thumb:hover {
    background: #0081FF;
}


.aboutCompany {
    width: 982px;
    margin-left: var(--m-5xl);
}

.aboutCompany p {
    color: var(--main-text);
}

.icon-border {
    border-radius: var(--br-md);
}

/* ===== ЗАГОЛОВОК СТРАНИЦЫ ===== */
.under-header {
    width: 100%;
    height: 300px;
    position: relative;
    align-items: center;
}

figure.sixteen-nine-img {
    width: 100%;
    overflow: hidden;
    margin: 0;
    padding-top: 56.25%;
    position: relative;
    margin-top: 50px;
    margin-bottom: 50px;
    background: linear-gradient(288.75deg, #595959 2.2%, #3C3C3C 78.38%);
    border-radius: var(--br-xl);
}

figure.sixteen-nine-img img {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    transform: translate(-50%, -50%);
}

/* ===== СОТРУДНИКИ ===== */
.employee_avatar {
    width: 256px;
    height: 256px;
    background: linear-gradient(288.75deg, #595959 2.2%, #3C3C3C 78.38%);
    border-radius: var(--br-xl);
    overflow: hidden;
}

.employees {
    gap: 42px;
}

.w-100 {
    width: 100%;
}

.substrate {
    width: 900px;
    height: 150px;
    border-radius: 15px;
    background-color: var(--main);
}

.substrate-text {
    margin-left: 25px;
}

.adaptive-img-none {
    position: absolute;
    right: 0;
    bottom: 0;
}

/* ===== МЕДИА-ЗАПРОСЫ: 1340px ===== */
@media screen and (max-width: 1340px) {
    .aboutCompany {
        width: 738px;
    }
    
    .substrate {
        width: 550px;
    }
    
    .employee_avatar {
        width: 218px;
        height: 218px;
        display: flex;
        justify-content: center;
    }
    
    /* ← ДОБАВИТЬ */
    .servises-block {
        overflow-y: auto !important;
        overflow-x: hidden !important;
    }
    
    .servises-block::-webkit-scrollbar {
        width: 6px;
    }
    
    .servises-block::-webkit-scrollbar-track {
        background: transparent;
    }
    
    .servises-block::-webkit-scrollbar-thumb {
        background: #479FF8;
        border-radius: 3px;
    }
}


/* ===== МЕДИА-ЗАПРОСЫ: 1100px ===== */
@media screen and (max-width: 1100px) {
    .aboutCompany {
        width: 550px;
    }
    
    .substrate {
        width: 550px;
        position: absolute;
        z-index: 1;
    }
    
    .adaptive-img-none {
        width: 500px;
    }
    
    .employees {
        overflow-x: auto;
    }
    
    /* ← ДОБАВИТЬ */
    .servises-block {
        overflow-y: auto !important;
        overflow-x: hidden !important;
    }
    
    .servises-block::-webkit-scrollbar {
        width: 6px;
    }
    
    .servises-block::-webkit-scrollbar-track {
        background: transparent;
    }
    
    .servises-block::-webkit-scrollbar-thumb {
        background: #479FF8;
        border-radius: 3px;
    }
}


/* ===== МЕДИА-ЗАПРОСЫ: 992px (ПЛАНШЕТ) ===== */
@media screen and (max-width: 992px) {
    .aboutCompany {
        width: 400px;
        margin-left: 0;
    }
    
    .servises-block {
        width: 100%;
        height: 94px;
        margin-bottom: 25px;
        display: flex;
        flex-direction: row;
        align-items: center;
        flex-wrap: nowrap;
        position: static;
        overflow-x: auto;           /* ← ИЗМЕНИТЬ на auto */
        overflow-y: hidden;         /* ← ДОБАВИТЬ */
        padding: 10px 0;            /* ← ДОБАВИТЬ */
    }
    
    /* Стили скроллбара для планшета */
    .servises-block::-webkit-scrollbar {
        height: 4px;
    }
    
    .servises-block::-webkit-scrollbar-track {
        background: transparent;
    }
    
    .servises-block::-webkit-scrollbar-thumb {
        background: #479FF8;
        border-radius: 2px;
    }
    
    .substrate {
        width: 400px;
        height: 200px;
    }
    
    .adaptive-img-none {
        position: absolute;
        right: 0;
        width: 420px;
    }
    
    .service-wrapper {
        flex-direction: column;
    }
    
    .aboutCompany {
        width: 100%;
        margin-left: 0;
    }
    
    .servises-block button {
        flex-shrink: 0;
    }
    
    .servises-block h1 {
        margin-bottom: 0;
        white-space: nowrap;
    }
}


/* ===== МЕДИА-ЗАПРОСЫ: 768px (МОБИЛЬНЫЙ) ===== */
@media screen and (max-width: 768px) {
    .servises-block {
        width: 100%;
        height: auto;
        max-height: 120px;
        margin-bottom: 25px;
        display: flex;
        flex-direction: row;
        align-items: center;
        flex-wrap: nowrap;
        position: static;
        overflow-x: auto !important;
        overflow-y: hidden;
        padding: 10px 0;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Стили скроллбара */
    .servises-block::-webkit-scrollbar {
        height: 4px;
    }
    
    .servises-block::-webkit-scrollbar-track {
        background: transparent;
    }
    
    .servises-block::-webkit-scrollbar-thumb {
        background: #479FF8;
        border-radius: 2px;
    }
    
    /* ← ОДИН блок .button-selection */
    .button-selection {
        width: auto;
        height: auto;
        padding: 10px 15px;
        margin: 8px 5px;
        margin-left: 15px;
        flex-shrink: 0;
        white-space: nowrap;
        border-radius: var(--br-md);
    }
    
    .button-selection p {
        margin: 0;
    }
    
    .servises-block h1 {
        margin-bottom: 0;
        white-space: nowrap;
    }
    
    .new-font-size {
        font-size: var(--font-rt);
    }
    
    .adaptive-img-none {
        display: none;
    }
    
    .service-wrapper {
        flex-direction: column;
    }
    
    .aboutCompany {
        width: 100%;
        margin-left: 0;
        padding: 0 15px;
    }
    
    .employees {
        overflow-x: scroll;
        gap: 20px;
    }
    
    .employee_avatar {
        width: 150px;
        height: 150px;
        flex-shrink: 0;
    }
    
    .substrate {
        background: none;
        width: 100%;
        height: auto;
        padding: 20px 15px;
    }
    
    .under-header {
        height: auto;
        margin-top: 15px;
        margin-bottom: 30px;
        color: #EBF5FE;
        background: linear-gradient(to left, #479FF8, #0081FF);
        border-radius: 15px;
        padding: 30px 15px;
    }
    
    figure.sixteen-nine-img {
        margin-top: 30px;
        margin-bottom: 30px;
    }
}


/* ===== ФОРМА И КОНТАКТЫ ===== */
.data {
    margin-right: 10px;
}

.map {
    width: 100%;
    height: 300px;  
    max-width: 600px;
    border-radius: var(--br-xl);
}

.main-input {
    width: 100%;
    height: 40px;
    border-radius: var(--br-sm);
    padding-left: 10px;
    background: var(--main);
    border: none;
}

.email-margin {
    margin-right: 25px;
}

.second-input {
    width: 99%;
    height: 130px;
    background: var(--main);
    border: solid 1px var(--input-border);
    padding-top: 10px;
    padding-left: 10px;
}

.contacts-data {
    width: 585px;
    margin-left: 20px;  /* ← изменено с 60px */
    padding-top: 0;     /* ← убрал отступ */
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}


.send {
    margin-top: 12px;
}

.footer {
    margin-top: 100px;
}

.comment-input {
    max-width: 100%;
}

.deranged-data {
    width: 700px;
}

/* ===== МЕДИА-ЗАПРОСЫ: КОНТАКТЫ 992px ===== */
@media screen and (max-width: 992px) {
    .contacts-data {
        margin: 0;
        width: 100%;
        align-items: flex-start;
    }
    
    .contacts-text {
        width: 100%;
    }
    
    .deranged-data {
        width: 100%;
    }
    
    .map {
        width: 100%;
        height: 250px;
    }
}

/* ===== МЕДИА-ЗАПРОСЫ: КОНТАКТЫ 768px ===== */
@media screen and (max-width: 768px) {
    .contacts-data {
        width: 100%;
        margin-left: 0;
        padding: 0 15px;
    }
    
    .deranged-data {
        width: 100%;
        padding: 0 15px;
    }
    
    .email-margin {
        margin-right: 0;
    }
    
    .main-input {
        height: 45px;
        font-size: 16px;
    }
    
    .second-input {
        width: 100%;
        height: 120px;
        padding: 10px;
    }
    
    .send {
        margin-top: 8px;  
    }
    
    .input-group {
        margin-bottom: 10px;  
    }
}


/* ===== POPUP И МОДАЛЫ ===== */
.background-popup {
    width: 100%;
    height: 100vh;
    left: 0;
    top: 0;
    background-color: rgba(0, 0, 0, 0.205);
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    z-index: 100;
}

.table-popup {
    width: 400px;
    min-height: 400px;
    padding: 25px;
    position: relative;
    background-color: var(--main);
    border-radius: 10px;
}

@media screen and (max-width: 768px) {
    .table-popup {
        width: 90%;
        min-height: auto;
        max-height: 80vh;
        overflow-y: auto;
    }
}

.redCross {
    position: absolute;
    right: 30px;
    top: 30px;
    cursor: pointer;
}

/* ===== ТАБЛИЦЫ ===== */
.Service {
    margin-right: 400px;
    padding-left: 60px;
    white-space: nowrap;
    vertical-align: top;
}

.active-table {
    border-radius: 10px;
}

.active-table1 {
    border: 1px solid var(--accent);
    border-radius: 10px;
}

.clarification {
    color: var(--second-text);
}

.numbers {
    vertical-align: top;
}

.information-table {
    margin-top: 50px;
    margin-bottom: 50px;
    cursor: pointer;
}

.information-table p {
    font-weight: 400;
    font-size: 16px;
}

.tabular-line {
    width: 100%;
    border-radius: var(--br-md);
    border: 1px solid var(--bg);
    transition: 0.3s all;
}

.modal-table {
    min-width: 400px;
    border-radius: 10px;
    padding: 25px;
    position: fixed;
    margin: auto;
    z-index: 1;
    background-color: var(--main);
}

.tabular-line:hover {
    border: 1px solid var(--accent);
}

.information-table :nth-child(1):hover {
    border: 1px solid var(--bg);
}

.tabular-line > *:nth-child(1) {
    width: 88px;
    display: flex;
    justify-content: center;
}

.tabular-line > *:nth-child(2) {
    width: 168px;
}

.tabular-line > *:nth-child(3) {
    width: 932px;
}

.tabular-line > *:nth-child(4) {
    width: 146px;
    display: flex;
    align-items: center;
}

.tabular-line > *:nth-child(5) {
    width: 146px;
    display: flex;
    align-items: center;
}

@media screen and (max-width: 1200px) {
    .tabular-line > *:nth-child(3) {
        width: 697px;
    }
}

@media screen and (max-width: 992px) {
    .tabular-line > *:nth-child(3) {
        width: 488px;
    }
}

@media screen and (max-width: 768px) {
    .tabular-line > *:nth-child(3) {
        width: 265px;
    }
    
    .information-table {
        margin-top: 30px;
        margin-bottom: 30px;
    }
}

@media screen and (max-width: 576px) {
    .tabular-line > *:nth-child(3) {
        width: 144px;
        margin: 0;
    }
    
    .tabular-line > *:nth-child(1),
    .tabular-line > *:nth-child(2),
    .tabular-line > *:nth-child(4),
    .tabular-line > *:nth-child(5) {
        font-size: 12px;
        width: auto;
    }
}
/* СЕТКА УСЛУГ */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.service-card {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #eee;
    transition: all 0.3s ease;
}

.service-card h3 {
    color: #333;
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0 0 10px 0;
}

.service-card p {
    color: #555;
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0;
}

/* ТЁМНАЯ ТЕМА ДЛЯ УСЛУГ */
body.dark-theme .service-card {
    background: #2d2d2d;
    border-color: #444;
}

body.dark-theme .service-card h3 {
    color: #e0e0e0;
}

body.dark-theme .service-card p {
    color: #b0b0b0;
}

body.dark-theme [style*="color: #333"] {
    color: #e0e0e0 !important;
}

body.dark-theme [style*="color: #555"] {
    color: #b0b0b0 !important;
}

/* ОБНОВЛЕННЫЙ TEMPLATE.CSS - ТОЛЬКО НОВЫЕ СТИЛИ ДЛЯ УСЛУГ */

/* ===== СЕТКА УСЛУГ ===== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 30px;
    margin-bottom: 40px;
}

.service-card {
    background: var(--main);
    border: 1px solid var(--input-border);
    border-radius: var(--br-xl);
    padding: var(--m-2xl);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    min-height: 400px;
}

.service-card:hover {
    border-color: var(--accent);
    box-shadow: 0 8px 24px rgba(71, 159, 248, 0.15);
    transform: translateY(-4px);
}

/* ЗАГОЛОВОК */
.service-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--m-md);
    gap: var(--m-md);
}

.service-header h3 {
    color: var(--accent);
    font-size: var(--font-rt);
    font-weight: var(--font-bold);
    margin: 0;
    flex: 1;
    line-height: 1.3;
}

.service-badge {
    background: #E8F0FF;
    color: var(--accent);
    padding: 4px 12px;
    border-radius: var(--br-sm);
    font-size: var(--font-xs);
    font-weight: var(--font-bold);
    white-space: nowrap;
    flex-shrink: 0;
}

/* ОПИСАНИЕ */
.service-card .description {
    color: var(--second-text);
    font-size: var(--font-sm);
    line-height: 1.6;
    margin: 0 0 var(--m-xl) 0;
    flex-grow: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

/* ФИШКИ */
.service-features {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: var(--m-xl);
    padding: var(--m-md);
    background: var(--bg);
    border-radius: var(--br-md);
    border-left: 3px solid var(--accent);
}

.feature-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: var(--font-xs);
    gap: var(--m-md);
}

.feature-label {
    color: var(--second-text);
    font-weight: var(--font-bold);
    min-width: 100px;
}

.feature-value {
    color: var(--main-text);
    font-weight: 500;
    text-align: right;
}

.feature-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: var(--font-bold);
    background: #FFD4D4;
    color: #A01010;
    white-space: nowrap;
}

.feature-badge.active {
    background: #D4FFD4;
    color: #107A10;
}

/* КНОПКИ */
.service-actions {
    display: flex;
    gap: var(--m-md);
    margin-top: auto;
}

.btn-document,
.btn-detail {
    flex: 1;
    padding: 10px 12px;
    border-radius: var(--br-sm);
    text-decoration: none;
    font-weight: 500;
    font-size: var(--font-sm);
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    display: block;
}

.btn-document {
    background: transparent;
    color: var(--accent);
    border: 1px solid var(--accent);
}

.btn-document:hover {
    background: var(--accent);
    color: var(--main);
}

.btn-detail {
    background: linear-gradient(135deg, var(--accent) 0%, var(--blue-bg) 100%);
    color: var(--main);
}

.btn-detail:hover {
    background: linear-gradient(135deg, var(--blue-bg) 0%, var(--dark-blue-bg) 100%);
    transform: scale(1.02);
}

/* ===== ТАБЛИЦА ===== */
.services-table-title {
    font-size: var(--font-xl2);
    color: var(--main-text);
    margin-top: var(--m-5xl);
    margin-bottom: var(--m-2xl);
    border-bottom: 2px solid var(--accent);
    padding-bottom: var(--m-md);
}

.services-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--main);
    border-radius: var(--br-md);
    overflow: hidden;
    margin-bottom: var(--m-5xl);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.services-table thead {
    background: linear-gradient(135deg, var(--accent) 0%, var(--blue-bg) 100%);
}

.services-table th {
    color: var(--main);
    padding: var(--m-md) var(--m-xl);
    text-align: left;
    font-weight: var(--font-bold);
    font-size: var(--font-sm);
}

.services-table td {
    padding: var(--m-md) var(--m-xl);
    border-bottom: 1px solid var(--input-border);
    color: var(--main-text);
    font-size: var(--font-sm);
}

.services-table tbody tr:hover {
    background: var(--bg);
}

.table-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: var(--font-bold);
    transition: all 0.3s ease;
}

.table-link:hover {
    text-decoration: underline;
}

/* ===== CTA БЛОК ===== */
.services-cta {
    margin-top: var(--m-5xl);
    padding: var(--m-4xl);
    background: linear-gradient(135deg, var(--accent) 0%, var(--blue-bg) 100%);
    border-radius: var(--br-xl);
    text-align: center;
    color: var(--main);
    box-shadow: 0 4px 20px rgba(71, 159, 248, 0.25);
}

.services-cta h2 {
    color: var(--main);
    margin: 0 0 var(--m-md) 0;
    border: none;
    padding: 0;
    font-size: var(--font-xl2);
}

.services-cta p {
    color: rgba(255, 255, 255, 0.95);
    margin: 0 0 var(--m-2xl) 0;
    font-size: var(--font-md);
    line-height: 1.6;
}

.btn-cta {
    display: inline-block;
    background: var(--main);
    color: var(--accent);
    padding: var(--m-md) var(--m-3xl);
    border-radius: var(--br-sm);
    text-decoration: none;
    font-weight: var(--font-bold);
    font-size: var(--font-md);
    transition: all 0.3s ease;
    border: 2px solid var(--main);
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn-cta:hover {
    background: transparent;
    color: var(--main);
    border-color: var(--main);
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.3);
}

/* ===== МЕДИА: 768px ===== */
@media screen and (max-width: 768px) {
    .services-grid {
        grid-template-columns: 1fr;
        gap: var(--m-2xl);
    }

    .service-card {
        min-height: auto;
    }

    .service-header {
        flex-direction: column;
    }

    .service-badge {
        align-self: flex-start;
    }

    .service-actions {
        flex-direction: column;
    }

    .btn-document,
    .btn-detail {
        width: 100%;
    }

    .services-cta {
        padding: var(--m-2xl);
    }

    .btn-cta {
        display: block;
        width: 100%;
    }
}
