/* AB Detailing Why Choose Us Widget Styles - Premium Engineering Theme */

.ab-wcu-section {
    padding: 90px 20px;
    background-color: #ffffff;
}

.ab-wcu-container {
    max-width: 1100px;
    margin: 0 auto;
}

.ab-wcu-header {
    text-align: center;
    max-width: 750px;
    margin: 0 auto 55px auto;
}

.ab-wcu-title {
    font-size: 38px;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 15px;
    letter-spacing: -0.5px;
    position: relative;
    display: inline-block;
}

.ab-wcu-title::after {
    content: '';
    position: absolute;
    width: 60px;
    height: 4px;
    background-color: #2563EB;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
}

.ab-wcu-subtitle {
    font-size: 22px;
    font-weight: 600;
    color: #2563EB;
    margin: 20px 0 18px 0;
    line-height: 1.4;
}

.ab-wcu-desc {
    font-size: 16px;
    color: #64748b;
    line-height: 1.7;
}

/* Table */
.ab-wcu-table-wrap {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

.ab-wcu-table {
    display: flex;
    flex-direction: column;
}

.ab-wcu-row {
    display: flex;
    border-bottom: 1px solid #f1f5f9;
    transition: background-color 0.25s ease;
}

.ab-wcu-row:last-child {
    border-bottom: none;
}

.ab-wcu-row:not(.ab-wcu-table-header):hover {
    background-color: #f8fafc;
}

.ab-wcu-table-header {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #ffffff;
}

.ab-wcu-table-header .ab-wcu-col {
    font-weight: 700;
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 18px 30px;
}

/* Flexbox Columns */
.ab-wcu-col {
    flex: 1;
    padding: 18px 30px;
    display: flex;
    align-items: flex-start;
    gap: 14px; /* Exact gap between icon and text */
    font-size: 15px;
    line-height: 1.5;
}

.ab-wcu-text {
    flex: 1;
}

.ab-wcu-del-col {
    font-weight: 700;
    color: #0f172a;
}

.ab-wcu-icon-check {
    color: #2563EB;
    font-weight: 900;
    font-size: 16px;
    flex-shrink: 0;
    margin-top: 1px;
}

.ab-wcu-ben-col {
    color: #475569;
    border-left: 1px solid #f1f5f9;
}

.ab-wcu-table-header .ab-wcu-ben-col {
    border-left: 1px solid rgba(255,255,255,0.1);
    color: #e2e8f0;
}

.ab-wcu-icon-arrow {
    display: none; /* Hidden on desktop */
}

/* Alternate row shading */
.ab-wcu-row:nth-child(even):not(.ab-wcu-table-header) {
    background-color: #fafbfc;
}
.ab-wcu-row:nth-child(even):not(.ab-wcu-table-header):hover {
    background-color: #f1f5f9;
}

/* Responsive */
@media (max-width: 768px) {
    .ab-wcu-section { padding: 60px 15px; }
    .ab-wcu-title { font-size: 30px; }
    
    .ab-wcu-row { 
        flex-direction: column; 
    }
    
    .ab-wcu-col { 
        padding: 16px 22px; 
    }
    
    .ab-wcu-ben-col {
        border-left: none;
        border-top: 1px dashed #e2e8f0;
        font-size: 14px;
        background-color: #f8fafc;
    }
    
    .ab-wcu-icon-arrow {
        display: inline-block; /* Show on mobile */
        color: #94a3b8;
        font-weight: 900;
        flex-shrink: 0;
        margin-top: 1px;
    }
    
    .ab-wcu-table-header { 
        display: none; 
    }
    
    .ab-wcu-del-col { 
        font-size: 16px; 
    }
}

/* =====================================================================
   Smooth, light animations (opacity/transform only = GPU friendly)
   ===================================================================== */

/* --- Scroll reveal: hidden state --- */
.ab-wcu-anim .ab-wcu-r {
    opacity: 0;
    transform: translate3d(0, 18px, 0);
    will-change: opacity, transform;
    transition:
        opacity 0.7s ease var(--d, 0ms),
        transform 0.7s cubic-bezier(0.22, 1, 0.36, 1) var(--d, 0ms),
        background-color 0.25s ease;
}

/* Header items cascade one after another */
.ab-wcu-anim .ab-wcu-header > .ab-wcu-r:nth-child(2) { --d: 90ms; }
.ab-wcu-anim .ab-wcu-header > .ab-wcu-r:nth-child(3) { --d: 180ms; }

/* --- Scroll reveal: visible state --- */
.ab-wcu-anim .ab-wcu-header.is-visible .ab-wcu-r,
.ab-wcu-anim .ab-wcu-r.is-visible {
    opacity: 1;
    transform: none;
    will-change: auto;
}

/* Title underline grows from the centre */
.ab-wcu-anim .ab-wcu-title::after {
    transform: translateX(-50%) scaleX(0);
    transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.35s;
}
.ab-wcu-anim .ab-wcu-header.is-visible .ab-wcu-title::after {
    transform: translateX(-50%) scaleX(1);
}

/* Check icon pops in softly with its row */
.ab-wcu-icon-check,
.ab-wcu-icon-arrow {
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.4s ease;
}
.ab-wcu-anim .ab-wcu-row.ab-wcu-r:not(.is-visible) .ab-wcu-icon-check {
    opacity: 0;
    transform: scale(0.5);
}

/* --- Hover polish (only on devices that really hover) --- */
.ab-wcu-row {
    position: relative;
}

.ab-wcu-row:not(.ab-wcu-table-header)::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background-color: #2563EB;
    transform: scaleY(0);
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
    pointer-events: none;
}

