/*--------------------------------------------------------------
# User Requested Features
--------------------------------------------------------------*/

/* Header Layouts */
/* Left Layout (Default) - No extra styles needed generally, but ensuring flex order/alignment */
.header-layout-left .site-branding {
    text-align: left;
}

/* Center Layout */
.header-layout-center .site-branding {
    text-align: center;
}

.header-layout-center .main-navigation {
    text-align: center;
}

.header-layout-center .social-header {
    justify-content: center;
    float: none;
    margin: 0 auto 20px;
}

.header-layout-center .col-md-4 {
    width: 100%;
    float: none;
    text-align: center;
}

.header-layout-center .site-branding-text {
    margin-bottom: 20px;
}

@media screen and (min-width: 992px) {
    .header-layout-center .niche-blog-navigation-menu ul {
        display: inline-block;
    }
}


/* Right Layout */
.header-layout-right .site-branding {
    text-align: right;
}

.header-layout-right .main-navigation {
    text-align: right;
    /* Align menu items to right */
}

.header-layout-right .social-header {
    justify-content: flex-end;
    /* Align social icons to right */
    float: right;
}

.header-layout-right .col-md-4 {
    float: right;
}

@media screen and (min-width: 992px) {
    .header-layout-right .niche-blog-navigation-menu ul {
        display: inline-block;
    }
}

/* Page Layouts */
/* Page Layouts */
.container-narrow {
    width: 90%;
    max-width: 800px;
    margin: 0 auto;
    padding-left: 15px;
    padding-right: 15px;
}

.container-full {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding-left: 30px;
    padding-right: 30px;
    box-sizing: border-box;
}

/* Mobile Icon Fixes */
/* Ensure SVG icons override font icons or are visible */
.icon {
    display: inline-block;
    width: 1em;
    height: 1em;
    stroke-width: 0;
    stroke: currentColor;
    fill: currentColor;
}

/* Fix mobile menu button visibility */
.primary-menu-toggle {
    background: transparent;
}

.primary-menu-toggle svg {
    width: 24px;
    height: 24px;
    vertical-align: middle;
}

.primary-menu-toggle .icon-bars {
    display: inline-block;
}

.primary-menu-toggle .icon-close {
    display: none;
}

/* When menu is active/toggled */
.primary-menu-toggle[aria-expanded="true"] .icon-bars {
    display: none;
}

.primary-menu-toggle[aria-expanded="true"] .icon-close {
    display: inline-block;
    /* Show close icon */
}

/* Ensure icons in social menu work */
.social-header li a svg {
    margin-top: 15px;
    /* Center svg vertically in 50px height anchor */
    width: 20px;
    height: 20px;
}

.social-header li a i {
    display: none;
    /* Hide fontawesome icons if SVGs are present or preferred, but here we might want to support both or ensure one takes precedence */
}

/* Post Grid Columns 6 Support and General Responsive Adjustments */
@media screen and (min-width: 567px) {
    .columns-6 {
        display: flex;
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .columns-6 article {
        width: 50%;
        float: left;
    }

    /* Mobile/Tablet clearing for 2 cols */
    .columns-6 article:nth-child(2n+1) {
        clear: left;
    }
}

@media screen and (min-width: 767px) {
    .columns-6 article {
        width: 33.33%;
    }

    /* Reset clearing */
    .columns-6 article:nth-child(2n+1) {
        clear: none;
    }

    /* Tablet clearing for 3 cols */
    .columns-6 article:nth-child(3n+1) {
        clear: left;
    }
}

@media screen and (min-width: 1200px) {
    .columns-6 article {
        width: 16.666%;
    }

    /* Reset clearing */
    .columns-6 article:nth-child(3n+1) {
        clear: none;
    }

    /* Desktop clearing for 6 cols */
    .columns-6 article:nth-child(6n+1) {
        clear: left;
    }
}

/* Explicit columns-1 support (default stacking) */
.columns-1 article {
    width: 100%;
    float: none;
    clear: both;
}

/* Performance & Accessibility Enhancements */

/* 1. Accessible Colors (WCAG AA Compliance) */
:root {
    --niche-color-primary: #0C5BBA;
    /* Darker Blue */
    --niche-color-success: #058E6E;
    /* Darker Green */
    --niche-color-text: #191e24;
    --niche-color-heading: #000000;
}

body {
    color: var(--niche-color-text);
}

a {
    color: var(--niche-color-primary);
}

a:hover,
a:focus {
    color: #000033;
    /* Even darker on hover */
    text-decoration: underline;
    /* improved visibility */
}

/* 2. Button Accessibility */
button,
input[type="button"],
input[type="reset"],
input[type="submit"],
.btn,
.button {
    background-color: var(--niche-color-primary);
    color: #ffffff;
    border: 2px solid var(--niche-color-primary);
}

button:hover,
input[type="button"]:hover,
input[type="reset"]:hover,
input[type="submit"]:hover,
.btn:hover,
.button:hover {
    background-color: #003d80;
    border-color: #003d80;
    color: #ffffff;
}

button:focus,
input[type="button"]:focus,
input[type="reset"]:focus,
input[type="submit"]:focus,
.btn:focus,
.button:focus {
    outline: 3px solid #000;
    outline-offset: 2px;
}

/* 3. Link Focus States */
a:focus {
    outline: 2px dashed var(--niche-color-primary);
    outline-offset: 2px;
}

/* 4. Fix Layout Shifts */
img {
    height: auto;
    /* Maintain aspect ratio */
}

.custom-logo {
    width: auto;
    max-width: 100%;
}