/* ==========================================================================
   Al Iman Quran Academy - Admissions Page "How It Works" Timeline CSS
   ========================================================================== */

.sbw-at-section * {
    font-family: 'Philosopher', sans-serif;
    box-sizing: border-box;
}

.sbw-at-section {
    position: relative;
    padding: 100px 0;
    background-color: var(--sbw-bg-light, #f7faf8);
    color: #1a2923;
    overflow: hidden;
}

.sbw-at-container {
    position: relative;
    z-index: 5;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0 24px;
}

/* Header */
.sbw-at-header {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 60px auto;
}

.sbw-at-subtitle {
    display: inline-block;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--sbw-primary, #058349);
    letter-spacing: 1.5px;
    margin-bottom: 8px;
}

.sbw-at-main-title {
    font-size: 40px;
    font-weight: 700;
    color: #1a2923;
    line-height: 1.2;
    margin: 0 0 16px 0;
}

.sbw-at-main-title span {
    color: var(--sbw-primary, #058349);
}

.sbw-at-desc {
    font-size: 16.5px;
    color: #55635d;
    line-height: 1.6;
    margin: 0;
}

/* Timeline Wrapper */
.sbw-at-timeline-wrapper {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px 0;
}

/* Central Vertical Line Container with Start/End Caps */
.sbw-at-timeline-line {
    position: absolute;
    top: 25px;
    bottom: 25px;
    left: 50%;
    width: 4px;
    transform: translateX(-50%);
    z-index: 1;
}

/* Background Line (Theme Gold) */
.sbw-at-line-bg {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: var(--sbw-secondary, #FFB606);
    border-radius: 4px;
    opacity: 0.8;
}

/* Dynamic On-Scroll Progress Fill Line (Primary Green) */
.sbw-at-line-progress {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 0%;
    background-color: var(--sbw-primary, #058349);
    border-radius: 4px;
    box-shadow: 0 0 12px rgba(5, 131, 73, 0.6);
    transition: height 0.15s ease-out;
}

/* Start & End Decorative Glowing Cap Circles (Hides Raw Ends!) */
.sbw-at-cap {
    position: absolute;
    left: 50%;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: var(--sbw-secondary, #FFB606);
    border: 3px solid #ffffff;
    box-shadow: 0 0 12px rgba(255, 182, 6, 0.6);
    transform: translateX(-50%);
    z-index: 3;
}

.sbw-at-cap-start {
    top: -8px;
}

.sbw-at-cap-end {
    bottom: -8px;
}

/* Step Item */
.sbw-at-step-item {
    position: relative;
    display: flex;
    width: 100%;
    margin-bottom: 50px;
    z-index: 2;
}

.sbw-at-step-item:last-child {
    margin-bottom: 0;
}

/* Left vs Right Alignment */
.sbw-at-step-item.sbw-at-left {
    justify-content: flex-start;
    padding-right: 50%;
}

.sbw-at-step-item.sbw-at-right {
    justify-content: flex-end;
    padding-left: 50%;
}

/* Center Node Badge */
.sbw-at-node {
    position: absolute;
    left: 50%;
    top: 24px;
    transform: translate(-50%, 0);
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background-color: var(--sbw-secondary, #FFB606);
    color: #091D17;
    font-size: 19px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 4px solid #ffffff;
    box-shadow: 0 6px 20px rgba(255, 182, 6, 0.45);
    z-index: 5;
    transition: transform 0.4s ease, background-color 0.4s ease, color 0.4s ease;
}

.sbw-at-step-item:hover .sbw-at-node {
    transform: translate(-50%, 0) scale(1.12);
    background-color: var(--sbw-primary, #058349);
    color: #ffffff;
    box-shadow: 0 8px 25px rgba(5, 131, 73, 0.45);
}

/* Step Card */
.sbw-at-card {
    background-color: #ffffff;
    border-radius: 20px;
    padding: 30px;
    width: 90%;
    border: 2px solid rgba(5, 131, 73, 0.12);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
    transition: transform 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}

.sbw-at-step-item.sbw-at-left .sbw-at-card {
    margin-right: 36px;
}

.sbw-at-step-item.sbw-at-right .sbw-at-card {
    margin-left: 36px;
}

.sbw-at-step-item:hover .sbw-at-card {
    transform: translateY(-6px);
    border-color: var(--sbw-primary, #058349);
    box-shadow: 0 18px 45px rgba(5, 131, 73, 0.16);
}

.sbw-at-card-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 12px;
}

.sbw-at-icon {
    font-size: 26px;
}

.sbw-at-step-title {
    font-size: 20px;
    font-weight: 700;
    color: #1a2923;
    margin: 0;
}

.sbw-at-step-desc {
    font-size: 15px;
    color: #55635d;
    line-height: 1.6;
    margin: 0;
}

/* Responsive Queries */
@media (max-width: 767px) {
    .sbw-at-timeline-line {
        left: 28px;
        transform: none;
    }
    .sbw-at-step-item.sbw-at-left,
    .sbw-at-step-item.sbw-at-right {
        justify-content: flex-start;
        padding-left: 70px;
        padding-right: 0;
    }
    .sbw-at-node {
        left: 28px;
        transform: translate(-50%, 0);
        width: 44px;
        height: 44px;
        font-size: 16px;
    }
    .sbw-at-step-item:hover .sbw-at-node {
        transform: translate(-50%, 0) scale(1.1);
    }
    .sbw-at-step-item.sbw-at-left .sbw-at-card,
    .sbw-at-step-item.sbw-at-right .sbw-at-card {
        width: 100%;
        margin-left: 0;
        margin-right: 0;
        padding: 22px 20px;
    }
}
