/* ==========================================================================
   GLOBAL APP-STYLE MATRIX SYSTEM (DYNAMIC RESPONSIVE SWITCHER)
   ========================================================================== */

/* Layout Toggle Base Component Control Shell */
.app-global-switcher-panel {
    display: inline-flex;
    background-color: #f1f3f5;
    padding: 3px;
    border-radius: 30px;
    border: 1px solid #eef0f2;
}

.layout-toggle-trigger {
    font-size: 10px;
    font-weight: 700;
    padding: 5px 14px;
    border-radius: 20px;
    border: none;
    background: transparent;
    color: #4a5568;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    line-height: 1.2;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Global state indicator coloring targeting brand defaults */
.layout-toggle-trigger.is-active {
    background-color: #0A1931 !important; /* Premium Universal Dark Navy Accent */
    color: #ffffff !important;
    box-shadow: 0 2px 6px rgba(10, 25, 49, 0.15);
}

/* Unified Card Animation Adjustments */
.global-dynamic-matrix-target .card {
    transition: transform 0.2s ease, box-shadow 0.2s ease !important;
}
.global-dynamic-matrix-target .card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.06) !important;
}

/* --- DESKTOP RENDER VIEW CONTROLLER MATRIX (Min-width: 768px) --- */
@media (min-width: 768px) {
    /* 1. Global Multi-Column Layout Active State */
    .global-dynamic-matrix-target.grid-state-active {
        display: grid !important;
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 24px !important;
    }
    .global-dynamic-matrix-target.grid-state-active > div {
        width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    /* 2. Global Horizontal Single Row Active State */
    .global-dynamic-matrix-target.single-state-active {
        display: flex !important;
        flex-direction: column !important;
        gap: 20px !important;
    }
    .global-dynamic-matrix-target.single-state-active > div {
        width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    /* Structural transformation forcing cards into landscape banners */
    .global-dynamic-matrix-target.single-state-active .card {
        flex-direction: row !important;
        align-items: center !important;
    }
    /* Image bounding box adjustments inside row state styles */
    .global-dynamic-matrix-target.single-state-active .ratio,
    .global-dynamic-matrix-target.single-state-active [class*="-img-wrapper"] {
        width: 260px !important;
        height: 170px !important;
        flex-shrink: 0;
        border-bottom: none !important;
        border-right: 1px solid #eef0f2 !important;
    }
}

/* --- MOBILE APP-LIKE RENDER VIEW CONTROLLER MATRIX (Max-width: 767px) --- */
@media (max-width: 767px) {
    /* 1. Global Gapless Mobile Mosaic Flow State */
    .global-dynamic-matrix-target.grid-state-active {
        display: block !important;       
        column-count: 2 !important;      
        column-gap: 12px !important;     
    }
    .global-dynamic-matrix-target.grid-state-active > div {
        display: inline-block !important; 
        width: 100% !important;          
        margin-bottom: 12px !important;  
        padding: 0 !important;           
    }

    /* 2. Global Mobile App Single Column Vertical List State */
    .global-dynamic-matrix-target.single-state-active {
        display: flex !important;
        flex-direction: column !important;
        gap: 16px !important;
    }
    .global-dynamic-matrix-target.single-state-active > div {
        width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    /* Destruct rigid desktop constraints to support fluid natural mobile heights */
    .global-dynamic-matrix-target .ratio {
        --bs-aspect-ratio: auto !important;
        height: auto !important;
    }
    .global-dynamic-matrix-target .ratio img {
        position: relative !important;
        height: auto !important;
        max-height: 340px;
    }
}


/* ==========================================================================
   PREMIUM MOBILE APP-STYLE CONTROL PANELS
   ========================================================================== */

.app-mobile-switcher-wrapper {
    display: inline-block;
    vertical-align: middle;
}

/* Central Mobile Segmented Control Track */
.app-mobile-switcher-pill {
    display: flex;
    align-items: center;
    background: #f4f5f7;
    border: 1px solid rgba(0, 0, 0, 0.05);
    padding: 3px;
    border-radius: 16px; /* Native app look and feel */
    position: relative;
}

/* Standard Mobile Touch Target Configuration Options */
.app-mobile-switcher-pill .layout-toggle-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.01em;
    padding: 6px 14px;
    border: none;
    background: transparent;
    color: #64748b;
    border-radius: 12px;
    cursor: pointer;
    line-height: 1.2;
    outline: none;
    -webkit-tap-highlight-color: transparent;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Micro Icon Sizing Scaling Constraints */
.app-mobile-switcher-pill .layout-toggle-trigger i {
    font-size: 13px;
    line-height: 1;
    transition: transform 0.2s ease;
}

/* Active Highlight Fluid State Engine Shift */
.app-mobile-switcher-pill .layout-toggle-trigger.is-active {
    background-color: #ffffff !important;
    color: var(--btn-accent-color, #0A1931) !important;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.05), 0px 1px 3px rgba(0, 0, 0, 0.02);
    font-weight: 700;
}

/* Subtle Desktop Interactive Feedback */
@media (min-width: 768px) {
    .app-mobile-switcher-pill .layout-toggle-trigger:not(.is-active):hover {
        color: #1e293b;
    }
    .app-mobile-switcher-pill .layout-toggle-trigger:not(.is-active):hover i {
        transform: scale(1.1);
    }
}




