/**
 * Root Architecture Variables - Color Token Palette & Sizing Specifications
 */
:root {
    /* Color Palette (Neutral Professional Archetype) */
    --bg-base: #f8fafc;
    --bg-surface: #ffffff;
    --bg-surface-glass: rgba(255, 255, 255, 0.75);
    --border-color: rgba(226, 232, 240, 0.8);
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    
    /* System Accents */
    --accent-primary: #2563eb;
    --accent-hover: #1d4ed8;
    --close-btn-bg: rgba(15, 23, 42, 0.06);
    --close-btn-hover: rgba(239, 68, 68, 0.15);
    --close-btn-text: #ef4444;
    
    /* Design Tokens & Depth Layout Shadows */
    --radius-lg: 16px;
    --radius-md: 12px;
    --radius-sm: 8px;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.05), 0 2px 4px -2px rgba(15, 23, 42, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(15, 23, 42, 0.08), 0 8px 10px -6px rgba(15, 23, 42, 0.08);
    --glass-blur: blur(12px);
    
    /* Component Dimensional Constraints */
    --header-height: 70px;
    --ad-desktop-width: 180px;
    --ad-desktop-height: 540px;
    --max-content-width: 1200px;
}

        .panel-header {
            padding: 1.5rem;
            border-bottom: 1px solid var(--border-ui);
            background: var(--bg-surface);
        }

        .search-bar {
            width: 100%;
            padding: 0.85rem 1.25rem;
            font-size: 1rem;
            border: 1px solid var(--border-ui);
            border-radius: var(--radius-btn);
            outline: none;
            color: var(--text-title);
            background-color: var(--bg-canvas);
             border:2px solid black;
            transition: all 0.2s ease;
        }

        .search-bar:focus {
            border-color: var(--accent-color);
            background-color: var(--bg-surface);
            border:2px solid black;
            box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
        }

        .counter-ribbon {
            font-size: 0.85rem;
            color: var(--text-muted);
            margin: 0.75rem 0 0.5rem 2px;
            font-weight: 500;
        }

        /* Alphabetic Filter Belt */
        .alpha-strip {
            display: flex;
            gap: 0.05rem;
            overflow-x: auto;
            padding: 0.05rem 0;
            margin-top: 0.15rem;
            scrollbar-width: none;
        }
        .alpha-strip::-webkit-scrollbar { display: none; }

        .alpha-tag {
            background: #cce;
            border: 1px solid transparent;
            padding: 0.1rem 0.2rem;
            font-size: 0.8rem;
            font-weight: 700;
            color: var(--text-muted);
            cursor: pointer;
            border-radius: 6px;
            max-midth:20px;
            text-transform: uppercase;
        }

        .alpha-tag:hover {
            color: var(--accent-color);
            background-color: rgba(37, 99, 235, 0.05);
        }

        .alpha-tag.active {
            background-color: var(--accent-color);
            color: var(--bg-surface);
        }

        /* Scrollable Cards Grid Container */
        .grid-viewport {
            flex: 1;
            overflow-y: auto;
            padding: 1.5rem;
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
            gap: 1.25rem;
            background-color: var(--bg-canvas);
        }



        .branch-card {
            background-color: var(--bg-surface);
            border: 1px solid var(--border-ui);
            border-radius: var(--radius-main);
            padding: 1.25rem;
            box-shadow: var(--shadow-card);
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            transition: all 0.25s ease;
            max-height:300px;
        }

.branch-card.row-break {
    grid-column: 1 ;
    
}

        .branch-card:hover {
            transform: translateY(-4px);
            box-shadow: var(--shadow-hover);
            border-color: rgba(37, 99, 235, 0.3);
            
        }

        .card-header-info {
            padding-bottom:2.25rem;
            margin-bottom: 3.25rem;
        }

        .meta-badge {
            display: inline-block;
            font-size: 0.75rem;
            font-weight: 600;
            color: var(--accent-color);
            background-color: rgba(37, 99, 235, 0.08);
            padding: 0.25rem 0.6rem;
            border-radius: 20px;
            margin-bottom: 0.5rem;
        }

        .card-title {
            font-size: 0.8rem;
            font-weight: 700;
            color: var(--text-title);
            line-height: 1.3;
            margin-bottom: 0.35rem;
        }




/* System Dark Mode Contextual Override Triggers */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-base: #0f172a;
        --bg-surface: #1e293b;
        --bg-surface-glass: rgba(30, 41, 59, 0.75);
        --border-color: rgba(51, 65, 85, 0.5);
        --text-primary: #f8fafc;
        --text-secondary: #cbd5e1;
        --text-muted: #64748b;
        --close-btn-bg: rgba(248, 250, 252, 0.08);
        --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
    }
}

/* Base Initialization Resets */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-base);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* Sticky Header Shell Component */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    height: var(--header-height);
    background-color: var(--bg-surface-glass);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.header-container {
    max-width: calc(var(--max-content-width) + (var(--ad-desktop-width) * 2) + 80px);
    height: 100%;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--accent-primary);
    letter-spacing: -0.025em;
}

.nav-placeholder {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Master Layout Framework Container */
.layout-container {
    display: grid;
    grid-template-columns: var(--ad-desktop-width) 1fr var(--ad-desktop-width);
    gap: 32px;
    width: 100%;
    max-width: calc(var(--max-content-width) + (var(--ad-desktop-width) * 2) + 80px);
    margin: 0 auto;
    padding: 40px 24px;
    flex-grow: 1;
    align-items: center; /* Horizontally balances the center content, and vertically centers advertisements */
    position: relative;
}

/* Central Main Content Container Area */
.main-content {
    grid-column: 2;
    width: 100%;
    max-width: var(--max-content-width);
    justify-self: center;
}

.content-card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 48px;
    box-shadow: var(--shadow-md);
    min-height: 400px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.content-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 16px;
    letter-spacing: -0.025em;
}