@media (hover: hover) and (pointer: fine) {
    .ab-wcu-row:not(.ab-wcu-table-header):hover::before {
        transform: scaleY(1);
    }
    .ab-wcu-row:not(.ab-wcu-table-header):hover .ab-wcu-icon-check {
        transform: scale(1.18);
    }
    .ab-wcu-row:not(.ab-wcu-table-header):hover .ab-wcu-icon-arrow {
        transform: translateX(3px);
    }
}

/* --- Failsafe: if the JS never runs, show everything after 3s --- */
@keyframes ab-wcu-failsafe {
    to { opacity: 1; transform: none; }
}
@keyframes ab-wcu-failsafe-line {
    to { transform: translateX(-50%) scaleX(1); }
}
.ab-wcu-anim:not(.ab-wcu-ready) .ab-wcu-r,
.ab-wcu-anim:not(.ab-wcu-ready) .ab-wcu-row.ab-wcu-r .ab-wcu-icon-check {
    animation: ab-wcu-failsafe 0.01s linear 3s forwards;
}
.ab-wcu-anim:not(.ab-wcu-ready) .ab-wcu-title::after {
    animation: ab-wcu-failsafe-line 0.01s linear 3s forwards;
}

/* --- Smaller travel on phones --- */
@media (max-width: 768px) {
    .ab-wcu-anim .ab-wcu-r {
        transform: translate3d(0, 12px, 0);
        transition-duration: 0.55s, 0.55s, 0.25s;
    }
}

/* --- Respect "reduce motion" system setting --- */
@media (prefers-reduced-motion: reduce) {
    .ab-wcu-anim .ab-wcu-r,
    .ab-wcu-anim .ab-wcu-row.ab-wcu-r:not(.is-visible) .ab-wcu-icon-check {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
        animation: none !important;
    }
    .ab-wcu-anim .ab-wcu-title::after {
        transform: translateX(-50%) scaleX(1) !important;
        transition: none !important;
        animation: none !important;
    }
    .ab-wcu-row::before,
    .ab-wcu-icon-check,
    .ab-wcu-icon-arrow {
        transition: none !important;
    }
}
