.services-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    position: relative;
    padding: 100px 40px;
    background: var(--bg);
}

.services-main {
    max-width: 1400px;
    width: 100%;
    display: flex;
    gap: 80px;
    transition: transform 0.3s ease;
    align-items: flex-start;
}

.services-main.shifted {
    transform: translateX(-30px);
}

.services-left {
    flex: 0 0 450px;
}

.services-header {
    opacity: 0;
    animation: fadeInUp 0.6s ease-out 0.2s forwards;
}

.services-subtitle {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--gold);
    margin-bottom: 50px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.services-title {
    font-size: 3rem;
    font-weight: bold;
    color: var(--white);
    margin-bottom: 50px;
    letter-spacing: -2px;
}

.services-description {
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--white-dim);
    margin-bottom: 0;
}

.services-right {
    flex: 1;
    max-width: 800px;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--white-faint);
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    opacity: 0;
    animation: fadeInUp 0.6s ease-out 0.4s forwards;
}

.services-item {
    padding: 20px 25px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--white-faint);
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 100px;
    border-right: 1px solid var(--white-faint);
    border-bottom: 1px solid var(--white-faint);
}

.services-item:nth-child(even) {
    border-right: none;
}

.services-item:nth-last-child(-n+2) {
    border-bottom: none;
}

.services-item.active {
    background: var(--gold-dim);
}

.services-item:hover {
    background: rgba(255, 255, 255, 0.06);
    transform: scale(1.02);
}

.services-item-icon {
    font-size: 1.2rem;
    color: var(--gold);
    margin-bottom: 12px;
    align-self: flex-start;
}

.services-item.active .services-item-icon {
    color: var(--gold);
}

.services-item-title {
    font-size: 1.1rem;
    color: var(--white-dim);
    font-weight: 600;
    line-height: 1.3;
    flex-grow: 1;
    transition: color 0.2s ease;
}

.services-item:hover .services-item-title,
.services-item.active .services-item-title {
    color: var(--gold);
}

.services-detail-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 500px;
    max-width: 500px;
    height: 100vh;
    background: #0a0a0a;
    border-left: 1px solid var(--gold-border);
    color: var(--white);
    padding: 60px 40px;
    transform: translateX(100%);
    transition: transform 0.4s ease;
    z-index: 1000;
    overflow-y: auto;
    box-shadow: -10px 0 60px rgba(0, 0, 0, 0.6);
}

.services-detail-panel.active {
    transform: translateX(0);
}

.services-detail-content {
    max-width: 100%;
    text-align: center;
    display: flex;
    flex-direction: column;
    height: calc(100vh - 120px);
    justify-content: center;
    position: relative;
}

.services-close-btn {
    position: absolute;
    top: 30px;
    right: 30px;
    background: var(--white-faint);
    border: 1px solid var(--gold-border);
    color: var(--white-dim);
    font-size: 1.5rem;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
}

.services-close-btn:hover {
    color: var(--gold);
    background: var(--gold-dim);
    border-color: var(--gold);
    transform: rotate(90deg);
}

.services-detail-icon {
    font-size: 4rem;
    margin-bottom: 30px;
    color: var(--gold);
}

.services-detail-title {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 30px;
    line-height: 1.2;
    color: var(--white);
    letter-spacing: -0.03em;
}

.services-detail-description {
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 50px;
    color: var(--white-dim);
}

.services-action-buttons {
    display: flex;
    gap: 20px;
    margin-bottom: 50px;
    flex-wrap: wrap;
}

.services-btn {
    padding: 14px 28px;
    border: 1px solid var(--gold-border);
    background: transparent;
    color: var(--gold);
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    flex: 1;
    min-width: 150px;
    font-family: var(--font);
}

.services-btn:hover {
    background: var(--gold-dim);
    border-color: var(--gold);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.2);
}

.services-btn-primary {
    background: var(--gold);
    border-color: var(--gold);
    color: #000;
    font-weight: 700;
}

.services-btn-primary:hover {
    background: #e0c040;
    border-color: #e0c040;
    color: #000;
    box-shadow: 0 8px 28px rgba(212, 175, 55, 0.35);
}

.services-navigation {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    width: 100%;
}

.services-nav-preview {
    position: absolute;
    top: 40px;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    opacity: 0.7;
    height: 20px;
    color: var(--white-dim);
}

.services-nav-preview-title {
    font-weight: 500;
    cursor: pointer;
    transition: color 0.2s ease, opacity 0.2s ease;
    max-width: 180px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--white-dim);
}

