/* /css/blog-subpage.css
   NoGatekeepers blog visual layer.
   Load AFTER blog-layout.css, blog-theme.css, index.css and navbar.css.
   The parent PHP page provides the cache-busting version.
   Blog engine layout and behavior are deliberately left unchanged. */

:root {
    --ng-ink: #121212;
    --ng-paper: #e9dfce;
    --ng-red: #aa302b;
    --ng-cream: #fff7e8;
    --ng-muted: #b9ab98;
    --ng-max: 1480px;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--ng-ink);
    color: var(--ng-cream);
    font-family: Arial, Helvetica, sans-serif;
}

/* Site shell: matches the homepage without altering blog post grids. */
.pageWrap {
    min-height: calc(100vh - 85px);
    background: var(--ng-ink);
}

/* The existing /ui/navbar.php is used by blog.php. */
.navbar {
    background: #191919;
    border-bottom: 3px solid var(--ng-red);
    color: var(--ng-cream);
    font-family: Impact, 'Arial Narrow', Arial, sans-serif;
}

.navLinks {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px clamp(12px, 2vw, 28px);
    max-width: var(--ng-max);
    margin: 0 auto;
    padding: 14px clamp(12px, 2.3vw, 34px);
}

.navLinks a {
    color: var(--ng-cream);
    font-family: Impact, 'Arial Narrow', Arial, sans-serif;
    font-size: clamp(13px, 1.1vw, 17px);
    font-weight: 900;
    line-height: 1.25;
    text-decoration: none;
    text-transform: uppercase;
}

.navLinks a:hover,
.navLinks a:focus-visible {
    color: #e14e43;
}

/* Preserve the legacy mobile menu's visibility/interaction rules. */
.navMobileTop {
    color: var(--ng-cream);
}

.navMobileTop a,
#siteMenuBtn,
#navCloseBtn {
    color: inherit;
}

/* Center the blog area, but don't change the engine's internal grid. */
#blogPostsMount,
#blogPagerMount {
    width: min(100%, var(--ng-max));
    margin-inline: auto;
    padding-inline: clamp(12px, 2.3vw, 34px);
    box-sizing: border-box;
}

#blogPostsMount {
    padding-block: 24px 10px;
}

#blogPagerMount {
    padding-block: 12px 30px;
}

/* Editorial text treatment, without overriding embed sizing or positions. */
#blogPostsMount :is(h1, h2, h3),
#blogPagerMount :is(h1, h2, h3) {
    font-family: Impact, 'Arial Narrow', Arial, sans-serif;
    font-style: italic;
    font-weight: 900;
    line-height: 1.1;
}

#blogPostsMount a,
#blogPagerMount a {
    text-underline-offset: 3px;
}

#blogPostsMount :is(button, input, select),
#blogPagerMount :is(button, input, select) {
    font: inherit;
}

/* Consistent footer across the site's subpages. */
.siteFooter {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 24px;
    padding: 15px clamp(12px, 2.3vw, 34px);
    border-top: 3px solid var(--ng-red);
    background: var(--ng-ink);
    color: var(--ng-cream);
    font: 13px/1.5 Arial, Helvetica, sans-serif;
}

.siteFooter a {
    color: #e14e43;
}

@media (max-width: 720px) {
    .navLinks {
        justify-content: center;
        gap: 10px 16px;
    }

    .navLinks a {
        font-size: 13px;
    }

    #blogPostsMount {
        padding-top: 15px;
    }

    .siteFooter {
        justify-content: center;
        text-align: center;
    }
}

#blogPostsMount .instagram-media {
    max-width: 420px !important;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 520px !important;
    margin: 16px auto !important;
}

#blogPostsMount .bw-blog-loading-body {
    min-height: 480px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #191919;
    animation: blogLoadingPulse 1.6s ease-in-out infinite;
}

@keyframes blogLoadingPulse {
    0%, 100% { opacity: 0.65; }
    50% { opacity: 1; }
}

#blogPostsMount .instagram-media iframe {
    opacity: 0;
}

#blogPostsMount .instagram-media iframe.embed-ready {
    animation: blogEmbedFade 0.6s ease-out forwards;
}

@keyframes blogEmbedFade {
    from { opacity: 0; }
    to { opacity: 1; }
}


/* NoGatekeepers blog branding */

.ng-blog-banner {
    position: relative;
    overflow: hidden;
    background: #191919;
    border-top: 3px solid #aa302b;
    border-bottom: 3px solid #aa302b;
    isolation: isolate;
}

