/* =========================================
   10. SOLUTIONS SECTION (Bento Grid)
   ========================================= */

.solutions-section {
    padding: 6.5rem 10% 5rem 10%; /* Reverted side padding to 10% to match other sections */
    width: 100%;
}

/* The Grid Container */
.bento-grid {
    display: grid;
    grid-template-columns: 1.2fr 1.8fr;
    grid-template-rows: 200px auto; 
    gap: 1.5rem; 
    width: 100%;
    max-width: 1000px; /* Reduced from 1050px to align with Clients/Hospitality focal widths */
    margin: 0 auto; /* Center horizontal */
}

/* 
   ROW 1: Text Block (Left) + Large Image (Right)
*/

/* 1. Main Text Block */
.bento-text-block {
    background: var(--surface-color);
    border-radius: 40px;
    padding: 1.2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.5rem;
    height: auto;
    /* align-self handled by parent flex group */

    /* Clay Style */
    box-shadow: var(--shadow-clay);
    border: 1px solid rgba(255, 255, 255, 0.6);
}

.bento-left-group {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 0.8rem;
    height: 100%;
}

.bento-group-header {
    font-family: var(--font-heading);
    font-size: 1.95rem; 
    font-weight: 800;
    color: var(--text-main);
    white-space: nowrap;
    margin: 0 0 0.5rem 0;
    padding-left: 0; /* Align with the left edge of the box */
    line-height: 1;
}

.bento-label {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.2rem;
    font-family: var(--font-heading);
}

.bento-title {
    font-size: 1.1rem; /* Reduced from 1.5rem */
    line-height: 1.2;
    font-family: var(--font-heading);
    color: var(--text-main);
    font-weight: 700;
}

.bento-desc {
    font-size: 0.82rem; /* Increased to match card-text scale */
    color: var(--text-muted);
    line-height: 1.4;
    max-width: 100%;
}

.bento-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-top: 0.5rem;
}

.icon-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: black;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.icon-btn:hover {
    transform: scale(1.1);
}

/* 2. Large Image Block */
.bento-image-block {
    grid-column: 2;
    grid-row: 1;

    border-radius: 40px;
    overflow: hidden;
    position: relative;
    height: 100%;
    min-height: 0;
    aspect-ratio: 16 / 9; /* Default landscape reserve */

    /* Clay Style */
    box-shadow: var(--shadow-clay);
    border: 1px solid rgba(255, 255, 255, 0.6);
}

.bento-image-block img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}


/* 
   ROW 2: The Three Small Cards
   We need these to span across the bottom.
   Let's change grid definition.
*/

.bento-bottom-row {
    grid-column: 1 / -1;
    /* Full width */
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 0;
    /* If not using grid gap */
}

/* Card Styling */
.bento-card {
    border-radius: 20px; /* Reduced from 30px */
    padding: 0.9rem; /* Reduced from 1.2rem */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 120px; /* Reduced from 160px */
    transition: transform 0.3s ease;

    /* Clay Base */
    background: var(--surface-color);
    box-shadow: var(--shadow-clay);
    border: 1px solid rgba(255, 255, 255, 0.6);
    color: var(--text-main);
}

.bento-card:hover {
    transform: translateY(-5px);
    box-shadow:
        12px 12px 20px #d1d9e6,
        -12px -12px 20px #ffffff;
}



/* Card Variant 2: Dark (Automation) - Dark Clay */
.card-dark {
    background: #d9edd3;
    color: #1b4232;
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.card-dark .card-title {
    color: #1b4232;
}


/* Card Variant 3: Just Clay */
.card-stats {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.stat-single {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.counter-value {
    font-size: 2.6rem; /* Reduced from 3.5rem */
    font-weight: 800;
    line-height: 1;
    font-family: var(--font-heading);

    /* Actual CSS Trick for Pressed Text: dark text with white bottom highlight */
    color: #cbd5e0;
    /* Darker than surface */
    text-shadow: 1px 1px 0 #ffffff;
}

.stat-label {
    font-size: 0.75rem; /* Reduced from 1rem */
    color: var(--text-muted);
    font-weight: 500;
}


/* Responsive */
@media (max-width: 1024px) {
    .bento-grid {
        grid-template-columns: 1fr;
    }

    .bento-image-block {
        grid-column: 1;
        grid-row: 2;
        /* Image below text on tablet */
        height: 350px;
        min-height: auto;
    }

    .bento-bottom-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .bento-title {
        font-size: 2rem;
        /* Adjusted from 2.5rem to be more reasonable */
    }

    .bento-image-block {
        height: 250px;
    }

    .bento-bottom-row {
        grid-template-columns: 1fr;
        /* Stack cards */
        gap: 2rem;
        /* Add clear gap */
    }

    .card-stats {
        flex-direction: column;
        gap: 2rem;
        padding: 3rem 1rem;
    }
}

/* Slider Styles for Bento Image Block */
.slider-container {
    overflow: hidden;
    /* Mask the overflow */
    position: relative;
}

.bento-slider {
    display: flex;
    /* Horizontal Layout */
    width: 100%;
    height: 100%;
    transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
    will-change: transform;
    /* Hardware Acceleration */
}

.bento-slide {
    min-width: 100%;
    /* Each slide takes full width */
    height: 100%;
    position: relative;
    opacity: 1;
    /* Reset opacity from previous fade */
    flex-shrink: 0;
    /* Important: Prevent shrinking to insure 1-slide view */
}

.bento-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.slide-content {
    position: absolute;
    bottom: 2rem;
    left: 2rem;
    z-index: 2;
    pointer-events: none;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.6);
}

.slide-caption {
    color: #ffffff;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.5rem; /* Reduced from 2rem */
    letter-spacing: -0.5px;
    margin-bottom: 0;
    line-height: 1;
}

.slide-subtext {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.7rem; /* Reduced from 0.95rem */
    font-weight: 500;
    max-width: 80%;
}

/* =========================================
   MOBILE LAYOUT OPTIMIZER (320px - 480px)
   ========================================= */
@media (max-width: 480px) {
    .bento-grid {
        gap: 24px !important;
    }

    .bento-text-block,
    .bento-image-block,
    .bento-card {
        padding: 16px !important;
        /* Min padding */
        border-radius: 20px !important;
    }

    .bento-title,
    .slide-caption {
        font-size: 20px !important;
        /* Normalized H2 size */
        line-height: 28px !important;
    }

    .bento-group-header {
        font-size: 24px !important;
        /* H1 equivalent */
        line-height: 32px !important;
    }

    .slide-content {
        left: 16px !important;
        /* Align with grid */
        bottom: 16px !important;
        padding-right: 16px !important;
    }

    .slide-subtext {
        font-size: 14px !important;
        line-height: 20px !important;
    }

    /* Fix Slider Peak Issue */
    /* Fix Slider Peak Issue */
    .slider-container {
        width: 100% !important;
        overflow: hidden !important;
        border-radius: 20px !important;
        padding: 0 !important;
        /* Remove internal padding if any */
        margin: 0 !important;
    }

    .bento-slider {
        gap: 0 !important;
        /* CRITICAL: Remove any potential flex gap */
        margin: 0 !important;
        width: 100% !important;
    }

    .bento-slide {
        width: 100% !important;
        min-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        flex: 0 0 100% !important;
        /* Rigorous flex sizing */
    }
}