/* ==========================================================================
   SERVICES SECTION - UPDATED VERSION WITH MODERN BACKGROUND
   ========================================================================== */
.services {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 50%, #0c0c0c 100%);
    position: relative;
    overflow: hidden;
    padding: 20px 0 0; /* Уменьшил отступ сверху с 40px до 20px */
}

/* Новый фон как в about-modern (добавляем поверх существующего) */
.services__background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.services__gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 30%, rgba(207, 123, 60, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(207, 123, 60, 0.05) 0%, transparent 50%);
}

/* Линии */
.services__lines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.services__line {
    position: absolute;
    background: rgba(207, 123, 60, 0.15);
    border-radius: 1px;
}

.services__line--1 {
    top: 20%;
    left: 10%;
    width: 300px;
    height: 1px;
    transform: rotate(45deg);
    animation: line-move-1 20s infinite linear;
}

.services__line--2 {
    top: 60%;
    right: 15%;
    width: 200px;
    height: 1px;
    transform: rotate(-30deg);
    animation: line-move-2 25s infinite linear reverse;
}

.services__line--3 {
    bottom: 30%;
    left: 20%;
    width: 150px;
    height: 1px;
    transform: rotate(15deg);
    animation: line-move-3 30s infinite linear;
}

/* Круги */
.services__circles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.services__circle {
    position: absolute;
    border: 1px solid rgba(207, 123, 60, 0.1);
    border-radius: 50%;
}

.services__circle--1 {
    top: 15%;
    right: 10%;
    width: 120px;
    height: 120px;
    animation: circle-float-1 25s infinite linear;
}

.services__circle--2 {
    bottom: 20%;
    left: 5%;
    width: 80px;
    height: 80px;
    animation: circle-float-2 30s infinite linear reverse;
}

.services__circle--3 {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 200px;
    animation: circle-float-3 40s infinite linear;
}

/* Существующие частицы (изменяем z-index) */
.services__particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2; /* Поверх нового фона */
    opacity: 0.4; /* Немного прозрачнее */
}

/* Боковые светильники (оставляем как было) */
.services__lamp {
    position: absolute;
    width: 12px;
    height: 500px;
    background: #cf7b3c;
    z-index: 3; /* Поверх частиц */
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.7;
    box-shadow: 0 0 20px rgba(207, 123, 60, 0.8);
    border-radius: 2px;
}

.services__lamp--left {
    left: 5%;
}

.services__lamp--right {
    right: 5%;
}

.services__lamp::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 0%, #cf7b3c 30%, #cf7b3c 70%, transparent 100%);
    border-radius: 2px;
}

/* Обновленный заголовок в стиле about-modern - ПРАВИЛЬНАЯ СТРУКТУРА */
.services__header {
    position: relative;
    z-index: 4;
    text-align: center;
    margin-bottom: 40px;
    margin-top: 20px;
}

/* Основной заголовок "НАШИ УСЛУГИ" */
.services__title {
    color: #fff;
    font-size: 4rem;
    font-weight: 300;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 10px; /* Отступ до линии */
    position: relative;
    display: inline-block;
}

.services__title::before {
    content: '';
    position: absolute;
    left: -30px;
    top: 50%;
    width: 20px;
    height: 1px;
    background: #cf7b3c;
    transform: translateY(-50%);
}

.services__title::after {
    content: '';
    position: absolute;
    right: -30px;
    top: 50%;
    width: 20px;
    height: 1px;
    background: #cf7b3c;
    transform: translateY(-50%);
}

/* Линия под заголовком */
.services__title-line {
    width: 80px;
    height: 2px;
    background: #cf7b3c;
    margin: 0 auto 10px; /* Отступ от заголовка сверху и до подписи снизу */
    display: block;
}


/* Подпись "- УСЛУГИ -" под линией */
.services__subtitle {
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.1rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 300;
    margin: 0; /* Убрали лишние отступы */
}

/* Отступ сверху секции */
.services {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 50%, #0c0c0c 100%);
    position: relative;
    overflow: hidden;
    padding: 20px 0 0; /* Уменьшенный отступ сверху */
}

/* Контейнер для контента (увеличиваем z-index) */
.services__container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px 60px;
    position: relative;
    z-index: 5; /* Выше всего фона и светильников */
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Сетка карточек (все остается как было) */
.services__grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    margin-bottom: 60px;
    width: 100%;
}

/* Service Card Styles - все остается как было */
.service-card {
    position: relative;
    width: 280px;
    height: 480px;
    perspective: 1000px;
    cursor: pointer;
    animation: float 8s ease-in-out infinite;
}

/* Анимации для новых элементов фона */
@keyframes line-move-1 {
    0% { transform: rotate(45deg) translateX(0); opacity: 0.1; }
    50% { opacity: 0.3; }
    100% { transform: rotate(45deg) translateX(100px); opacity: 0.1; }
}

@keyframes line-move-2 {
    0% { transform: rotate(-30deg) translateY(0); opacity: 0.1; }
    50% { opacity: 0.2; }
    100% { transform: rotate(-30deg) translateY(-100px); opacity: 0.1; }
}

