/* Shared Responsive Layout Fixes & Animations for M/S S.M. Yaqoob */

html,
body {
    overflow-x: clip;
    max-width: 100%;
}

/* Responsive typography & spacing safeguards for small/medium viewports */
@media (max-width: 639px) {
    .text-display-lg {
        font-size: clamp(1.75rem, 7.6vw, 2.35rem) !important;
        line-height: 1.15 !important;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .text-headline-lg {
        font-size: clamp(1.45rem, 6vw, 1.9rem) !important;
        line-height: 1.25 !important;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .text-headline-md {
        font-size: clamp(1.2rem, 4.8vw, 1.45rem) !important;
        line-height: 1.3 !important;
    }

    .px-gutter {
        padding-left: 1.125rem !important;
        padding-right: 1.125rem !important;
    }

    .py-stack-lg {
        padding-top: 3rem !important;
        padding-bottom: 3rem !important;
    }

    .py-stack-md {
        padding-top: 2.25rem !important;
        padding-bottom: 2.25rem !important;
    }

    .gap-gutter {
        gap: 1.25rem !important;
    }

    .gap-stack-lg {
        gap: 2.25rem !important;
    }

    .gap-stack-md {
        gap: 1.75rem !important;
    }
}

@media (min-width: 640px) and (max-width: 1023px) {
    .text-display-lg {
        font-size: clamp(2.35rem, 5.8vw, 3.25rem) !important;
        line-height: 1.14 !important;
    }

    .text-headline-lg {
        font-size: clamp(1.8rem, 4vw, 2.25rem) !important;
    }

    .py-stack-lg {
        padding-top: 4rem !important;
        padding-bottom: 4rem !important;
    }
}

/* Horizontal Infinite Logo Marquee */
.logo-marquee-wrapper {
    position: relative;
    overflow: hidden;
    width: 100%;
    -webkit-mask-image: linear-gradient(to right, transparent, #000 7%, #000 93%, transparent);
    mask-image: linear-gradient(to right, transparent, #000 7%, #000 93%, transparent);
}

.logo-marquee-track {
    display: flex;
    align-items: center;
    width: max-content;
    animation: smy-logo-marquee 28s linear infinite;
    will-change: transform;
}

.logo-marquee-wrapper:hover .logo-marquee-track {
    animation-play-state: paused;
}

.logo-marquee-set {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    gap: 2.75rem;
    padding-right: 2.75rem;
}

@media (min-width: 768px) {
    .logo-marquee-set {
        gap: 4.5rem;
        padding-right: 4.5rem;
    }
}

@keyframes smy-logo-marquee {
    0% {
        transform: translate3d(0, 0, 0);
    }
    100% {
        transform: translate3d(-50%, 0, 0);
    }
}

/* One-by-One Testimonial / Review Animation */
.review-slide {
    display: none;
}

.review-slide.active {
    display: block;
    animation: smy-review-enter 0.65s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes smy-review-enter {
    0% {
        opacity: 0;
        transform: translateY(14px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Respect reduced motion preferences while preserving readability */
@media (prefers-reduced-motion: reduce) {
    .logo-marquee-track {
        animation: none;
    }
    .review-slide.active {
        animation: none;
    }
}
