/* Enforce no scroll on desktop but allow on mobile if needed */
body {
    overflow-x: hidden !important;
}

.usluge-page {
    background-color: #000;
    height: 99.9999vh;
    height: 99.9999svh;
}

/* Services Split Section */
.services-split {
    display: flex;
    height: 99.9999vh;
    height: 99.9999svh;
    width: 100%;
    overflow: hidden;
    position: relative;
    background-color: #000;
}

.service-side {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    height: 100%;
    transition: all 0.7s cubic-bezier(0.23, 1, 0.32, 1);
    overflow: hidden;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.service-side:last-child {
    border-right: none;
}

/* Backgrounds */
.service-side.maintenance {
    background-image: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url('service_maintenance_real.jpg');
    background-size: cover;
    background-position: center;
}

.service-side.repairs {
    background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('service_repairs_real.jpg');
    background-size: cover;
    background-position: center;
}

.service-side.sales {
    background-image: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url('service_sales_real.jpg');
    background-size: cover;
    background-position: center;
}

.service-side.refresh {
    background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('service_refresh_real.jpg');
    background-size: cover;
    background-position: center;
}

.service-bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    transition: all 0.5s ease;
    z-index: 1;
}

.service-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
    padding: 0 2rem;
    transition: transform 0.8s cubic-bezier(0.77, 0, 0.175, 1);
    width: 100%;
}

.service-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3em;
    margin-bottom: 1rem;
    opacity: 0.6;
    transform: translateY(20px);
    transition: all 0.2s ease 0.1s;
}

.service-side h2 {
    font-size: clamp(1.2rem, 2.2vw, 2.5rem);
    font-weight: 900;
    text-transform: uppercase;
    line-height: 1;
    margin-bottom: 1.5rem;
    transform: translateY(30px);
    transition: all 0.2s ease 0.2s;
    white-space: nowrap;
}

.service-side p {
    font-size: 0.9rem;
    max-width: 250px;
    margin: 0 auto 2rem;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease 0.3s;
    line-height: 1.4;
}

.service-link {
    display: inline-block;
    padding: 0.8rem 2rem;
    background: transparent;
    border: 1px solid white;
    color: white;
    text-decoration: none;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.8rem;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease 0.4s;
}

/* Hover States */
.service-side:hover {
    flex: 2.2;
}

.service-side:hover .service-bg-overlay {
    background: rgba(0, 102, 204, 0.4);
}

.service-side:hover .service-content {
    transform: translateY(-10px);
}

.service-side:hover .service-label {
    opacity: 1;
    transform: translateY(0);
}

.service-side:hover h2 {
    transform: translateY(0);
}

.service-side:hover p,
.service-side:hover .service-link {
    opacity: 1;
    transform: translateY(0);
}

/* ===== HOVER EFFECTS - RESPONSIVE SEGMENTATION ===== */

/* Desktop (Large Monitors) - Keep subtle and slow */
@media (min-width: 1441px) {
    .services-split:hover .service-side:not(:hover) h2 {
        transform: translateY(0) scale(0.85);
        transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    }

    .services-split:hover .service-side:hover h2 {
        transform: translateY(0) scale(1.05);
        opacity: 1;
        filter: blur(0);
        transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    }
}

