/* ============================================================
   WWEMAKE.CSS – Стили страницы "Услуги"
   ============================================================ */

.services-section {
    padding: 30px 0 70px;
    text-align: center;
}
.services-section h2 {
    font-size: 32px;
    font-weight: 700;
    color: var(--bg-dark);
    letter-spacing: 0.02em;
    margin-bottom: 40px;
}

.carousel-wrapper {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    perspective: 1500px;
    overflow: hidden;
    touch-action: pan-y;
    width: 100%;
}

.cards-container {
    position: relative;
    width: 100%;
    height: 480px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    cursor: grab;
}
.cards-container:active { cursor: grabbing; }

.service-card {
    position: absolute;
    width: 380px;
    height: 100%;
    background: #fff;
    border-radius: 20px;
    box-shadow: var(--shadow-premium);
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: all 0.7s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    backface-visibility: hidden;
    will-change: transform, opacity;
}

.service-card .card-image {
    width: 100%;
    height: 220px;
    background: #fafafa;
    overflow: hidden;
}
.service-card .card-image img {
    width: 100%; height: 100%; object-fit: cover;
}

.service-card .card-content {
    flex: 1;
    padding: 25px 30px 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
}
.service-card .card-content h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--bg-dark);
}
.service-card .card-content p {
    font-size: 15px;
    line-height: 1.6;
    color: #475569;
    text-align: center;
    flex-grow: 1;
    display: flex;
    align-items: center;
}

.card-content .btn-service {
    background-color: var(--accent-gold);
    border: none;
    padding: 12px 30px;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 15px rgba(220, 179, 107, 0.3);
    margin-top: 15px;
}
.card-content .btn-service:hover {
    background-color: #cfa150;
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 10px 25px rgba(220, 179, 107, 0.5);
}

.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 54px;
    height: 54px;
    background: #ffffff;
    border-radius: 50%;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border: 1px solid #e2e8f0;
    cursor: pointer;
    transition: all 0.3s;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}
.nav-btn:hover {
    transform: translateY(-50%) scale(1.1);
    background: var(--accent-gold);
    border-color: var(--accent-gold);
    box-shadow: 0 8px 25px rgba(220, 179, 107, 0.4);
}
.nav-btn svg {
    width: 24px; height: 24px;
    stroke: var(--bg-dark);
    fill: none; stroke-width: 2.5;
    stroke-linecap: round; stroke-linejoin: round;
}
.nav-btn.prev { left: 15px; }
.nav-btn.next { right: 15px; }

/* ============================================================
   МЕДИА-ГАЛЕРЕЯ ПОД КАРУСЕЛЬЮ
   ============================================================ */
.media-gallery-section {
    max-width: 1100px;
    margin: 50px auto 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.6s ease;
    opacity: 0;
}
.media-gallery-section.active {
    max-height: 2500px;
    opacity: 1;
}
.media-gallery-section .gallery-wrapper {
    background: #fff;
    border-radius: 24px;
    box-shadow: var(--shadow-premium);
    border: 1px solid #e2e8f0;
    padding: 30px;
}
.media-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.media-item {
    border-radius: 16px;
    overflow: hidden;
    background: #fafafa;
    position: relative;
    aspect-ratio: 1 / 1;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
    cursor: pointer;
    border: 1px solid #e2e8f0;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.media-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: var(--accent-gold);
}

.media-item .media-preview {
    width: 100%;
    height: 100%;
    position: relative;
}
.media-item .media-preview img {
    width: 100%; height: 100%; object-fit: cover; display: block;
}
.media-item .media-preview .play-icon {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 50px; height: 50px;
    background: rgba(14, 41, 66, 0.85);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    border: 2px solid #fff;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}
.media-item .media-preview .play-icon svg {
    width: 20px; height: 20px; fill: #fff; margin-left: 2px;
}

.media-item.text-item {
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 25px;
    cursor: default;
    aspect-ratio: auto;
    min-height: 200px;
}
.media-item.text-item h4 {
    font-size: 17px; font-weight: 700; color: var(--bg-dark); margin-bottom: 8px;
}
.media-item.text-item p {
    font-size: 14px; line-height: 1.6; color: #475569; margin: 0;
}

/* ============================================================
   ЛАЙТБОКС УСЛУГ (ВЫШЕ ШАПКИ И ИСПРАВЛЕННЫЙ)
   ============================================================ */
.lightbox-modal {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(14, 41, 66, 0.92);
    backdrop-filter: blur(8px);
    z-index: 9999999 !important; /* ВЫШЕ ЛИПКОЙ ШАПКИ НА 100% */
    display: flex; align-items: center; justify-content: center;
    opacity: 0; visibility: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    padding: 20px;
    box-sizing: border-box;
}

.lightbox-modal.active { opacity: 1; visibility: visible; }

.lightbox-modal .modal-content {
    position: relative;
    max-width: 85vw;
    max-height: 85vh;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 30px 60px rgba(0,0,0,0.5);
    background: #000;
    transform: scale(0.9);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex; align-items: center; justify-content: center;
}

.lightbox-modal.active .modal-content { transform: scale(1); }

.lightbox-modal .close-btn {
    position: absolute; top: 25px; right: 30px;
    width: 46px; height: 46px; background: #ffffff;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.25);
    cursor: pointer; transition: all 0.3s ease;
    z-index: 10; border: none !important; outline: none !important; padding: 0;
}
.lightbox-modal .close-btn:hover { transform: rotate(90deg) scale(1.1); background: var(--accent-gold); }
.lightbox-modal .close-btn svg { width: 22px; height: 22px; stroke: var(--bg-dark); fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }

.lightbox-modal .nav-btn-lightbox {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 48px; height: 48px; background: #ffffff;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.25);
    cursor: pointer; transition: all 0.3s ease;
    z-index: 10; border: none !important; outline: none !important; padding: 0;
}
.lightbox-modal .nav-btn-lightbox:hover { transform: translateY(-50%) scale(1.1); background: var(--accent-gold); }
.lightbox-modal .nav-btn-lightbox.prev { left: 20px; }
.lightbox-modal .nav-btn-lightbox.next { right: 20px; }
.lightbox-modal .nav-btn-lightbox svg { width: 22px; height: 22px; stroke: var(--bg-dark); fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }

@media (max-width: 768px) {
    .media-grid { grid-template-columns: 1fr; }
    .lightbox-modal .close-btn { top: 15px; right: 15px; width: 42px; height: 42px; }
    .lightbox-modal .nav-btn-lightbox { width: 42px; height: 42px; }
    .lightbox-modal .nav-btn-lightbox.prev { left: 10px; }
    .lightbox-modal .nav-btn-lightbox.next { right: 10px; }
}