@keyframes line-move-3 {
    0% { transform: rotate(15deg) translateX(0); opacity: 0.1; }
    50% { opacity: 0.25; }
    100% { transform: rotate(15deg) translateX(80px); opacity: 0.1; }
}

@keyframes circle-float-1 {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

@keyframes circle-float-2 {
    0%, 100% { transform: translateX(0) rotate(0deg); }
    50% { transform: translateX(15px) rotate(-180deg); }
}

@keyframes circle-float-3 {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Остальные стили остаются БЕЗ ИЗМЕНЕНИЙ (такие же как в рабочей версии) */
/* Service Card Styles - белые прозрачные карточки */
.service-card:nth-child(1) {
    animation-delay: 0s;
}

.service-card:nth-child(2) {
    animation-delay: 1s;
}

.service-card:nth-child(3) {
    animation-delay: 2s;
}

.service-card:nth-child(4) {
    animation-delay: 3s;
}

.service-card:nth-child(5) {
    animation-delay: 4s;
}

.service-card:nth-child(6) {
    animation-delay: 5s;
}

.service-card:nth-child(7) {
    animation-delay: 6s;
}

.service-card:nth-child(8) {
    animation-delay: 7s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-15px);
    }
}

.service-card__content {
    position: relative;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.55);
    border-radius: 12px;
    padding: 0;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 1px 1px rgba(255, 255, 255, 0.1) inset;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
    z-index: 2;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    text-align: center;
}

.service-card:hover .service-card__content {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6), 0 1px 1px rgba(255, 255, 255, 0.1) inset;
    background: rgba(173, 173, 173, 0.65);
}

.service-card__header {
    padding: 40px 25px 20px;
}

.service-card__title {
    color: #000000;
    font-size: 1.6rem;
    margin: 0 0 15px 0;
    font-weight: 600;
    text-align: center;
    letter-spacing: 1px;
}

.service-card__divider {
    width: 50px;
    height: 3px;
    background-color: #cf7b3c;
    margin: 0 auto;
    border-radius: 2px;
}

.service-card__body {
    padding: 20px 25px;
    flex: 1;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
}

