/* Pico CSS Customizations for Badgernet Homepage */

@font-face {
    font-family: 'JetBrains Mono';
    src: url('../assets/fonts/JetBrains_Mono/JetBrainsMono-VariableFont_wght.ttf') format('truetype-variations');
    font-weight: 100 800;
    font-style: normal;
}

@font-face {
    font-family: 'JetBrains Mono';
    src: url('../assets/fonts/JetBrains_Mono/JetBrainsMono-Italic-VariableFont_wght.ttf') format('truetype-variations');
    font-weight: 100 800;
    font-style: italic;
}

:root {
    --primary: #0085A1;
    --primary-hover: #00657b;
    --pico-primary: var(--primary);
    --pico-primary-hover: var(--primary-hover);
    --font-family: 'JetBrains Mono', monospace;
    --pico-font-family: var(--font-family);
    --pico-font-family-sans-serif: var(--font-family);
    --pico-font-family-monospace: var(--font-family);
}

/* Typography overrides to match Clean Blog */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-family), serif;
    font-weight: 800;
}

body {
    font-family: var(--font-family), serif;
    font-size: 20px;
    color: #212529;
    background-color: white;
    display: flex;
    flex-direction: column;
}

input, textarea, select, button {
    font-family: var(--font-family);
}

button:not(.outline), [type='submit'], [type='button']:not(.outline) {
    background-color: var(--primary);
    border: 1px solid var(--primary);
    color: white;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.0625em;
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s;
    width: auto;
}

button:not(.outline):hover, [type='submit']:hover, [type='button']:not(.outline):hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
}

.text-center button {
    margin-left: auto;
    margin-right: auto;
}

article {
    background: transparent;
    border: none;
    box-shadow: none;
    margin: 0;
    padding: 0;
}

footer {
    
    background: rgb(38 43 55 / 0.05);
    border: none;
    margin-top: 3rem;
    padding-block: 3rem !important;
}

/* Masthead Styles */
header.masthead {
    position: relative;
    margin-bottom: 3rem;
    padding-top: calc(8rem + 57px);
    padding-bottom: 8rem;
    background: no-repeat center center;
    background-color: #6c757d;
    background-size: cover;
    background-attachment: scroll;
    color: white;
}

header.masthead:before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #212529;
    opacity: 0.5;
}

header.masthead .container {
    position: relative;
    z-index: 1;
}

header.masthead .page-heading,
header.masthead .post-heading,
header.masthead .site-heading {
    color: #fff;
}

header.masthead .page-heading,
header.masthead .site-heading {
    text-align: center;
}

header.masthead .page-heading h1,
header.masthead .site-heading h1 {
    font-size: 3rem;
    margin: 0;
    color: #fff;
}

header.masthead .page-heading .subheading,
header.masthead .site-heading .subheading {
    font-size: 1.5rem;
    font-weight: 300;
    line-height: 1.1;
    display: block;
    margin-top: 0.625rem;
    font-family: var(--font-family), serif ;
    color: #fff;
}

header.masthead .post-heading h1 {
    font-size: 2.25rem;
    margin: 0;
    color: #fff;
}

header.masthead .post-heading .meta,
header.masthead .post-heading .subheading {
    line-height: 1.1;
    display: block;
}

header.masthead .post-heading .subheading {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0.75rem 0 2rem;
    font-family: var(--font-family), serif;
}

header.masthead .post-heading .meta {
    font-size: 1.25rem;
    font-weight: 300;
    font-style: italic;
    font-family: var(--font-family), serif;
}

@media (min-width: 992px) {
    header.masthead {
        padding-top: 6rem;
        padding-bottom: 6rem;
    }
    header.masthead .page-heading h1,
    header.masthead .site-heading h1 {
        font-size: 5rem;
    }
    header.masthead .post-heading h1 {
        font-size: 3.5rem;
    }
    header.masthead .post-heading .subheading {
        font-size: 1.875rem;
    }
}

/* Navigation Styles */
#mainNav {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    background-color: #fff;
    font-family: var(--font-family);
    transition: background-color 0.2s;
    border-bottom: 1px solid #dee2e6;
}

#mainNav ul,
#mainNav ul li {
    list-style: none;
    margin: 0;
    padding: 0;
}

#mainNav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

@media (max-width: 991px) {
    #mainNav .container {
        flex-wrap: wrap;
    }
    #nav-menu {
        display: none !important; /* Force hide */
        flex-direction: column;
        width: 100%;
        background-color: white;
        border-top: 1px solid #eee;
        order: 3;
    }
    #nav-menu.open {
        display: flex !important; /* Force show when open */
    }
    #nav-menu li {
        width: 100%;
    }
    #nav-menu li a {
        color: #212529 !important;
        border-bottom: 1px solid #eee;
        padding: 1rem;
        width: 100%;
    }
    #nav-toggle {
        display: block !important;
        order: 2;
        color: var(--primary);
        border: 1px solid var(--primary);
    }
}

