/* howitworks.css - Styles for How It Works page (light theme adaptation) - v2.0 */
/* Updated: Z-structure layout styles */

/* Step Cards */
.hiw-step-card {
    padding: 24px;
    border: 1px solid #E2EFE7;
    border-radius: 20px;
    background: #FFFFFF;
    margin-bottom: 16px;
}

.hiw-step__title {
    font-size: clamp(1.875rem, 2.2vw, 2.5rem);
    font-weight: 700;
    color: #232323;
    margin-bottom: 12px;
}

/* Chips */
.hiw-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0;
}

.hiw-chip {
    padding: 8px 12px;
    border-radius: 999px;
    background: #F8FAF9;
    border: 1px solid #E2EFE7;
    color: #6D7680;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.hiw-chip:hover {
    background: #F0F5F2;
    border-color: #62D487;
}

.hiw-chip[aria-pressed="true"] {
    background: #62D487;
    border-color: #62D487;
    color: #FFFFFF;
    box-shadow: 0 0 0 1px rgba(98, 212, 135, 0.2);
}

/* Progress Rail */
.hiw-progress-rail {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 10px;
    flex-wrap: wrap;
}

.hiw-pill-small {
    padding: 6px 10px;
    border-radius: 999px;
    background: #F8FAF9;
    border: 1px solid #E2EFE7;
    color: #232323;
    font-size: 12px;
    font-weight: 500;
}

.hiw-arrow {
    opacity: 0.5;
    color: #6D7680;
    font-size: 14px;
}

/* PDF Structure */
.hiw-pdf-structure {
    background: #F8FAF9;
    border: 1px dashed #E2EFE7;
    border-radius: 14px;
    padding: 12px;
    margin-top: 10px;
}

.hiw-pdf-structure h3 {
    margin: 0 0 8px;
    font-size: 16px;
}

.hiw-pdf-structure ul {
    margin: 0;
    padding-left: 18px;
}

.hiw-pdf-structure li {
    margin-bottom: 4px;
}

/* Image Container - Optimized sizes */
.hiw-image-container {
    border: 1px solid #E2EFE7;
    border-radius: 14px;
    background: #F8FAF9;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 100%;
}

.hiw-image {
    width: 100%;
    height: auto;
    max-width: 500px;
    max-height: 400px;
    object-fit: contain;
    display: block;
}

.hiw-image-small {
    max-height: 250px;
}

.hiw-image-small .hiw-image {
    max-height: 250px;
}

/* Mini Demo */
.hiw-demo-form {
    margin-top: 12px;
}

.hiw-demo-input {
    flex: 1 1 280px;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid #E2EFE7;
    background: #FFFFFF;
    color: #232323;
    font-size: 14px;
    min-width: 200px;
}

.hiw-demo-input:focus {
    outline: none;
    border-color: #62D487;
    box-shadow: 0 0 0 3px rgba(98, 212, 135, 0.1);
}

.hiw-demo-btn {
    padding: 12px 18px;
    border-radius: 999px;
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    color: #FFFFFF;
    font-weight: 700;
    background: #62D487;
    font-size: 14px;
    transition: background 0.2s ease;
}

.hiw-demo-btn:hover {
    background: #3CB371;
}

