/* How It Works Page Styles - Mobile First */

.main-box {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 0.75rem 1rem;
    overflow-x: hidden;
}

/* === PAGE HEADER === */
.hiw-page-header {
    text-align: center;
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hiw-page-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--black);
    margin-bottom: 0.75rem;
    line-height: 1.15;
}

.hiw-page-header p {
    font-size: 0.95rem;
    color: var(--gray);
    max-width: 600px;
    line-height: 1.6;
}

/* === ROLE TOGGLE === */
.role-toggle-container {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
    padding: 0 0.5rem;
    overflow: hidden;
}

.role-toggle {
    display: inline-flex;
    background-color: var(--light-bg);
    border-radius: var(--radius-md);
    padding: 0.25rem;
    gap: 0.25rem;
    width: 100%;
    max-width: 400px;
    box-sizing: border-box;
}

.role-toggle-btn {
    flex: 1;
    min-width: 0;
    padding: 0.65rem 0.5rem;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base);
    background: transparent;
    color: var(--black);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
}

.toggle-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.toggle-icon svg {
    width: 20px;
    height: 20px;
}

.toggle-label {
    display: block;
    white-space: nowrap;
}

.role-toggle-btn.active {
    background-color: var(--primary);
    color: var(--white);
    box-shadow: 0 2px 8px rgba(255, 165, 0, 0.3);
}

.role-toggle-btn.active .toggle-icon svg {
    stroke: var(--white);
}

.role-toggle-btn:not(.active):hover {
    background-color: var(--orange-bg);
    color: var(--primary);
}

.role-toggle-btn:not(.active) .toggle-icon svg {
    stroke: var(--gray);
}

.role-toggle-btn:not(.active):hover .toggle-icon svg {
    stroke: var(--primary);
}

/* === CONTENT SECTIONS === */
.role-content {
    display: none;
}

.role-content.active {
    display: block;
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === VIDEO SECTION === */
.video-section {
    background: var(--light-bg);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    margin-bottom: 2rem;
    text-align: center;
}

.video-section h2 {
    text-align: center;
}

.video-section p {
    color: var(--gray);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: var(--radius-md);
    background: var(--black);
    box-shadow: var(--shadow-lg);
}

.video-container iframe,
.video-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.video-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: var(--white);
}

.video-placeholder svg {
    width: 80px;
    height: 80px;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.video-placeholder p {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--white);
    margin: 0;
}

/* === STEPS SECTION === */
.steps-section {
    margin-top: 2rem;
    overflow: hidden;
}

.steps-section h2 {
    text-align: center;
}

/* Mobile: Centered vertical layout */
.steps-grid {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0;
    max-width: 900px;
    margin: 0 auto;
    padding-left: 0;
    align-items: center;
}

/* Hide the main timeline on mobile */
.steps-grid::before {
    display: none;
}

/* Step card becomes a flex container for vertical layout */
.step-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 0.75rem;
    border-radius: 10px;
    text-align: left;
    max-width: 100%;
    background: transparent;
    box-shadow: none;
    position: relative;
    z-index: 2;
}

/* Step number centered */
.step-number {
    position: relative;
    left: auto;
    top: auto;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--primary);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 700;
    flex-shrink: 0;
    z-index: 3;
    order: 0;
    margin: 0;
}

/* Connector line between step number and card content */
.step-card::before {
    content: '';
    width: 2px;
    height: 16px;
    background: var(--primary);
    opacity: 0.3;
    order: 1;
}

/* Step content card styling */
.step-content {
    background: var(--white);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
    width: 100%;
    order: 2;
}

/* Connector line below card (between steps) */
.step-card:not(:last-child)::after {
    content: '';
    width: 2px;
    height: 24px;
    background: var(--primary);
    opacity: 0.3;
    order: 3;
}

.step-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
    text-align: left;
}

.step-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--black);
    margin: 0 0 0.5rem 0;
    text-align: left;
}

.step-description {
    color: var(--gray-dark);
    line-height: 1.6;
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
    text-align: left;
}

.step-features {
    list-style: none;
    padding: 0;
    margin: 1rem 0 0 0;
    text-align: left;
    display: inline-block;
}

.step-features li {
    padding: 0.35rem 0;
    padding-left: 1.25rem;
    position: relative;
    color: var(--gray-dark);
    font-size: 0.9rem;
}

.step-features li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: 700;
}

/* === CTA SECTION === */
.cta-section {
    margin-top: 2.5rem;
    padding: 2rem 1.25rem;
    text-align: center;
}

.cta-section h2 {
    text-align: center;
}

.cta-section p {
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    color: var(--gray);
}

.cta-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    justify-content: center;
}

.cta-btn {
    width: 100%;
    padding: 0.85rem 1.5rem;
    border-radius: var(--radius-md);
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all var(--transition-base);
    display: inline-block;
    text-align: center;
}

.cta-btn-primary {
    background-color: var(--primary);
    color: var(--white);
}