@media (min-width: 992px) {
    #nav-toggle {
        display: none !important;
    }
    #nav-menu {
        display: flex !important;
    }
}

#mainNav .navbar-brand {
    font-weight: 800;
    color: #212529;
    text-decoration: none;
    font-size: 1.25rem;
}

#mainNav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

#mainNav ul li a {
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.0625em;
    text-transform: uppercase;
    color: #212529;
    padding: 1rem;
    display: block;
    text-decoration: none;
    white-space: nowrap;
}

@media (min-width: 992px) {
    #mainNav {
        border-bottom: 1px solid transparent;
        background: transparent;
    }
    #mainNav .navbar-brand {
        color: #fff;
    }
    #mainNav ul li a {
        color: #fff;
    }
    
    #mainNav.is-fixed {
        position: fixed;
        top: -100px;
        transition: transform 0.2s;
        border-bottom: 1px solid white;
        background-color: rgba(255, 255, 255, 0.9);
    }
    #mainNav.is-fixed .navbar-brand,
    #mainNav.is-fixed ul li a {
        color: #212529;
    }
    #mainNav.is-visible {
        transform: translate3d(0, 100%, 0);
    }
}

@media (max-width: 991px) {
    #mainNav.is-fixed {
        position: fixed;
        top: 0;
        background-color: white;
        width: 100%;
        border-bottom: 1px solid #dee2e6;
    }
    #mainNav.is-fixed #nav-toggle {
        color: #212529;
        border-color: #212529;
    }
}

/* Post Preview Styles */
.post-preview > a {
    color: #212529;
    text-decoration: none;
}
.post-preview > a:focus, .post-preview > a:hover {
    color: var(--primary);
}
.post-preview > .post-title {
    font-size: 1.875rem;
    margin-top: 1.875rem;
    margin-bottom: 0.625rem;
}
.post-preview > .post-subtitle {
    font-weight: 300;
    margin-bottom: 0.625rem;
}
.post-preview > .post-meta {
    font-size: 1.125rem;
    font-style: italic;
    margin-top: 0;
    color: #6c757d;
}

/* Badge Styles */
.badge {
    display: inline-block;
    padding: 0.35em 0.65em;
    font-size: 0.75em;
    font-weight: 700;
    line-height: 1;
    color: #212529;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 50rem;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    margin-right: 0.25rem;
}

/* Utility classes to aid transition */
.text-center { text-align: center; }

/* Video Row Styles */
.youtube-player {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    max-width: 100%;
    background: #000;
    margin-bottom: 1rem;
}

.youtube-player iframe,
.youtube-player object,
.youtube-player embed {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.youtube-player img {
    bottom: 0;
    display: block;
    left: 0;
    margin: auto;
    max-width: 100%;
    width: 100%;
    position: absolute;
    right: 0;
    top: 0;
    border: none;
    height: auto;
    cursor: pointer;
    transition: .4s all;
}

.youtube-player .play {
    height: 72px;
    width: 72px;
    left: 50%;
    top: 50%;
    margin-left: -36px;
    margin-top: -36px;
    position: absolute;
    background: url("//i.imgur.com/83p0mD8.png") no-repeat;
    cursor: pointer;
}

.text-center { text-align: center; }
.float-end { float: right; }
.mx-auto { margin-left: auto; margin-right: auto; }
.mb-4 { margin-bottom: 1.5rem; }
.mt-4 { margin-top: 1.5rem; }
.d-block { display: block; }
.small { font-size: 0.875em; }
.text-muted { color: #6c757d; }
.fst-italic { font-style: italic; }

hr {
    margin: 1.5rem 0;
}

/* Responsive display utilities */
.d-none-mobile { display: none; }
.d-mobile-only { display: block; }
.d-flex-desktop { display: none; }

@media (min-width: 768px) {
    .d-none-mobile { display: block; }
    .d-mobile-only { display: none; }
    .d-flex-desktop { display: flex; }
}

/* Inline list utilities */
.list-inline {
    padding-left: 0;
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 1rem;
}
.list-inline li,
.list-inline-item {
    display: inline-block;
    list-style: none;
}

.social-icon {
    width: 2rem;
    height: 2rem;
    fill: #212529;
}
.social-icon:hover {
    fill: var(--primary);
}