.ng-blog-banner::before {
    content: "";
    position: absolute;
    inset: 0;
    background: url("/images/site/blackBgArea450.png")
        center / cover no-repeat;
    opacity: 0.6;
    z-index: -1;
}

.ng-blog-banner-inner {
    max-width: 1480px;
    margin: auto;
    padding: 30px clamp(16px, 4vw, 55px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 25px;
    flex-wrap: wrap;
}

.ng-blog-brand {
    color: #fff7e8;
    text-decoration: none;
    font: italic 900 clamp(23px, 3vw, 40px)
        Impact, Arial, sans-serif;
}

.ng-blog-brand span {
    color: #e14e43;
    font-size: 0.65em;
}

.ng-blog-brand:hover {
    color: #e9c58b;
}

.ng-blog-heading {
    text-align: right;
}

.ng-blog-heading h1 {
    margin: 0;
    color: #fff7e8;
    font: italic 900 clamp(38px, 5vw, 66px)
        Impact, Arial, sans-serif;
}

.ng-blog-heading p {
    margin: 4px 0 0;
    color: #e14e43;
    font-size: 12px;
    font-weight: bold;
    letter-spacing: 2px;
}

/* Cream editorial background */

.pageWrap {
    background: #e9dfce;
}

#blogPostsMount,
#blogPagerMount {
    position: relative;
    z-index: 1;
}

/* Subtle distressed artwork behind the posts */

#blogPostsMount::before {
    content: "";
    position: absolute;
    inset: 0;
    background: url("/images/site/taglineBG50.png")
        top center / 100% auto repeat-y;
    opacity: 0.12;
    pointer-events: none;
    z-index: -1;
}

@media (max-width: 720px) {
    .ng-blog-banner-inner {
        padding: 24px 16px;
        gap: 12px;
    }

    .ng-blog-heading {
        text-align: left;
    }
}

/* Full-width post loading skeletons */

#blogPostsMount .ng-post-shell {
    position: relative;
    min-height: 580px;
    margin-bottom: 18px;
    overflow: hidden;
    background: #242424;
}

#blogPostsMount .ng-post-shell > .bw-blog-card {
    opacity: 0;
    transition: opacity 0.65s ease;
}

#blogPostsMount .ng-post-shell.ng-ready > .bw-blog-card {
    opacity: 1;
}

.ng-post-skeleton {
    position: absolute;
    inset: 0;
    z-index: 2;
    background: #303030;
    transition: opacity 0.65s ease;
    pointer-events: none;
}

.ng-post-skeleton::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        105deg,
        transparent 20%,
        rgba(255,255,255,0.09) 45%,
        transparent 70%
    );
    animation: ngSkeletonShimmer 1.7s ease-in-out infinite;
}

.ng-post-shell.ng-ready .ng-post-skeleton {
    opacity: 0;
}

@keyframes ngSkeletonShimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

@media (max-width: 720px) {
    #blogPostsMount .ng-post-shell {
        min-height: 480px;
    }
}


/* Black post containers with centered embed placeholders */

#blogPostsMount .ng-post-shell {
    position: relative;
    min-height: 580px;
    margin-bottom: 18px;
    overflow: hidden;
    background: #080808;
}

#blogPostsMount .ng-post-shell > .bw-blog-card {
    opacity: 0;
    transition: opacity 0.65s ease;
}

#blogPostsMount .ng-post-shell.ng-ready > .bw-blog-card {
    opacity: 1;
}

#blogPostsMount .ng-post-skeleton {
    position: absolute;
    top: 15px;
    bottom: 15px;
    left: 50%;
    width: min(420px, calc(100% - 30px));
    transform: translateX(-50%);
    z-index: 2;
    overflow: hidden;
    background: #303030;
    transition: opacity 0.65s ease;
    pointer-events: none;
}

#blogPostsMount .ng-post-skeleton::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        105deg,
        transparent 20%,
        rgba(255,255,255,0.10) 45%,
        transparent 70%
    );
    animation: ngSkeletonShimmer 1.7s ease-in-out infinite;
}

#blogPostsMount .ng-post-shell.ng-ready .ng-post-skeleton {
    opacity: 0;
}

@keyframes ngSkeletonShimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

@media (max-width: 720px) {
    #blogPostsMount .ng-post-shell {
        min-height: 480px;
    }
}
