/**
 * Toll Services Section - 3D Modern Redesign (Theme Maroon Red)
 */

.toll-services-section {
    padding: clamp(35px, 4.5vw, 60px) 0 clamp(45px, 5.5vw, 70px);
    background: #ffffff;
    position: relative;
    z-index: 5;
}

/* ===================================
   Services Grid
   =================================== */
.toll-services-section .services-grid--modern {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: clamp(48px, 5vw, 64px) clamp(24px, 3vw, 36px);
    max-width: 1200px;
    margin: 0 auto;
}

/* ===================================
   Service Card Modern
   =================================== */
.service-card-modern {
    position: relative;
    border-radius: 24px;
    padding: clamp(28px, 3.5vw, 38px) clamp(24px, 3vw, 36px);
    padding-top: clamp(34px, 4vw, 44px);
    color: #ffffff;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: visible;
    box-shadow:
        0 14px 35px rgba(189, 8, 8, 0.22),
        0 4px 14px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

/* Red Root Theme Variations */
.service-card-modern--struk {
    background: linear-gradient(140deg, #c71f2d 0%, #a00d19 50%, #85050f 100%);
}

.service-card-modern--traffic {
    background: linear-gradient(140deg, #b80d0d 0%, #940707 50%, #750000 100%);
}

.service-card-modern--cctv {
    background: linear-gradient(140deg, #d32535 0%, #b31422 50%, #8f0612 100%);
}

.service-card-modern--tarif {
    background: linear-gradient(140deg, #a80a0a 0%, #8c0505 50%, #6b0000 100%);
}

/* Inner Diagonal Curved Overlay */
.service-card-modern__inner {
    position: absolute;
    inset: 0;
    border-radius: 24px;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}

.service-card-modern__inner::after {
    content: '';
    position: absolute;
    top: -30%;
    right: -15%;
    width: 80%;
    height: 150%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.26) 0%, rgba(255, 255, 255, 0.06) 55%, transparent 80%);
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    transform: rotate(18deg);
    pointer-events: none;
}

/* ===================================
   3D Floating Icon
   =================================== */
.service-card-modern__icon-3d {
    position: absolute;
    top: -34px;
    right: clamp(24px, 14%, 65px);
    width: clamp(72px, 8.5vw, 92px);
    height: clamp(72px, 8.5vw, 92px);
    z-index: 2;
    filter: drop-shadow(0 12px 20px rgba(0, 0, 0, 0.3));
    transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
    animation: floatBadge 4s ease-in-out infinite alternate;
}

.service-card-modern--traffic .service-card-modern__icon-3d {
    animation-delay: -1s;
}

.service-card-modern--cctv .service-card-modern__icon-3d {
    animation-delay: -2s;
}

.service-card-modern--tarif .service-card-modern__icon-3d {
    animation-delay: -3s;
}

@keyframes floatBadge {
    0% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-7px) rotate(1.5deg);
    }
    100% {
        transform: translateY(0) rotate(0deg);
    }
}

.icon-3d-svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* ===================================
   Content & Typography
   =================================== */
.service-card-modern__content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 82%;
}

.service-card-modern__title {
    font-size: clamp(1.22rem, 1.65vw, 1.48rem);
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    line-height: 1.25;
    letter-spacing: -0.3px;
}

.service-card-modern__desc {
    font-size: clamp(0.86rem, 1.05vw, 0.95rem);
    color: rgba(255, 255, 255, 0.94);
    line-height: 1.58;
    margin: 0;
    font-weight: 400;
}

/* ===================================
   Pill Action Button
   =================================== */
.service-card-modern__btn-wrap {
    position: relative;
    z-index: 1;
    margin-top: clamp(22px, 2.8vw, 30px);
}

.service-card-modern__btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 24px;
    background: rgba(0, 0, 0, 0.24);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 999px;
    color: #ffffff;
    font-size: clamp(0.84rem, 1vw, 0.92rem);
    font-weight: 600;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-card-modern__btn i {
    font-size: 0.85rem;
    transition: transform 0.3s ease;
}

/* ===================================
   Hover Effects
   =================================== */
