/* =========================================
   LAYOUT B: THE ASYMMETRICAL BENTO (Modern)
   ========================================= */

/* --- Services Section: 2 Big / 3 Small --- */
.services-section {
    padding: 60px 0;
    background: #fff;
}

@media (min-width: 992px) {
    .services-grid {
        display: grid;
        grid-template-columns: repeat(6, 1fr);
        gap: 24px;
        max-width: 1200px;
    }

    /* Top Row: 2 Items span 3 cols each (Halves) */
    .services-grid>.service-card:nth-child(1),
    .services-grid>.service-card:nth-child(2) {
        grid-column: span 3;
        background: var(--soft-blue);
        /* Highlight these */
        border: none;
        padding: 40px;
    }

    .services-grid>.service-card:nth-child(1) .service-title,
    .services-grid>.service-card:nth-child(2) .service-title {
        font-size: 1.5rem;
    }

    /* Bottom Row: 3 Items span 2 cols each (Thirds) */
    .services-grid>.service-card:nth-child(3),
    .services-grid>.service-card:nth-child(4),
    .services-grid>.service-card:nth-child(5) {
        grid-column: span 2;
        background: #fff;
        border: 1px solid var(--border-color);
    }
}

.service-card {
    border-radius: 16px;
    transition: transform 0.3s ease;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}


/* --- Why Choose Us: 4-Box Grid --- */
.why-us-section {
    padding: 60px 0;
    background: #fff;
}

@media (min-width: 992px) {
    .why-us-section .container {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 40px;
        /* Increased from 24px to fix overlap */
    }

    /* Treat Header as first grid box */
    .why-us-section .section-header {
        grid-column: 1 / 2;
        grid-row: 1 / 2;
        background: var(--primary-blue);
        color: #fff;
        padding: 40px;
        border-radius: 20px;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        /* Removed center to align with top cards */
        text-align: left;
        /* Removed manual margin */
        height: 100%;
    }

    .why-us-section .section-title {
        color: #fff;
        font-size: 2.5rem;
        margin-top: 0;
    }

    .why-us-section .section-subtitle {
        color: rgba(255, 255, 255, 0.8);
    }

    /* Steps Wrap */
    .why-us-steps {
        display: contents;
        /* Allows children to participate in parent grid */
    }

    .why-us-steps::before {
        display: none;
    }

    /* Step 1 -> Top Right */
    .step-item:nth-child(1) {
        grid-column: 2 / 3;
        grid-row: 1 / 2;
    }

    /* Step 2 -> Bottom Left */
    .step-item:nth-child(2) {
        grid-column: 1 / 2;
        grid-row: 2 / 3;
    }

    /* Step 3 -> Bottom Right */
    .step-item:nth-child(3) {
        grid-column: 2 / 3;
        grid-row: 2 / 3;
    }

    .step-item {
        background: var(--soft-blue);
        border-radius: 20px;
        padding: 40px;
        align-items: flex-start;
        text-align: left;
        height: 100%;
        transition: all 0.3s ease;
    }

    .step-item:hover {
        background: #eef2f7;
    }

    .step-icon-wrapper {
        background: #fff;
        margin-bottom: 24px;
    }
}

/* =========================================
   MOBILE REDESIGN "ZIG ZAG" (Max-width: 991px)
   ========================================= */

@media (max-width: 991px) {

    /* --- Tighter Section Spacing --- */
    .services-section {
        padding-top: 40px;
        padding-bottom: 20px;
    }

    /* --- Services: Vertical Zig Zag with CSS GRID --- */
    .services-grid {
        display: flex;
        flex-direction: column;
        gap: 16px;
        padding-bottom: 40px;
        /* Restored bottom padding for safety */
    }

    .service-card {
        display: grid;
        /* GRID LAYOUT */
        grid-template-columns: auto 1fr;
        /* Icon | Title space */
        grid-template-rows: auto auto;
        /* Header | Body */
        gap: 12px 12px;
        /* Balanced Gap */
        align-items: center;
        align-content: start;
        text-align: left;
        background: #fff;
        border: 1px solid var(--border-color);
        border-radius: 12px;
        padding: 16px 16px !important;
        /* Reduced Padding */
        min-height: 0;

        /* !!! CRITICAL FIX !!! */
        flex: 0 0 auto !important;
        /* Override style.css 280px fixed size */
        height: auto !important;
        /* Let content dictate height */
        /* !!!!!!!!!!!!!!!!!!!! */
    }

    /* Highlight the feature cards */
    .services-grid>.service-card:nth-child(1),
    .services-grid>.service-card:nth-child(2) {
        background: var(--soft-blue);
        border: none;
        padding: 16px 16px !important;
    }

    /* FIX: Make sure Icon Circles are white on colored background */
    .services-grid>.service-card:nth-child(1) .icon-circle,
    .services-grid>.service-card:nth-child(2) .icon-circle {
        background: #ffffff !important;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
        border: none;
    }

    /* --- ODD ITEMS (1, 3, 5): Left Aligned Flow --- */
    .services-grid>.service-card:nth-child(odd) .icon-circle {
        grid-column: 1;
        grid-row: 1;
        margin: 0;
    }

    .services-grid>.service-card:nth-child(odd) .service-title {
        grid-column: 2;
        grid-row: 1;
        text-align: left;
        margin-bottom: 0;
        font-size: 1.1rem;
        /* Compact Title */
        font-weight: 600;
        width: auto;
    }

    /* --- EVEN ITEMS (2, 4): Right Aligned Flow --- */
    .services-grid>.service-card:nth-child(even) {
        grid-template-columns: 1fr auto;
        text-align: right;
        justify-items: end;
    }

    .services-grid>.service-card:nth-child(even) .service-title {
        grid-column: 1;
        grid-row: 1;
        text-align: right;
        margin-bottom: 0;
        font-size: 1.1rem;
        /* Compact Title */
        font-weight: 600;
        width: auto;
    }

    .services-grid>.service-card:nth-child(even) .icon-circle {
        grid-column: 2;
        grid-row: 1;
        margin: 0;
    }

    /* --- DESCRIPTION (Always Row 2, Full Span) --- */
    .service-desc {
        grid-column: 1 / -1;
        grid-row: 2;
        margin-top: 0px;
        padding-top: 0;
        font-size: 0.95rem;
        /* Slight increase for readability */
        color: var(--text-grey);
        line-height: 1.4;
        width: 100%;
    }

    /* --- Why Choose Us: Compact Stack --- */
    .why-us-steps {
        display: flex;
        flex-direction: column;
        gap: 16px;
    }

    .step-item {
        display: flex;
        flex-direction: row;
        align-items: flex-start;
        text-align: left;
        background: var(--soft-blue);
        padding: 20px;
        border-radius: 12px;
        gap: 16px;
    }

    .step-icon-wrapper {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
        flex-shrink: 0;
        margin-bottom: 0;
        background: #fff;
        border: 1px solid var(--border-color);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        color: var(--primary-blue);
    }

    .step-content h3 {
        font-size: 1.1rem;
        margin-bottom: 4px;
        font-weight: 700;
        color: var(--primary-blue);
    }

    .step-content p {
        font-size: 0.95rem;
        margin-bottom: 0;
        line-height: 1.4;
    }
}