.services-nav-preview-title:hover {
    color: var(--gold);
    opacity: 1;
}

.services-nav-preview-title.disabled {
    opacity: 0.25;
    cursor: not-allowed;
}

.services-nav-btn {
    background: var(--white-faint);
    border: 1px solid var(--gold-border);
    color: var(--white-dim);
    font-size: 1.5rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
}

.services-nav-btn:hover:not(:disabled) {
    background: var(--gold-dim);
    border-color: var(--gold);
    color: var(--gold);
    transform: scale(1.1);
}

.services-nav-btn:disabled {
    opacity: 0.25;
    cursor: not-allowed;
}

.services-nav-info {
    font-size: 1rem;
    color: var(--white-dim);
    min-width: 60px;
    text-align: center;
}

.services-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 999;
}

.services-overlay.active {
    opacity: 1;
    visibility: visible;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 1200px) {
    .services-container {
        padding: 40px 20px;
    }

    .services-main {
        flex-direction: column;
        gap: 40px;
        align-items: center;
        text-align: center;
    }

    .services-left {
        flex: none;
        width: 100%;
        max-width: 600px;
    }

    .services-right {
        flex: none;
        width: 100%;
        max-width: 800px;
    }

    .services-title {
        font-size: 3rem;
    }

    .services-main.shifted {
        transform: none;
    }

    .services-item-icon {
        align-self: center;
    }
}

@media (max-width: 768px) {
    .services-container {
        padding: 30px 20px;
        align-items: flex-start;
        padding-top: 60px;
    }

    .services-title {
        font-size: 2.5rem;
        text-align: center;
    }

    .services-description {
        text-align: center;
    }

    .services-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
    }

    .services-item {
        border-right: none;
        min-height: 80px;
        padding: 15px 20px;
    }

    .services-item:last-child {
        border-bottom: none;
    }

    .services-detail-panel {
        width: 100%;
        max-width: 100%;
        padding: 20px;
        left: 0;
        right: 0;
        border-left: none;
        border-top: 1px solid var(--gold-border);
    }

    .services-close-btn {
        top: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
        z-index: 1001;
    }

    .services-detail-content {
        height: auto;
        justify-content: flex-start;
        padding-top: 60px;
        min-height: calc(100vh - 40px);
    }

    .services-detail-icon {
        font-size: 3rem;
        margin-bottom: 20px;
    }

    .services-detail-title {
        font-size: 2rem;
        margin-bottom: 20px;
    }

    .services-detail-description {
        font-size: 1.1rem;
        margin-bottom: 30px;
    }

    .services-action-buttons {
        flex-direction: column;
        margin-bottom: 30px;
        gap: 15px;
    }

    .services-btn {
        flex: none;
        min-width: auto;
        padding: 12px 20px;
    }

    .services-nav-preview {
        position: static;
        transform: none;
        margin-bottom: 20px;
        flex-direction: column;
        gap: 10px;
        text-align: center;
        height: auto;
    }

    .services-nav-preview-title {
        max-width: none;
    }

    .services-navigation {
        position: static;
        transform: none;
        margin-top: 20px;
        gap: 15px;
    }

    .services-nav-btn {
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
    }
}

@media (max-width: 480px) {
    .services-container {
        padding: 20px 15px;
        padding-top: 40px;
    }

    .services-title {
        font-size: 2rem;
    }

    .services-grid {
        max-width: 320px;
    }

    .services-item {
        padding: 12px 15px;
        min-height: 70px;
    }

    .services-item-title {
        font-size: 1rem;
    }

    .services-detail-panel {
        padding: 15px;
    }

    .services-detail-content {
        padding-top: 50px;
    }

    .services-detail-title {
        font-size: 1.8rem;
    }

    .services-detail-icon {
        font-size: 2.5rem;
    }

    .services-detail-description {
        font-size: 1rem;
    }

    .services-btn {
        padding: 10px 15px;
    }

    .services-nav-btn {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
}

.services-grid:has(.services-item:nth-last-child(1):nth-child(odd)) .services-item:last-child {
    grid-column: 1 / -1;
    max-width: 280px;
    justify-self: center;
}

@media (max-width: 768px) {
    .services-grid:has(.services-item:nth-last-child(1):nth-child(odd)) .services-item:last-child {
        grid-column: auto;
        max-width: none;
        justify-self: auto;
    }
}
