/* ================= WEB DESIGN PAGE SPECIFIC & ZIGZAG FIX ================= */

/* Re-using 4 Column Grid for the 8 Top Cards */
.grid-4-col {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    width: 100%;
}

.grid-4-col .icon-box {
    width: 70px;
    height: 70px;
    font-size: 2rem;
}

/* Mid Banner Fix */
.mid-text-banner .split-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.mid-text-banner p {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #9da6c5;
}

/* ================= CONTINUOUS GLOWING TIMELINE ================= */

/* Container jisme saari rows hain usko relative banayenge */
.web-details-z-pattern .container,
.services-list .container {
    position: relative;
}

/* 1. THE MAIN LINE (Solid but subtle) */
.web-details-z-pattern .container::before,
.services-list .container::before {
    content: '';
    position: absolute;
    top: 50px;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    background: linear-gradient(to bottom, transparent, rgba(255, 90, 31, 0.3) 10%, rgba(255, 90, 31, 0.3) 90%, transparent);
    z-index: 0;
}

/* 2. THE GLOWING MOVING DOT */
.web-details-z-pattern .container::after,
.services-list .container::after {
    content: '';
    position: absolute;
    top: 50px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 40px;
    border-radius: 50px;
    background: var(--primary-orange);
    box-shadow: 0 0 15px var(--primary-orange), 0 0 30px var(--primary-orange);
    z-index: 1;
    animation: timeline-glow-drop 8s linear infinite;
}

@keyframes timeline-glow-drop {
    0% {
        top: 50px;
        opacity: 0;
    }

    5% {
        opacity: 1;
    }

    95% {
        opacity: 1;
    }

    100% {
        top: calc(100% - 100px);
        opacity: 0;
    }
}


/* ================= EXACT 50/50 ZIGZAG LAYOUT FIX ================= */

.service-row {
    display: flex !important;
    flex-direction: row !important;
    /* Force side-by-side */
    align-items: center !important;
    justify-content: space-between !important;
    gap: 60px !important;
    margin-bottom: 120px !important;
    width: 100% !important;
    position: relative;
    z-index: 2;
    /* Keeps rows above the timeline line */
}

/* Even Rows: Image Left, Text Right */
.service-row:nth-child(even) {
    flex-direction: row-reverse !important;
}

/* Dono boxes ko exactly 50% width (minus half gap) diya gaya hai */
.srv-text,
.srv-visual {
    flex: 0 0 calc(50% - 30px) !important;
    max-width: calc(50% - 30px) !important;
    width: 100% !important;
    box-sizing: border-box !important;
    position: relative;
}

.srv-text {
    z-index: 2;
    padding: 40px !important;
    /* Adjusted padding to fit 50% width properly */
}

/* Image Styling */
.srv-visual img {
    width: 100% !important;
    height: 400px !important;
    object-fit: cover ;
    border-radius: 20px !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5) !important;
    transition: 0.5s !important;
}

/* Hover Effect for Images */
.service-row:hover .srv-visual img {
    transform: scale(1.03) !important;
    box-shadow: 0 20px 50px rgba(255, 90, 31, 0.15) !important;
    border-color: rgba(255, 90, 31, 0.3) !important;
}


/* ================= RESPONSIVE FIXES ================= */

@media (max-width: 1024px) {
    .grid-4-col {
        grid-template-columns: repeat(2, 1fr);
    }

    .mid-text-banner .split-layout {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }

    .service-row {
        gap: 30px !important;
    }

    .srv-text,
    .srv-visual {
        flex: 0 0 calc(50% - 15px) !important;
        max-width: calc(50% - 15px) !important;
    }
}

@media (max-width: 768px) {
    .grid-4-col {
        grid-template-columns: 1fr;
    }

    /* Hide the timeline and glowing dot on mobile */
    .web-details-z-pattern .container::before,
    .services-list .container::before,
    .web-details-z-pattern .container::after,
    .services-list .container::after {
        display: none !important;
    }

    /* Stack Everything on Mobile (Text Top, Image Bottom) */
    .service-row,
    .service-row:nth-child(even) {
        flex-direction: column-reverse !important;
        gap: 40px !important;
        margin-bottom: 80px !important;
        text-align: center !important;
    }

    /* Make boxes take 100% width on Mobile */
    .srv-text,
    .srv-visual {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        width: 100% !important;
        padding: 20px 0 !important;
    }

    .srv-visual img {
        height: 250px !important;
    }
}