.service-card__description {
    color: rgba(0, 0, 0, 0.9);
    line-height: 1.7;
    text-align: center;
    font-size: 1.05rem;
    margin: 0;
    width: 100%;
    overflow-wrap: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 12;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.service-card__hover {
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    bottom: 10px;
    background: linear-gradient(135deg, rgba(207, 123, 60, 0.1) 0%, transparent 100%);
    border-radius: 8px;
    opacity: 0;
    transition: all 0.4s ease;
    z-index: 1;
}

.service-card:hover .service-card__hover {
    opacity: 1;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
}

/* Навигационная панель - оставляем как было, но увеличиваем z-index */
.services__nav-panel {
    width: 100%;
    height: 100px;
    z-index: 6; /* Выше всего */
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 3rem;
    background: rgba(0, 0, 0, 0.95);
    flex-shrink: 0;
    position: relative;
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.services__nav-line {
    position: absolute;
    top: 40%;
    height: 1px;
    background: linear-gradient(90deg, transparent, #cf7b3c, transparent);
    opacity: 0.7;
}

.services__nav-line--left {
    left: 3rem;
    right: 50%;
    margin-right: 100px;
}

.services__nav-line--right {
    right: 3rem;
    left: 50%;
    margin-left: 100px;
}

.services__nav-center {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.services__scroll-down {
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: all 0.3s ease;
    text-decoration: none;
}

.services__nav-label {
    color: #fff;
    font-size: 0.9rem;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.8;
}

.services__nav-arrow {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(207, 123, 60, 0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    animation: pulse 2s infinite;
}

.services__nav-arrow:hover {
    border-color: #cf7b3c;
    transform: scale(1.1);
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(207, 123, 60, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(207, 123, 60, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(207, 123, 60, 0);
    }
}

/* ==========================================================================
   АДАПТИВНОСТЬ – ОТ ШИРОКИХ ЭКРАНОВ ДО МОБИЛЬНЫХ
   ========================================================================== */

/* ------------------------------------ */
/*   Ноутбуки / небольшие десктопы      */
/* ------------------------------------ */
@media (min-width: 1100px) and (max-width: 1399px) {
    /* При необходимости можно добавить правки, но сейчас карточки и так 280px */
}

/* ------------------------------------ */
/*   Планшеты (вертикальные и горизонтальные) */
/* ------------------------------------ */
@media (min-width: 768px) and (max-width: 1099px) {
    .services__lamp {
        width: 8px;
        height: 400px;
    }
    .services__lamp--left {
        left: 3%;
    }
    .services__lamp--right {
        right: 3%;
    }
}

/* ------------------------------------ */
/*   Экраны до 1024px (включая планшеты) */
/* ------------------------------------ */
@media (max-width: 1024px) {
    .services__title {
        font-size: 3rem;
        margin-bottom: 8px;
    }
    .services__subtitle {
        font-size: 1rem;
    }
    .service-card {
        height: 500px;
    }
    .service-card__title {
        font-size: 1.5rem;
    }
    .service-card__description {
        font-size: 1.1rem;
        -webkit-line-clamp: 10;
    }
}

/* ------------------------------------ */
/*   Мобильные устройства (до 767px)    */
/* ------------------------------------ */
@media (max-width: 767px) {
    .services {
        padding: 20px 0 0;
    }
    .services__title {
        font-size: 2.5rem;
        margin-bottom: 6px;
    }
    .services__subtitle {
        font-size: 0.9rem;
    }
    .service-card {
        height: 450px;
        width: 100%;
        max-width: 400px;
    }
    .service-card__title {
        font-size: 1.4rem;
    }
    .service-card__description {
        font-size: 1.1rem;
        -webkit-line-clamp: 9;
    }
    .services__lamp {
        width: 10px;
        height: 500px;
    }
    .services__lamp--left {
        left: 2%;
    }
    .services__lamp--right {
        right: 2%;
    }

    /* Навигация */
    .services__nav-panel {
        padding: 0 2rem;
        height: 90px;
    }
    .services__nav-line--left {
        left: 2rem;
        margin-right: 80px;
    }
    .services__nav-line--right {
        right: 2rem;
        margin-left: 80px;
    }
    .services__nav-label {
        font-size: 0.9rem;
        margin-bottom: 8px;
    }
    .services__nav-arrow {
        width: 35px;
        height: 35px;
    }
}

/* ------------------------------------ */
/*   Маленькие мобильные (до 575px)     */
/* ------------------------------------ */
@media (max-width: 575px) {
    .services__title {
        font-size: 2.2rem;
    }
    .service-card {
        height: 420px;
    }
    .service-card__description {
        font-size: 1rem;
        -webkit-line-clamp: 8;
    }
    .services__nav-panel {
        padding: 0 1.5rem;
        height: 80px;
    }
    .services__nav-line--left {
        left: 1.5rem;
        margin-right: 60px;
    }
    .services__nav-line--right {
        right: 1.5rem;
        margin-left: 60px;
    }
    .services__nav-label {
        font-size: 0.8rem;
        margin-bottom: 6px;
    }
    .services__nav-arrow {
        width: 32px;
        height: 32px;
    }
}

/* ------------------------------------ */
/*   Очень маленькие (до 480px)         */
/* ------------------------------------ */
@media (max-width: 480px) {
    .services__title {
        font-size: 2rem;
        margin-bottom: 5px;
    }
    .services__subtitle {
        font-size: 0.8rem;
    }
    .service-card {
        max-width: 320px;
        height: 400px;
    }
    .service-card__header {
        padding: 30px 20px 15px;
    }
    .service-card__body {
        padding: 15px 20px;
    }
    .service-card__description {
        font-size: 0.95rem;
        -webkit-line-clamp: 8;
    }
    .services__lamp {
        display: none; /* Лампы скрываем, чтобы не загромождать */
    }
    .services__nav-panel {
        padding: 0 1rem;
        height: 75px;
    }
    .services__nav-line--left {
        left: 1rem;
        margin-right: 50px;
    }
    .services__nav-line--right {
        right: 1rem;
        margin-left: 50px;
    }
    .services__nav-label {
        font-size: 0.75rem;
        margin-bottom: 5px;
        display: block; /* Явно показываем (убираем скрытие) */
    }
    .services__nav-arrow {
        width: 30px;
        height: 30px;
    }
}

/* ------------------------------------ */
/*   Экстремально маленькие (до 375px)  */
/* ------------------------------------ */
@media (max-width: 375px) {
    .services__title {
        font-size: 1.8rem;
    }
    .service-card {
        height: 380px;
    }
    .service-card__description {
        font-size: 0.9rem;
        -webkit-line-clamp: 7;
    }
    .services__nav-panel {
        padding: 0 0.8rem;
        height: 70px;
    }
    .services__nav-line--left {
        left: 0.8rem;
        margin-right: 40px;
    }
    .services__nav-line--right {
        right: 0.8rem;
        margin-left: 40px;
    }
    .services__nav-label {
        font-size: 0.7rem;
        margin-bottom: 4px;
    }
    .services__nav-arrow {
        width: 28px;
        height: 28px;
    }
}

/* ------------------------------------ */
/*   До 320px – минимальные экраны      */
/* ------------------------------------ */
@media (max-width: 320px) {
    .services__title {
        font-size: 1.6rem;
    }
    .service-card {
        height: 360px;
        max-width: 280px;
    }
    .service-card__description {
        font-size: 0.85rem;
        -webkit-line-clamp: 6;
    }
    .services__nav-panel {
        padding: 0 0.6rem;
        height: 65px;
    }
    .services__nav-line--left {
        left: 0.6rem;
        margin-right: 30px;
    }
    .services__nav-line--right {
        right: 0.6rem;
        margin-left: 30px;
    }
    .services__nav-label {
        font-size: 0.65rem;
        margin-bottom: 3px;
    }
    .services__nav-arrow {
        width: 24px;
        height: 24px;
    }
}