/* Laptop (Smaller Screens) - Premium Smooth Transitions */
@media (min-width: 769px) and (max-width: 1440px) {
    .service-side {
        transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .service-content {
        transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.5s ease;
    }

    .services-split:hover .service-side:not(:hover) .service-content {
        padding: 0;
        transform: translateY(0);
        transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .services-split:hover .service-side:not(:hover) p,
    .services-split:hover .service-side:not(:hover) .service-link {
        opacity: 0;
        transform: translateY(20px);
        transition: all 0.4s ease;
    }

    .services-split:hover .service-side:not(:hover) .service-label {
        opacity: 1;
        transform: scale(0.7);
        margin-bottom: 0.5rem;
        transform-origin: center center;
        transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .services-split:hover .service-side:not(:hover) h2 {
        opacity: 1;
        transform: scale(0.7);
        margin-bottom: 0;
        transform-origin: center center;
        transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .services-split:hover .service-side:hover .service-content {
        transform: translateY(-10px);
        transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .services-split:hover .service-side:hover h2 {
        transform: scale(1.08);
        /* Balanced pop */
        opacity: 1;
        transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    }
}

.service-link:hover {
    background: white;
    color: #1a1a1a;
    letter-spacing: 0.15em;
}

/* Mobile UI Overhaul - Ultra Minimalist & Premium Animated */
@media screen and (max-width: 768px) {

    /* RESET BASE */
    html,
    body {
        height: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
        background: #000 !important;
    }

    /* GRID LOCKDOWN: Ensures exactly 4 visible rows in the viewport */
    .usluge-page {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0.0001% !important;
        width: 100vw !important;
        height: 99.9999svh !important;
        /* Short viewport height - always fits visible area */
        display: grid !important;
        grid-template-rows: repeat(4, 1fr) !important;
        /* Forces 4 equal quarters */
        overflow: hidden !important;
        z-index: 10 !important;
        background: #000 !important;

        /* Device Hardware Padding */
        padding-top: env(safe-area-inset-top, 0);
        padding-bottom: env(safe-area-inset-bottom, 0);
    }

    .services-split {
        display: contents !important;
        /* Let parent grid handle children directly */
    }

    .service-side {
        width: 100% !important;
        height: 100% !important;
        /* Match grid cell height */
        display: flex !important;
        align-items: center;
        justify-content: center;
        border-right: none !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
        transform: translateX(100%);
        opacity: 0;
        animation: premiumEntry 0.8s cubic-bezier(0.19, 1, 0.22, 1) forwards;
        cursor: pointer;
        position: relative;
    }

    .service-side:last-child {
        border-bottom: none !important;
    }

    /* Move and Flatten Nav */
    .main-nav {
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        transform: none !important;
        border-radius: 0 !important;
        margin: 0 !important;
    }

    .main-nav.transparent-mobile {
        background: transparent !important;
        backdrop-filter: none !important;
        border: none !important;
        box-shadow: none !important;
    }

    @keyframes premiumEntry {
        to {
            transform: translateX(0);
            opacity: 1;
        }
    }

    /* Staggered entry */
    .service-side:nth-child(1) {
        animation-delay: 0.1s;
    }

    .service-side:nth-child(2) {
        animation-delay: 0.15s;
    }

    .service-side:nth-child(3) {
        animation-delay: 0.2s;
    }

    .service-side:nth-child(4) {
        animation-delay: 0.25s;
    }

    /* EXIT ANIMATION */
    .service-side.exit-sweep {
        transform: translateX(-30px);
        opacity: 0;
        filter: blur(10px);
        transition: all 0.6s cubic-bezier(0.19, 1, 0.22, 1);
    }

    /* SELECTED ANIMATION */
    .service-side.selected-focus {
        z-index: 9999 !important;
        position: fixed !important;
        top: 0;
        left: 0;
        width: 100% !important;
        height: 100% !important;
        transition: all 0.8s cubic-bezier(0.19, 1, 0.22, 1);
        border: none !important;
    }

    .service-side.selected-focus .service-content {
        transform: scale(1.05) !important;
        opacity: 0;
        transition: all 0.5s ease;
    }

    .service-content {
        padding: 0 1rem !important;
        height: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .service-label,
    .service-side p,
    .service-link {
        display: none !important;
    }

    .service-side h2 {
        font-size: clamp(1.1rem, 5.5vw, 1.5rem) !important;
        letter-spacing: 0.08em !important;
        margin: 0 !important;
        text-align: center !important;
        width: 100% !important;
        pointer-events: none;
        white-space: nowrap !important;
        line-height: 1.2 !important;
        text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8) !important;
        color: #fff !important;
        font-family: 'Montserrat', sans-serif !important;
        font-weight: 900 !important;
    }
}