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

.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: .9rem;
    font-weight: 700;
    color: #be3500;
    margin-bottom: 50px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.services-title {
    font-size: 3rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 50px;
    letter-spacing: -2px;
}

.services-description {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #666;
    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;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    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: rgba(255, 255, 255, 0.9);
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 100px;
    border-right: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
}

/* Remove border-right from the last column items on wider screens */
.services-item:nth-child(even) {
    border-right: none;
}

/* Remove border-bottom from the last row items */
.services-item:nth-last-child(-n+2) {
    border-bottom: none;
}

.services-item.active {
    background: rgba(0, 137, 190, 0.1);
    color: #0089be;
    font-weight: bold;
}

.services-item:hover {
    background: rgba(0, 137, 190, 0.05);
    transform: scale(1.02);
}

.services-item-icon {
    font-size: 1.2rem;
    color: #0089be;
    margin-bottom: 12px;
    align-self: flex-start;
}

.services-item.active .services-item-icon {
    color: #0089be;
}

.services-item-title {
    font-size: 1.1rem;
    color: #333;
    font-weight: 600;
    line-height: 1.3;
    flex-grow: 1;
}

.services-item.active .services-item-title {
    color: #0089be;
}

.services-detail-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 500px;
    max-width: 500px;
    height: 100vh;
    background: #0089be;
    color: black;
    padding: 60px 40px;
    transform: translateX(100%);
    transition: transform 0.4s ease;
    z-index: 1000;
    overflow-y: auto;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.2);
}

.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: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 1.5rem;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.services-close-btn:hover {
    color: #be3500;
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.services-detail-icon {
    font-size: 4rem;
    margin-bottom: 30px;
    opacity: 0.9;
    color: white;
}

.services-detail-title {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 30px;
    line-height: 1.2;
    color: white;
}

.services-detail-description {
    font-size: 1.2rem;
    line-height: 1.6;
    margin-bottom: 50px;
    opacity: 0.9;
    color: white;
}

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

.services-btn {
    padding: 15px 30px;
    border: 2px solid white;
    background: transparent;
    color: white;
    font-size: .7rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    flex: 1;
    min-width: 150px;
}

.services-btn:hover {
    background: white;
    color: #0089be;
    transform: translateY(-2px);
}

.services-btn-primary {
    background: #005f83;
    border-color: #005f83;
}

.services-btn-primary:hover {
    background: white;
    color: #005f83;
}

.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: white;
}

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

.services-nav-preview-title:hover {
    opacity: 1;
}

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

.services-nav-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 1.5rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.services-nav-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

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

.services-nav-info {
    font-size: 1rem;
    opacity: 0.8;
    min-width: 60px;
    text-align: center;
    color: white;
}

.services-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    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);
    }
}

/* Responsive Design */
@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;
    }

    /* Center icons for screens below 1200px */
    .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;
    }

    /* Mobile: only border-bottom, no border-right */
    .services-item {
        border-right: none;
        min-height: 80px;
        padding: 15px 20px;
    }

    /* Remove border-bottom from last item on mobile */
    .services-item:last-child {
        border-bottom: none;
    }

    .services-detail-panel {
        width: 100%;
        max-width: 100%;
        padding: 20px;
        left: 0;
        right: 0;
    }

    .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;
        font-size: 0.95rem;
    }

    .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;
        font-size: 0.9rem;
    }

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

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

    .services-nav-info {
        font-size: 0.95rem;
    }
}

@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;
        font-size: 0.9rem;
    }

    .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;
    }
}

