* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #780B10;
    --primary-dark: #5a080c;
    --primary-light: #9e1117;
    --dark: #1a1a1a;
    --gray-dark: #333333;
    --gray: #666666;
    --gray-light: #999999;
    --light: #f5f5f5;
    --white: #ffffff;
    --shadow-sm: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
}

/* ========== БАЗОВЫЕ СТИЛИ ========== */
html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--dark);
    line-height: 1.5;
    background-color: var(--light);
    min-height: 100vh;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 30px;
}

/* ========== ТИПОГРАФИКА ========== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
}

.highlight {
    color: var(--primary);
}

.section-subtitle {
    display: inline-block;
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--primary);
    margin-bottom: 15px;
}

/* ========== HEADER ========== */
.header1 {
    position: fixed;
    width: 100%;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    top: 0;
    left: 0;
}

.header-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo-full {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo img {
    height: 50px;
    width: auto;
}

.brand-name {
    font-size: 30px;
    font-weight: 700;
}

.brand-porsche {
    color: var(--dark);
}

.brand-salova {
    color: var(--primary);
}

.number a {
    text-decoration: none;
    color: var(--dark);
    font-size: 30px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.number a:hover {
    color: var(--primary);
}

.number a i {
    color: var(--primary);
    font-size: 16px;
}

/* ========== НАВИГАЦИЯ ========== */
.nav {
    display: flex;
    justify-content: center;
    border-top: 2px solid black;
    background: var(--white);
}

.div-nav {
    padding: 15px 25px;
    transition: var(--transition);
}

.div-nav a {
    text-decoration: none;
    color: var(--dark);
    font-weight: 500;
    font-size: 20px;
    transition: var(--transition);
}

.div-nav:hover {
    background: var(--primary);
}

.div-nav:hover a {
    color: var(--white);
}

/* ========== MAIN CONTENT ========== */
main {
    margin-top: 130px;
    min-height: calc(100vh - 130px);
}

.services-page {
    padding: 40px 0 80px;
}

/* ========== КНОПКА НАЗАД ========== */
.back-button {
    margin-bottom: 40px;
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: transparent;
    border: 2px solid var(--primary);
    padding: 10px 25px;
    border-radius: 40px;
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    font-size: 14px;
}

.btn-back:hover {
    background: var(--primary);
    color: var(--white);
}

.btn-back:hover i {
    color: var(--white);
}

.btn-back i {
    font-size: 14px;
    transition: var(--transition);
}

/* ========== ЗАГОЛОВОК СТРАНИЦЫ ========== */
.page-header {
    text-align: center;
    margin-bottom: 60px;
}

.page-header h1 {
    font-size: clamp(32px, 5vw, 48px);
    margin-bottom: 20px;
}

.page-description {
    color: var(--gray);
    font-size: 18px;
    max-width: 700px;
    margin: 0 auto;
}

/* ========== СЕТКА УСЛУГ ========== */
.services-catalog {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

/* ========== КЛИКАБЕЛЬНЫЕ КАРТОЧКИ УСЛУГ ========== */
.service-card-clickable {
    background: var(--white);
    padding: 40px 25px;
    text-align: center;
    border-radius: 24px;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.service-card-clickable::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--primary);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.service-card-clickable:hover::before {
    transform: scaleX(1);
}

.service-card-clickable:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.service-card-clickable .card-icon {
    margin-bottom: 20px;
}

.service-card-clickable .card-icon img {
    height: 120px;
    width: auto;
    transition: var(--transition);
}

.service-card-clickable:hover .card-icon img {
    transform: scale(1.05);
}

.service-card-clickable h3 {
    font-size: 22px;
    margin-bottom: 12px;
    color: var(--dark);
}

.service-card-clickable p {
    font-size: 14px;
    color: var(--gray);
    line-height: 1.5;
    margin-bottom: 20px;
}

.card-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(120, 11, 16, 0.1);
    border-radius: 50%;
    color: var(--primary);
    transition: var(--transition);
}

.service-card-clickable:hover .card-arrow {
    background: var(--primary);
    color: var(--white);
    transform: translateX(5px);
}

/* ========== МОДАЛЬНЫЕ ОКНА ========== */
.service-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(4px);
}

.service-modal-content {
    background: var(--white);
    width: 90%;
    max-width: 600px;
    border-radius: 28px;
    position: relative;
    animation: modalSlideIn 0.3s ease;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.service-modal-close {
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 32px;
    font-weight: 300;
    cursor: pointer;
    color: var(--gray);
    transition: var(--transition);
    z-index: 10;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.05);
}

.service-modal-close:hover {
    color: var(--primary);
    background: rgba(120, 11, 16, 0.1);
    transform: rotate(90deg);
}

.service-modal-header {
    text-align: center;
    padding: 35px 30px 20px;
    background: linear-gradient(135deg, #fafafa 0%, #fff 100%);
    border-bottom: 2px solid var(--primary);
}

.service-modal-header img {
    width: 80px;
    height: auto;
    margin-bottom: 15px;
}

.service-modal-header h2 {
    font-size: 28px;
    font-weight: 700;
}

.service-modal-body {
    padding: 25px 30px;
}

.service-modal-body p {
    color: var(--gray);
    line-height: 1.6;
    margin-bottom: 20px;
}

.service-modal-body h3 {
    font-size: 18px;
    margin-bottom: 15px;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 8px;
}

.service-modal-body h3::before {
    content: '';
    width: 4px;
    height: 20px;
    background: var(--primary);
    border-radius: 2px;
}

.service-modal-body ul {
    list-style: none;
    margin-bottom: 25px;
}

.service-modal-body ul li {
    padding: 8px 0;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--gray-dark);
    border-bottom: 1px solid #f0f0f0;
}

.service-modal-body ul li:last-child {
    border-bottom: none;
}

.service-modal-body ul li i {
    width: 22px;
    color: var(--primary);
    font-size: 14px;
}

.service-modal-info {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding: 20px;
    background: #f8f8f8;
    border-radius: 16px;
    margin-top: 10px;
}

.info-block {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--gray-dark);
}