.service-card-modern:hover {
    transform: translateY(-8px);
    box-shadow:
        0 22px 50px rgba(189, 8, 8, 0.32),
        0 6px 18px rgba(0, 0, 0, 0.12);
}

.service-card-modern:hover .service-card-modern__icon-3d {
    transform: translateY(-10px) scale(1.08);
    filter: drop-shadow(0 16px 26px rgba(0, 0, 0, 0.38));
}

.service-card-modern:hover .service-card-modern__btn {
    background: #ffffff;
    color: #bd0808;
    border-color: #ffffff;
    transform: translateX(4px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
}

.service-card-modern:hover .service-card-modern__btn i {
    transform: translateX(4px);
}

/* Legacy Class Support */
.toll-services-section .service-card {
    display: none;
}

/* ===================================
   Responsive (Maintains 2x2 Grid on Mobile)
   =================================== */
@media (max-width: 992px) {
    .toll-services-section {
        padding: 50px 0 45px;
    }

    .toll-services-section .services-grid--modern {
        gap: 46px 20px;
    }

    .service-card-modern {
        padding: 28px 22px 24px;
        padding-top: 36px;
    }

    .service-card-modern__content {
        max-width: 80%;
    }

    .service-card-modern__icon-3d {
        width: 76px;
        height: 76px;
        top: -28px;
        right: 18px;
    }
}

@media (max-width: 768px) {
    .toll-services-section {
        padding: 45px 0 35px;
    }

    .toll-services-section .services-grid--modern {
        grid-template-columns: repeat(2, 1fr);
        gap: 38px 14px;
    }

    .service-card-modern {
        padding: 20px 16px 18px;
        padding-top: 28px;
        border-radius: 20px;
    }

    .service-card-modern__content {
        max-width: 100%;
        gap: 6px;
    }

    .service-card-modern__title {
        font-size: 1.05rem;
    }

    .service-card-modern__desc {
        font-size: 0.8rem;
        line-height: 1.45;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .service-card-modern__icon-3d {
        top: -22px;
        right: 12px;
        width: 58px;
        height: 58px;
    }

    .service-card-modern__btn-wrap {
        margin-top: 14px;
    }

    .service-card-modern__btn {
        padding: 6px 14px;
        font-size: 0.76rem;
        gap: 6px;
    }
}

@media (max-width: 480px) {
    .toll-services-section {
        padding: 35px 0 25px;
    }

    .toll-services-section .services-grid--modern {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px 10px;
    }

    .service-card-modern {
        padding: 16px 12px 14px;
        padding-top: 24px;
        border-radius: 16px;
    }

    .service-card-modern__content {
        max-width: 100%;
        gap: 4px;
    }

    .service-card-modern__title {
        font-size: 0.88rem;
        line-height: 1.25;
    }

    .service-card-modern__desc {
        font-size: 0.72rem;
        line-height: 1.35;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .service-card-modern__icon-3d {
        top: -18px;
        right: 8px;
        width: 46px;
        height: 46px;
    }

    .service-card-modern__btn-wrap {
        margin-top: 10px;
    }

    .service-card-modern__btn {
        padding: 5px 10px;
        font-size: 0.68rem;
        gap: 4px;
    }

    .service-card-modern__btn i {
        font-size: 0.65rem;
    }
}

@media (max-width: 360px) {
    .toll-services-section .services-grid--modern {
        gap: 26px 8px;
    }

    .service-card-modern {
        padding: 14px 10px 12px;
        padding-top: 20px;
        border-radius: 14px;
    }

    .service-card-modern__title {
        font-size: 0.82rem;
    }

    .service-card-modern__desc {
        font-size: 0.68rem;
        -webkit-line-clamp: 2;
    }

    .service-card-modern__icon-3d {
        top: -15px;
        right: 6px;
        width: 40px;
        height: 40px;
    }

    .service-card-modern__btn {
        padding: 4px 8px;
        font-size: 0.64rem;
    }
}

/* ===================================
   Print
   =================================== */
@media print {
    .toll-services-section {
        background: #fff;
    }

    .service-card-modern {
        border: 1px solid #ddd;
        box-shadow: none;
        page-break-inside: avoid;
    }
}