.cta-btn-primary:hover,
.cta-btn-primary:focus {
    background-color: var(--secondary);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.cta-btn-secondary {
    background-color: transparent;
    color: var(--black);
    border: 2px solid var(--border);
}

.cta-btn-secondary:hover,
.cta-btn-secondary:focus {
    background-color: var(--white);
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
}

/* === RESPONSIVENESS - Mobile First (min-width only) === */

/* Small tablets (480px+) */
@media screen and (min-width: 480px) {
    .main-box {
        padding: 3rem 1rem 1.5rem;
    }

    .hiw-page-header h1 {
        font-size: 2.5rem;
    }

    .role-toggle {
        max-width: 450px;
    }

    .role-toggle-btn {
        flex-direction: row;
        justify-content: center;
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
        gap: 0.5rem;
    }

    .video-section {
        padding: 1.5rem;
        margin-bottom: 2.5rem;
    }

    .steps-grid {
        padding-left: 65px;
        gap: 1.75rem;
        align-items: stretch;
    }

    .steps-grid::before {
        display: block;
        content: '';
        position: absolute;
        left: 26px;
        top: 50px;
        bottom: 50px;
        width: 2px;
        background: var(--primary);
        opacity: 0.2;
        z-index: 1;
    }

    .step-card {
        position: relative;
        display: block;
        background: var(--white);
        border-radius: var(--radius-md);
        padding: 1.5rem;
        box-shadow: var(--shadow-sm);
        text-align: left;
    }

    .step-card::before,
    .step-card::after {
        display: none;
    }

    .step-content {
        background: transparent;
        box-shadow: none;
        padding: 0;
    }

    .step-number {
        position: absolute;
        left: -50px;
        top: 1.5rem;
        width: 38px;
        height: 38px;
        font-size: 1.1rem;
    }

    .step-header {
        flex-direction: row;
        align-items: center;
        text-align: left;
    }

    .step-title {
        font-size: 1.2rem;
        text-align: left;
    }

    .step-description {
        text-align: left;
    }

    .step-features {
        text-align: left;
        display: block;
    }

    .cta-section {
        margin-top: 3rem;
        padding: 2.5rem 1.5rem;
    }

    .cta-buttons {
        flex-direction: column;
        max-width: 300px;
        margin: 0 auto;
    }

    .cta-btn {
        width: 100%;
        text-align: center;
    }
}

/* Tablets (768px+) */
@media screen and (min-width: 768px) {
    .main-box {
        padding: 3.5rem 1.5rem 2rem;
    }

    .hiw-page-header {
        margin-bottom: 3rem;
    }

    .hiw-page-header h1 {
        font-size: 2.75rem;
    }

    .hiw-page-header p {
        font-size: 1.1rem;
    }

    .role-toggle-container {
        margin-bottom: 3rem;
        padding: 0 1rem;
    }

    .role-toggle {
        gap: 0.35rem;
        border-radius: var(--radius-lg);
        max-width: 500px;
    }

    .role-toggle-btn {
        padding: 0.85rem 1.5rem;
        font-size: 0.95rem;
        border-radius: var(--radius-md);
    }

    .toggle-icon svg {
        width: 22px;
        height: 22px;
    }

    .video-section {
        padding: 2.5rem;
        border-radius: var(--radius-lg);
        margin-bottom: 3rem;
    }

    .video-section p {
        font-size: 1.05rem;
        margin-bottom: 2rem;
    }

    .steps-section {
        margin-top: 3rem;
    }

    .steps-grid {
        padding-left: 90px;
        max-width: 800px;
        gap: 2rem;
    }

    .steps-grid::before {
        left: 43px;
    }

    .step-card {
        padding: 2rem;
    }

    .step-number {
        left: -70px;
        width: 48px;
        height: 48px;
        font-size: 1.4rem;
    }

    .step-title {
        font-size: 1.4rem;
    }

    .step-description {
        font-size: 1.05rem;
        line-height: 1.7;
        margin-bottom: 1rem;
    }

    .step-features li {
        padding: 0.5rem 0;
        padding-left: 1.5rem;
        font-size: 1rem;
    }

    .cta-section {
        margin-top: 4rem;
        padding: 3rem 2rem;
        border-radius: var(--radius-lg);
    }

    .cta-section p {
        font-size: 1.1rem;
        margin-bottom: 2rem;
    }

    .cta-buttons {
        flex-direction: row;
        gap: 1rem;
        max-width: none;
    }

    .cta-btn {
        width: auto;
        padding: 0.85rem 2rem;
    }
}

/* Desktop (1024px+) */
@media screen and (min-width: 1024px) {
    .main-box {
        padding: 4rem 2rem 2rem;
    }

    .hiw-page-header h1 {
        font-size: 3rem;
    }

    .hiw-page-header p {
        font-size: 1.2rem;
    }

    .role-toggle {
        border-radius: var(--radius-full);
        padding: 0.4rem;
        gap: 0.4rem;
        max-width: 550px;
    }

    .role-toggle-btn {
        padding: 0.9rem 2rem;
        font-size: 1rem;
        border-radius: var(--radius-full);
    }

    .toggle-icon svg {
        width: 24px;
        height: 24px;
    }

    .video-section {
        padding: 3rem;
    }

    .steps-grid {
        max-width: 950px;
        padding-left: 110px;
    }

    .step-card {
        padding: 2.5rem;
    }

    .step-number {
        left: -85px;
        width: 56px;
        height: 56px;
        font-size: 1.6rem;
    }

    .steps-grid::before {
        left: 53px;
        width: 3px;
        opacity: 0.25;
    }

    .cta-section {
        padding: 4rem 3rem;
    }

    .cta-btn {
        padding: 0.9rem 2rem;
        font-size: 1.05rem;
    }
}

/* Large Desktop (1200px+) */
@media screen and (min-width: 1200px) {
    .hiw-page-header h1 {
        font-size: 3.5rem;
    }

    .steps-grid {
        max-width: 1000px;
        padding-left: 120px;
    }

    .step-card {
        padding: 3rem;
    }

    .step-number {
        left: -90px;
        width: 60px;
        height: 60px;
        font-size: 1.8rem;
    }

    .steps-grid::before {
        left: 58px;
    }

}