.info-block i {
    width: 32px;
    height: 32px;
    background: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 14px;
    box-shadow: var(--shadow-sm);
}

.service-modal-footer {
    display: flex;
    gap: 15px;
    padding: 20px 30px 30px;
    background: #fafafa;
    border-top: 1px solid #eee;
}

.modal-order-btn,
.modal-close-btn {
    flex: 1;
    padding: 14px;
    border-radius: 40px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

.modal-order-btn {
    background: var(--primary);
    color: var(--white);
}

.modal-order-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.modal-close-btn {
    background: transparent;
    border: 2px solid var(--gray-light);
    color: var(--gray);
}

.modal-close-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* ========== FOOTER ========== */
.footer-main {
    background: var(--dark);
    color: var(--white);
    padding: 60px 0 20px;
    margin-top: 60px;
}

.footer-grid {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.footer-logo img {
    height: 45px;
    width: auto;
}

.footer-logo h3 {
    font-size: 20px;
}

.footer-logo h3 span {
    color: var(--primary);
}

.footer-col p {
    color: #aaa;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 20px;
}

.footer-col h4 {
    font-size: 18px;
    margin-bottom: 20px;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 12px;
}

.footer-col ul li a {
    color: #aaa;
    text-decoration: none;
    transition: var(--transition);
}

.footer-col ul li a:hover {
    color: var(--primary);
}

.footer-contacts li {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #aaa;
}

.footer-contacts li i {
    width: 20px;
    color: var(--primary);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 14px;
    color: #aaa;
}

/* ========== SCROLL MARGIN ========== */
[id] {
    scroll-margin-top: 120px;
}

/* ========== АДАПТИВЫ ========== */

/* Планшеты и ноутбуки (до 992px) */
@media (max-width: 992px) {
    .nav {
        display: none;
    }
    
    .services-catalog {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-grid {
        flex-wrap: wrap;
        gap: 30px;
    }
}

/* Планшеты (до 768px) */
@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }
    
    main {
        margin-top: 110px;
    }
}

/* Мобильные устройства (до 576px) */
@media (max-width: 576px) {
    .services-catalog {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        flex-direction: column;
        text-align: center;
        gap: 40px;
    }
    
    .footer-logo {
        justify-content: center;
    }
    
    .footer-contacts li {
        justify-content: center;
    }
    
    .page-header h1 {
        font-size: 28px;
    }
    
    .page-description {
        font-size: 14px;
    }
    
    .back-button {
        text-align: center;
    }
    
    /* Модальные окна на мобильных */
    .service-modal-content {
        width: 95%;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .service-modal-header {
        padding: 25px 20px 15px;
    }
    
    .service-modal-header h2 {
        font-size: 22px;
    }
    
    .service-modal-header img {
        width: 60px;
    }
    
    .service-modal-body {
        padding: 20px;
    }
    
    .service-modal-info {
        flex-direction: column;
        gap: 12px;
    }
    
    .service-modal-footer {
        flex-direction: column;
        gap: 10px;
        padding: 20px;
    }
    
    .info-block {
        justify-content: center;
    }
}