.dynamic-content-placeholder {
    font-size: 1.125rem;
    color: var(--text-secondary);
    font-weight: 400;
    padding: 12px 24px;
    background-color: var(--bg-base);
    border-radius: var(--radius-sm);
    border: 1px dashed var(--border-color);
}

/* Base Framework Advertisement Panel Styles */
.ad-panel {
    width: var(--ad-desktop-width);
    height: var(--ad-desktop-height);
    background-color: var(--bg-surface-glass);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    position: fixed;
    overflow: hidden;
    display: flex;
    top:100px;
    flex-direction: column;
    z-index: 10;
    
    /* Performance Accelerated Structural Transition Properties */
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), 
                opacity 0.4s cubic-bezier(0.25, 1, 0.5, 1),
                visibility 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    will-change: transform, opacity;
}

.ad-panel-b{
    width: var(--ad-desktop-width);
    height: var(--ad-desktop-height);
    background-color: var(--bg-surface-glass);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    position: fixed;
    overflow: hidden;
    display: flex;
    bottom:10px;
    flex-direction: column;
    z-index: 10;
    
    /* Performance Accelerated Structural Transition Properties */
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), 
                opacity 0.4s cubic-bezier(0.25, 1, 0.5, 1),
                visibility 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    will-change: transform, opacity;
    
}


/* Concrete Desktop Positioning Layout Handles */
.ad-panel-left {
    grid-column: 1;
    transform: translateX(-30px);
    opacity: 0;
}

.ad-panel-right {
    grid-column: 3;
    transform: translateX(30px);
    opacity: 0;
}

/* Core Interface Conditional Active Display Utility Classes */
.ad-panel.visible {
    transform: translateX(0);
    opacity: 1;
}

.ad-panel.hidden {
    visibility: hidden;
    pointer-events: none;
}

/* Inner Advertisement Component Architecture Elements */
.ad-close-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: var(--close-btn-bg);
    border: none;
    color: var(--text-secondary);
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.ad-close-btn:hover {
    background-color: var(--close-btn-hover);
    color: var(--close-btn-text);
    transform: scale(1.05);
}

.ad-close-btn:active {
    transform: scale(0.95);
}

.ad-content-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.ad-placeholder-text {
    text-align: center;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.ad-dimension-tag {
    margin-top: 12px;
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: monospace;
    background-color: var(--close-btn-bg);
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    display: inline-block;
}

/* ==========================================================================
   Responsive Viewport Breakdown Layers
   ========================================================================== */

/* Tablet Viewport Breakpoint (Under 1400px down to 1024px) */
@media (max-width: 1399px) and (min-width: 1024px) {
    .layout-container {
        grid-template-columns: 1fr;
        padding-left: 24px;
        padding-right: 24px;
    }
    
    .main-content {
        grid-column: 1;
    }
    
    /* Banners fluidly absolute float off-screen left and right borders safely */
    .ad-panel {
        position: fixed;
        top: calc(50% + (var(--header-height) / 2));
    }
    
    .ad-panel-left {
        left: 20px;
        transform: translate(-220px, -50%);
    }
    
    .ad-panel-right {
        right: 20px;
        transform: translate(220px, -50%);
    }
    
    .ad-panel-left-bottom {
        left: 20px;
        transform: translate(220px, -50%);
    }    
    
    .ad-panel-left.visible {
        transform: translate(0, -50%);
    }
    
    .ad-panel-right.visible {
        transform: translate(0, -50%);
    }
}

/* Mobile Viewport Breakpoint Layer (Under 1024px UI/UX Adjustments) */
@media (max-width: 1023px) {
    .layout-container {
        grid-template-columns: 1fr;
        padding: 24px 16px 120px 16px; /* Extra bottom padding so panels do not clip core main text */
    }
    
    .main-content {
        grid-column: 1;
    }
    
    .content-card {
        padding: 32px 16px;
        min-height: 350px;
    }
    
    .content-title {
        font-size: 1.5rem;
    }
    
    /* Banners structurally morph into sleek modern floating dynamic card drawers */
    .ad-panel {
        position: fixed;
        bottom: 24px;
        width: calc(100% - 32px);
        max-width: 400px;
        height: 100px; /* Reduced vertical footprint optimized for mobile viewing */
        border-radius: var(--radius-md);
        box-shadow: var(--shadow-lg);
    }
    
    .ad-content-wrapper {
        padding: 12px;
        justify-content: flex-start;
    }
    
    .ad-placeholder-text {
        text-align: left;
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 12px;
        width: 100%;
    }
    
    .ad-dimension-tag {
        margin-top: 0;
        margin-left: auto;
        margin-right: 24px; /* Leaves clear breathing space for close interaction button */
    }
    
    /* Alternating Slider Entry Transformations */
    .ad-panel-left {
        left: 16px;
        transform: translateY(150px) scale(0.95);
        opacity: 0;
    }
    
    .ad-panel-right {
        right: 16px;
        transform: translateY(150px) scale(0.95);
        opacity: 0;
    }
    
    /* Unified entry trajectory paths for sleek layout alignment */
    .ad-panel-left.visible,
    .ad-panel-right.visible {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}