/* Skeleton Loader */
.hiw-skeleton {
    height: 120px;
    border-radius: 14px;
    background: linear-gradient(90deg, #F8FAF9 25%, #E2EFE7 37%, #F8FAF9 63%);
    background-size: 400% 100%;
    animation: shimmer 1.2s ease-in-out infinite;
}

@keyframes shimmer {
    0% {
        background-position: 100% 0;
    }
    100% {
        background-position: -100% 0;
    }
}

/* Mock Card */
.hiw-mock-card {
    display: none;
    border: 1px solid #E2EFE7;
    border-radius: 14px;
    padding: 12px;
    background: #F8FAF9;
    margin-top: 12px;
}

.hiw-mock-card.show {
    display: block;
    animation: fadeIn 0.18s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(4px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

.hiw-mock-card strong {
    display: block;
    font-size: 16px;
    color: #232323;
    margin-bottom: 4px;
}

.hiw-mock-card .mock-details {
    color: #6D7680;
    font-size: 14px;
    margin-bottom: 8px;
}

.hiw-mock-card ol {
    margin: 10px 0 0;
    padding-left: 18px;
    color: #6D7680;
    font-size: 14px;
}

.hiw-mock-card .mock-cta {
    margin-top: 12px;
}

/* Trust Section */
.hiw-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.hiw-badge {
    background: #F8FAF9;
    border: 1px solid #E2EFE7;
    color: #232323;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 500;
}

.hiw-trust-quotes {
    display: grid;
    gap: 12px;
    margin-top: 12px;
}

.hiw-trust-card {
    border: 1px solid #E2EFE7;
    border-radius: 16px;
    padding: 12px;
    background: #FFFFFF;
    color: #6D7680;
    font-size: 14px;
    font-style: italic;
}

/* FAQ Accordion */
.hiw-accordion {
    border: 1px solid #E2EFE7;
    border-radius: 16px;
    overflow: hidden;
}

.hiw-acc-item {
    border-bottom: 1px solid #E2EFE7;
}

.hiw-acc-item:last-child {
    border-bottom: none;
}

.hiw-acc-btn {
    width: 100%;
    text-align: left;
    background: #FFFFFF;
    color: #232323;
    border: 0;
    padding: 14px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: background 0.2s ease;
}

.hiw-acc-btn:hover {
    background: #F8FAF9;
}

.hiw-acc-icon {
    font-size: 20px;
    color: #62D487;
    transition: transform 0.3s ease;
}

.hiw-acc-item[aria-expanded="true"] .hiw-acc-icon {
    transform: rotate(45deg);
}

.hiw-acc-panel {
    max-height: 0;
    overflow: hidden;
    padding: 0 16px;
    color: #6D7680;
    font-size: 14px;
    line-height: 1.6;
    transition: max-height 0.3s ease-out, padding 0.3s ease-out;
}

.hiw-acc-item[aria-expanded="true"] .hiw-acc-panel {
    max-height: 500px;
    padding: 0 16px 14px;
}

/* CTA Footer */
.hiw-cta-footer {
    margin: 24px 0;
    padding: 20px;
    border: 1px solid #E2EFE7;
    border-radius: 16px;
    background: #F8FAF9;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.hiw-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    border-radius: 999px;
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    color: #FFFFFF;
    font-weight: 700;
    background: #62D487;
    font-size: 14px;
    transition: background 0.2s ease;
    white-space: nowrap;
}

.hiw-cta-btn:hover {
    background: #3CB371;
}

/* Layout Helpers */
.hiw-hero,
.hiw-step,
.hiw-trust {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.hiw-hero__body,
.hiw-hero__media,
.hiw-step__content,
.hiw-step__media,
.hiw-trust__content,
.hiw-trust__media {
    width: 100%;
}

.hiw-step__media {
    margin-top: 20px;
}

.hiw-step__media--stacked {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

@media (min-width: 1024px) {
    .hiw-hero {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 48px;
    }

    .hiw-hero__body {
        width: 50%;
        padding-right: 32px;
    }

    .hiw-hero__media {
        width: 50%;
        padding-left: 32px;
        display: flex;
        justify-content: flex-end;
    }

    .hiw-hero__media .hiw-image-container {
        margin-left: auto;
    }

    .hiw-step {
        flex-direction: row;
        align-items: center;
        gap: 28px;
    }

    .hiw-step__content {
        width: 50%;
        padding-right: 28px;
    }

    .hiw-step__media {
        width: 50%;
        padding-left: 28px;
        display: flex;
        justify-content: flex-end;
        margin-top: 0;
    }

    .hiw-step__media .hiw-image-container {
        margin-left: auto;
    }

    .hiw-step--reverse {
        flex-direction: row-reverse;
    }

    .hiw-step--reverse .hiw-step__content {
        padding-right: 0;
        padding-left: 28px;
    }

    .hiw-step--reverse .hiw-step__media {
        padding-left: 0;
        padding-right: 28px;
        justify-content: flex-start;
    }

    .hiw-step--reverse .hiw-step__media .hiw-image-container {
        margin-right: auto;
        margin-left: 0;
    }

    .hiw-step__media--stacked {
        align-items: flex-end;
    }

    .hiw-trust {
        flex-direction: row;
        align-items: center;
        gap: 32px;
    }

    .hiw-trust__content {
        width: 50%;
        padding-right: 32px;
    }

    .hiw-trust__media {
        width: 50%;
        padding-left: 32px;
        display: flex;
        justify-content: flex-end;
    }

    .hiw-trust__media .hiw-image-container {
        margin-left: auto;
    }
}

/* Responsive */
@media (max-width: 1024px) {
    .hiw-cta-footer {
        flex-direction: column;
        text-align: center;
    }
    
    .hiw-cta-btn {
        width: 100%;
        justify-content: center;
    }
}
