/* Services Redesign - Staggered Layout */
.new-services-section {
    background-color: #ffffff;
    padding: 20px 0 80px;
    margin-top: 0;
}

.new-services-section .section-title {
    color: #1a1a1a;
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 50px;
    text-align: center;
    width: 100%;
    padding: 20px 40px;
    border: none;
}



.service-staggered-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.service-card-staggered {
    background: transparent;
    border-radius: 40px;
    padding: 40px;
    display: flex;
    flex-direction: column;

    height: 100%;
    position: relative;
    isolation: isolate;
    transition: box-shadow 0.4s ease;
    border: none;
}

/* Rotating conic-gradient ring layer */
.service-card-staggered::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 40px;
    padding: 3px; /* border thickness */
    background: conic-gradient(
        from var(--shine-angle, 0deg),
        #ffffff 0deg,
        #1c2954 90deg,
        #ffffff 180deg,
        #1c2954 270deg,
        #ffffff 360deg
    );
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    z-index: 0;
    opacity: 0;
    transition: opacity 0.4s ease;
}

/* Card inner background fill */
.service-card-staggered::after {
    content: '';
    position: absolute;
    inset: 3px;
    border-radius: 38px;
    background-color: #f8f9fa;
    z-index: 1;
    pointer-events: none;
}

/* Ensure all card content sits above the pseudo layers */
.service-card-staggered > * {
    position: relative;
    z-index: 2;
}

@keyframes rotateBorderShine {
    0% {
        --shine-angle: 0deg;
    }
    100% {
        --shine-angle: 360deg;
    }
}

@property --shine-angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

.service-card-staggered:hover {
    box-shadow: 0 20px 45px rgba(28, 41, 84, 0.15);
}

.service-card-staggered:hover::before,
.service-card-staggered:active::before {
    opacity: 1;
    animation: rotateBorderShine 1.5s linear infinite;
}

.service-card-staggered.image-top {
    flex-direction: column;
}

.service-card-staggered.image-bottom {
    flex-direction: column;
}

.card-header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 25px;
}

.card-icon-wrap {
    width: 75px;
    height: 75px;
    transition: transform 0.4s ease-out;
    cursor: pointer;
    perspective: 1000px;
    display: flex;
    align-items: center;
    justify-content: center;
    will-change: transform;
}

/* Trigger flip when the whole header row is hovered */
.card-header-row:hover .card-icon-wrap {
    transform: rotateX(360deg);
}

.card-icon-wrap img, .card-icon-wrap i {
    width: 100%;
    height: 100%;
    color: #1c2954;
    font-size: 50px; /* Increased from 40px */
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-num-bg {
    font-size: 5rem;
    font-weight: 900;
    color: rgba(28, 41, 84, 0.08);
    line-height: 0.8;
    user-select: none;
    transition: opacity 0.4s ease-out, transform 0.4s ease-out;
}

/* Subtle fade and shift for number when header row is hovered */
.card-header-row:hover .card-num-bg {
    opacity: 0.2;
    transform: translateX(15px);
}


.card-title-new {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 15px;
}

.card-desc-new {
    font-size: 1rem;
    color: #555;
    line-height: 1.6;
    margin-bottom: 30px;
}

.card-link-new {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #1c2954;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    background-color: #e0e0e0;
    border: 2px solid rgb(206, 206, 206);
    padding: 12px 28px;
    border-radius: 50px;
    transition: all 0.2s ease-in-out;
    margin-bottom: 20px;
    box-shadow: inset 4px 4px 10px #bcbcbc, inset -4px -4px 10px #ffffff;
}

.card-link-new:hover {
    box-shadow: inset 2px 2px 5px #bcbcbc, inset -2px -2px 5px #ffffff, 2px 2px 5px #bcbcbc, -2px -2px 5px #ffffff;
    color: #1c2954;
    transform: translateY(-2px);
}

.card-link-new:active {
    box-shadow: inset 4px 4px 10px #bcbcbc, inset -4px -4px 10px #ffffff;
    transform: translateY(0);
}

.card-link-new::after {
    content: '→';
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.card-link-new:hover::after {
    transform: translateX(4px);
}

.card-img-wrap-new {
    width: 100%;
    border-radius: 25px;
    overflow: hidden;
    margin-top: 20px;
}

.image-top .card-img-wrap-new {
    margin-top: 0;
    margin-bottom: 30px;
}

.card-img-wrap-new img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    /* transition removed to avoid conflict with GSAP scroll zoom */
}

/* Horizontal spanning card for the 7th service */
.service-card-staggered.card-horizontal {
    grid-column: 1 / -1;
    flex-direction: row !important;
    align-items: center;
    gap: 60px;
    padding: 60px;
    margin-top: 20px;
}

.card-horizontal .card-content-side {
    flex: 1.2;
}

.card-horizontal .card-img-wrap-new {
    flex: 1;
    margin-top: 0;
}

.card-horizontal .card-img-wrap-new img {
    height: 380px;
}

@media (max-width: 1200px) {
    .service-staggered-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .service-card-staggered.card-horizontal {
        padding: 40px;
        gap: 40px;
    }
}

@media (max-width: 991px) {
    .service-card-staggered.card-horizontal {
        flex-direction: column !important;
    }
    .card-horizontal .card-img-wrap-new {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .service-staggered-grid {
        grid-template-columns: 1fr;
    }
    
    .new-services-section {
        padding: 60px 0;
    }
    
    .new-services-section .section-title {
        font-size: 2.2rem;
        margin-bottom: 30px;
    }
}
