/* =========================================
   HOW I WORK PAGE STYLES
   ========================================= */

/* --- General Reset & Scoped Styles --- */
.how-i-work-page * {
    box-sizing: border-box;
}

.how-i-work-page {
    /* font-family: 'Open Sans', Arial, sans-serif; */
    color: var(--color-text-main);
    background-color: var(--color-white); 
    line-height: 1.6;
}

.how-i-work-page a {
    text-decoration: none;
    color: inherit;
}

.how-i-work-page ul {
    list-style: none;
    padding-left: 0;
}

.how-i-work-page .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.how-i-work-page .section-title {
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.how-i-work-page .section-title::after {
    content: '';
    display: block;
    width: 40px;
    height: 1px;
    background-color: var(--color-text-light); 
}

/* --- Hero Section --- */
.how-i-work-page .hero {
    position: relative;
    height: 500px;
    background-color: var(--color-bg-footer-top);
    display: flex;
    align-items: center;
    overflow: hidden;
}

.how-i-work-page .hero-image {
    position: absolute;
    right: 0;
    top: 0;
    width: 70%;
    height: 100%;
    z-index: 1;
}

.how-i-work-page .hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

.how-i-work-page .hero-content {
    position: relative;
    z-index: 2;
    width: 55%;
    height: 100%;
    background-color: var(--color-primary);
    color: var(--color-white);
    padding: 0 5% 0 calc(max(20px, (100vw - 1200px) / 2 + 20px)); 
    display: flex;
    flex-direction: column;
    justify-content: center;
    clip-path: polygon(0 0, 100% 0, 75% 100%, 0% 100%);
}

.how-i-work-page .hero-content h2 {
    font-size: 4rem;
    font-family: 'Times New Roman', Georgia, serif;
    font-weight: 400;
    margin-bottom: 20px;
}

.how-i-work-page .hero-content p {
    font-size: 1.1rem;
    font-weight: 300;
    max-width: 400px;
    line-height: 1.6;
}

/* --- Steps Section --- */
.how-i-work-page .steps-section {
    padding: 60px 0;
    background-color: var(--color-bg-light); 
}

.how-i-work-page .steps-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-top: 40px;
}

.how-i-work-page .step-card {
    background: transparent;
}

/* Wrapper to align icon and header side-by-side */
.how-i-work-page .step-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 12px;
}

.how-i-work-page .step-header svg,
.how-i-work-page .step-header i {
    font-size: 2.2rem;
    color: var(--color-sea-blue); 
    margin-bottom: 0;
    flex-shrink: 0;
}

.how-i-work-page .step-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0;
    margin-top: 0;
    color: var(--color-primary);
    line-height: 1.3;
}

.how-i-work-page .step-card p {
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

/* --- Methods Section --- */
.how-i-work-page .methods-section {
    padding: 60px 0;
    background-color: var(--color-bg-footer-top); 
}

.how-i-work-page .methods-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr 1fr 1.8fr;
    gap: 30px;
    align-items: stretch; /* Forces all 4 columns to share the exact same height */
}

/* Dynamic Forms List Styling */
.how-i-work-page .forms-list-content ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.how-i-work-page .forms-list-content ul li {
    margin-bottom: 15px;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Automatically injects Font Awesome checkmark */
.how-i-work-page .forms-list-content ul li::before {
    content: "\f058"; /* Unicode for fa-circle-check */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    color: var(--color-primary);
    font-size: 1.2rem;
}

/* 1. Make the wrapper columns fill the grid height */
.how-i-work-page .image-stack-content,
.how-i-work-page .big-image-content {
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* 2. Override Automad's wrappers to fill the flexible height */
.how-i-work-page .image-stack-content .am-block,
.how-i-work-page .big-image-content .am-block,
.how-i-work-page .image-stack-content .am-gallery {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 100%;
}

/* 3. Force the Big Image to stretch vertically and crop safely */
.how-i-work-page .big-image-content img {
    height: 100% !important;
    width: 100% !important;
    object-fit: cover;
    border-radius: 4px;
    display: block;
    min-height: 400px;
}

/* 4. Force the Gallery (left image stack) to space out and stretch */
.how-i-work-page .image-stack-content .am-gallery {
    gap: 15px; 
}

.how-i-work-page .image-stack-content .am-gallery-item,
.how-i-work-page .image-stack-content figure,
.how-i-work-page .image-stack-content .am-block-image {
    flex: 1;
    display: flex;
    margin: 0 !important;
    width: 100% !important;
}

.how-i-work-page .image-stack-content img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    border-radius: 4px;
    display: block;
}

/* Target List */
.how-i-work-page .target-list {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.how-i-work-page .target-item {
    display: flex;
    align-items: center;
    gap: 15px;
}

.how-i-work-page .target-icon {
    width: 50px;
    height: 50px;
    background-color: var(--color-primary);
    color: var(--color-white);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.3rem;
}

/* --- Background Section --- */
.how-i-work-page .background-section {
    padding: 60px 0;
    background-color: var(--color-bg-light); 
}

.how-i-work-page .bg-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
}

.how-i-work-page .bg-column h3 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--color-primary);
}

.how-i-work-page .bg-column h3 i {
    font-size: 1.5rem;
    color: var(--color-sea-blue);
}

.how-i-work-page .bg-column .bg-content-wrapper ul {
    list-style: disc;
    padding-left: 20px;
    color: var(--color-text-main);
    margin: 0;
}

.how-i-work-page .bg-column .bg-content-wrapper ul li {
    margin-bottom: 12px;
    font-size: 0.85rem;
    line-height: 1.5;
}

.how-i-work-page .bg-column .bg-content-wrapper .am-block {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

/* --- Responsive Breakpoints --- */
@media (max-width: 992px) {
    .how-i-work-page .steps-grid, 
    .how-i-work-page .methods-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .how-i-work-page .hero-content {
        clip-path: none;
        width: 100%;
        padding: 60px 40px;
    }

    .how-i-work-page .hero-image {
        display: none;
    }

    .how-i-work-page .bg-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .how-i-work-page .steps-grid, 
    .how-i-work-page .methods-grid {
        grid-template-columns: 1fr;
    }
}