/* ============================================================
   Sabi Logistics — Why Choose Us (Premium Minimal)
   ============================================================ */

.why-section {
    position: relative;
    padding: clamp(5rem, 8vw, 7.5rem) 0;
    overflow: hidden;
    background: linear-gradient(180deg, #0B1020 0%, #101828 100%);
}

/* Background */
.why-section__bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.why-section__grid {
    position: absolute;
    inset: 0;
    opacity: 0.35;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
    background-size: 64px 64px;
    animation: whyGridDrift 48s linear infinite;
}

.why-section__glow {
    position: absolute;
    width: min(520px, 60vw);
    height: min(520px, 60vw);
    top: 8%;
    right: -8%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(63, 67, 165, 0.12) 0%, transparent 68%);
    filter: blur(40px);
}

@keyframes whyGridDrift {
    from { background-position: 0 0, 0 0; }
    to   { background-position: 64px 64px, 64px 64px; }
}

/* Layout */
.why-section__inner {
    position: relative;
    z-index: 1;
    width: var(--container);
    max-width: 100%;
    margin-inline: auto;
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    gap: clamp(2.5rem, 5vw, 5rem);
    align-items: center;
}

/* Left content */
.why-section__content {
    max-width: 34rem;
}

.why-section__label {
    display: inline-block;
    margin-bottom: 1.25rem;
    font-family: var(--font-ui, 'Poppins', sans-serif);
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #FF6B00;
}

.why-section__heading {
    margin: 0 0 1.25rem;
    font-family: var(--font-heading, 'Montserrat', sans-serif);
    font-size: clamp(2.25rem, 4.2vw, 3.75rem);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -0.03em;
    color: #fff;
}

.why-section__desc {
    margin: 0 0 2rem;
    font-size: clamp(1rem, 1.2vw, 1.125rem);
    line-height: 1.85;
    color: rgba(255, 255, 255, 0.72);
}

.why-section__cta {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.9375rem 1.75rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #fff;
    font-family: var(--font-ui, 'Poppins', sans-serif);
    font-size: 0.9375rem;
    font-weight: 600;
    text-decoration: none;
    transition:
        transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
        border-color 0.35s ease,
        background 0.35s ease,
        box-shadow 0.35s ease;
}

.why-section__cta svg {
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.why-section__cta:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 107, 0, 0.35);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18);
}

.why-section__cta:hover svg {
    transform: translateX(3px);
}

/* Card grid — CMS-safe, auto-flow */
.why-section__cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    grid-auto-flow: dense;
    align-content: start;
}

/* Card base */
.why-card {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 9.5rem;
    padding: clamp(1.25rem, 2vw, 1.75rem);
    border-radius: 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.07);
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.02) 100%);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
    transition:
        transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
        border-color 0.4s ease,
        box-shadow 0.4s ease,
        background 0.4s ease;
}

.why-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(255, 107, 0, 0.06) 0%, transparent 55%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.why-card:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 255, 255, 0.12);
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.03) 100%);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.22);
}

.why-card:hover::before {
    opacity: 1;
}

/* Content-driven sizes — no nth-child */
.why-card--compact {
    min-height: 8.75rem;
    justify-content: space-between;
}

.why-card--feature {
    min-height: 11.5rem;
}

.why-card--wide {
    grid-column: 1 / -1;
    min-height: 10.5rem;
}

.why-card__dot {
    display: block;
    width: 0.5rem;
    height: 0.5rem;
    margin-bottom: 1.125rem;
    border-radius: 50%;
    background: #FF6B00;
    box-shadow: 0 0 12px rgba(255, 107, 0, 0.45);
    animation: whyDotPulse 3.5s ease-in-out infinite;
}

.why-card__title {
    margin: 0 0 0.625rem;
    font-family: var(--font-heading, 'Montserrat', sans-serif);
    font-size: clamp(1.0625rem, 1.4vw, 1.375rem);
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.02em;
    color: #fff;
}

.why-card--compact .why-card__title {
    margin-bottom: 0;
}

.why-card__text {
    margin: 0;
    font-size: clamp(0.875rem, 1vw, 0.9375rem);
    line-height: 1.75;
    color: rgba(255, 255, 255, 0.68);
}

@keyframes whyDotPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
        box-shadow: 0 0 12px rgba(255, 107, 0, 0.45);
    }
    50% {
        transform: scale(1.15);
        opacity: 0.85;
        box-shadow: 0 0 18px rgba(255, 107, 0, 0.55);
    }
}

/* Scroll reveal — subtle stagger via --why-delay from CMS loop */
.why-section.is-visible .why-card {
    animation: whyCardIn 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
    animation-delay: var(--why-delay, 0s);
}

@keyframes whyCardIn {
    from {
        transform: translateY(14px);
    }
    to {
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 1100px) {
    .why-section__inner {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .why-section__content {
        max-width: 40rem;
        text-align: center;
        margin-inline: auto;
    }

    .why-section__cta {
        margin-inline: auto;
    }
}

@media (max-width: 640px) {
    .why-section__cards {
        grid-template-columns: 1fr;
    }

    .why-card--wide {
        grid-column: auto;
    }

    .why-section__cta {
        width: 100%;
        justify-content: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    .why-section__grid {
        animation: none;
    }

    .why-card__dot {
        animation: none;
    }

    .why-section.is-visible .why-card {
        animation: none;
    }

    .why-card:hover,
    .why-section__cta:hover {
        transform: none;
    }
}
