/*
Theme Name: BJS Dark
Theme URI: https://example.com/
Author: Sayar Myo
Description: Minimal dark WordPress theme for a video catalog site.
Version: 1.2.7
Text Domain: bjs_dark
*/

:root {
    --bjs-bg: #0b0b0b;
    --bjs-surface: #151515;
    --bjs-text: #f5f5f5;
    --bjs-muted: #a8a8a8;
    --bjs-border: #2a2a2a;
    --bjs-max-width: 1320px;
}
* { box-sizing: border-box; }
html { background: var(--bjs-bg); }
body {
    margin: 0;
    background: var(--bjs-bg);
    color: var(--bjs-text);
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.5;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; }
.bjs-container {
    width: min(calc(100% - 32px), var(--bjs-max-width));
    margin-inline: auto;
}

/* Header */
.site-header {
    background: #050505;
    border-bottom: 1px solid var(--bjs-border);
    position: sticky;
    top: 0;
    z-index: 999;
}
.bjs-header-inner {
    min-height: 68px;
    display: flex;
    align-items: center;
    gap: 24px;
}
.site-branding { flex: 0 0 auto; }
.site-branding .custom-logo-link { display: flex; align-items: center; }
.site-branding .custom-logo { max-height: 44px; width: auto; }
.bjs-text-logo {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: 1px;
    white-space: nowrap;
}
.primary-navigation {
    min-width: 0;
    flex: 1 1 auto;
    overflow: hidden;
}
.primary-navigation ul,
.primary-navigation .menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 22px;
    white-space: nowrap;
}
.primary-navigation a {
    display: block;
    padding: 24px 0;
    font-size: 14px;
    font-weight: 700;
    color: #e8e8e8;
}
.primary-navigation a:hover,
.primary-navigation .current-menu-item > a { color: #fff; }




/* Header search v1.2.4 */
.bjs-header-search {
    display: flex;
    align-items: center;
    gap: 0;
    flex: 0 0 auto;
}
.bjs-header-search input[type="search"] {
    width: 190px;
    height: 36px;
    padding: 0 11px;
    border: 1px solid #333;
    border-right: 0;
    border-radius: 5px 0 0 5px;
    background: #101010;
    color: #f1f1f1;
    font-size: 13px;
    outline: none;
}
.bjs-header-search input[type="search"]::placeholder { color: #777; }
.bjs-header-search input[type="search"]:focus { border-color: #555; }
.bjs-header-search button {
    height: 36px;
    padding: 0 12px;
    border: 1px solid #333;
    border-radius: 0 5px 5px 0;
    background: #181818;
    color: #eee;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}
.bjs-header-search button:hover,
.bjs-header-search button:focus-visible {
    background: #242424;
    outline: none;
}
.bjs-mobile-search { display: none; }

@media (min-width: 721px) {
    .bjs-header-inner { gap: 18px; }
    .primary-navigation { min-width: 0; margin-left: auto; }
    .primary-navigation ul,
    .primary-navigation .menu { gap: 18px; }
    .bjs-desktop-search { margin-left: 6px; }
}

/* Mobile navigation toggle */
.bjs-menu-toggle {
    display: none;
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid var(--bjs-border);
    border-radius: 6px;
    background: #101010;
    color: #fff;
    cursor: pointer;
}
.bjs-menu-toggle:hover,
.bjs-menu-toggle:focus-visible {
    border-color: #555;
    outline: none;
}
.bjs-menu-toggle-lines {
    width: 20px;
    height: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.bjs-menu-toggle-lines span {
    display: block;
    width: 100%;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    transition: transform .18s ease, opacity .18s ease;
}

/* Keep sticky site header below the WordPress toolbar while logged in. */
body.admin-bar .site-header {
    top: 32px;
}

/* Home */
.bjs-home-main { padding: 28px 0 48px; }
.bjs-ad-label {
    margin: 0 0 8px;
    text-align: center;
    font-size: 11px;
    color: var(--bjs-muted);
    text-transform: uppercase;
    letter-spacing: .08em;
}
.bjs-banner-ad {
    width: 100%;
    min-height: 110px;
    background: var(--bjs-surface);
    border: 1px solid var(--bjs-border);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-bottom: 34px;
}
.bjs-rectangle-ad-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 46px;
}
.bjs-rectangle-ad {
    width: min(100%, 360px);
    min-height: 280px;
    background: var(--bjs-surface);
    border: 1px solid var(--bjs-border);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.bjs-ad-placeholder {
    color: #777;
    font-size: 14px;
    text-align: center;
    padding: 20px;
}
.bjs-banner-ad .widget,
.bjs-rectangle-ad .widget { width: 100%; margin: 0; }

.bjs-section { margin-top: 8px; }
.bjs-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 18px;
    padding-bottom: 11px;
    border-bottom: 1px solid var(--bjs-border);
}
.bjs-section-title {
    margin: 0;
    font-size: 26px;
    line-height: 1.2;
}
.bjs-view-all {
    color: #cfcfcf;
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
}
.bjs-view-all:hover { color: #fff; }

.bjs-featured-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}
.bjs-feature-card { min-width: 0; }
.bjs-feature-media {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #111;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.bjs-feature-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.bjs-feature-duration {
    position: absolute;
    right: 8px;
    bottom: 8px;
    padding: 4px 7px;
    border-radius: 4px;
    background: rgba(0,0,0,.82);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}
.bjs-feature-title {
    margin: 10px 0 4px;
    font-size: 18px;
    line-height: 1.35;
}
.bjs-feature-meta {
    color: var(--bjs-muted);
    font-size: 13px;
}

.site-main { min-height: 60vh; }
.bjs-content-page { padding: 36px 0 56px; }
.bjs-content-page h1 { margin-top: 0; }

/* Footer */
.site-footer {
    margin-top: 40px;
    border-top: 1px solid var(--bjs-border);
    background: #070707;
}
.bjs-footer-inner {
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bjs-muted);
    font-size: 13px;
    text-align: center;
}

/* Responsive */
@media (max-width: 1000px) {
    .bjs-header-inner { gap: 16px; }
    .primary-navigation {
        overflow-x: auto;
        scrollbar-width: none;
    }
    .primary-navigation::-webkit-scrollbar { display: none; }
    .primary-navigation ul,
    .primary-navigation .menu {
        gap: 18px;
        width: max-content;
    }
}
@media (max-width: 720px) {
    .bjs-container {
        width: min(calc(100% - 20px), var(--bjs-max-width));
    }

    .site-header {
        overflow: visible;
    }

    .bjs-header-inner {
        min-height: auto;
        padding: 12px 0;
        display: grid;
        grid-template-columns: 42px minmax(0, 1fr);
        grid-template-areas:
            "toggle brand"
            "search search"
            "nav nav";
        align-items: center;
        column-gap: 12px;
        row-gap: 12px;
    }

    .bjs-menu-toggle {
        grid-area: toggle;
        display: flex;
        margin: 0;
    }

    .site-branding {
        grid-area: brand;
        justify-self: start;
        min-width: 0;
    }

    .site-branding .custom-logo {
        max-height: 38px;
    }

    .bjs-text-logo {
        font-size: 20px;
        line-height: 1;
    }

    .bjs-desktop-search {
        display: none;
    }

    .bjs-mobile-search {
        grid-area: search;
        display: flex;
        width: 100%;
        padding: 0;
        border: 0;
        background: transparent;
    }

    .bjs-mobile-search input[type="search"] {
        flex: 1 1 auto;
        width: auto;
        min-width: 0;
        height: 42px;
        font-size: 14px;
    }

    .bjs-mobile-search button {
        flex: 0 0 auto;
        height: 42px;
        padding: 0 15px;
    }

    .primary-navigation {
        grid-area: nav;
        position: static;
        width: 100%;
        min-width: 0;
        max-height: 0;
        overflow: hidden;
        visibility: hidden;
        opacity: 0;
        background: #0a0a0a;
        border: 0;
        border-radius: 6px;
        box-shadow: none;
        transition: max-height .22s ease, opacity .16s ease, visibility .16s ease;
    }

    .primary-navigation.is-open {
        max-height: 560px;
        visibility: visible;
        opacity: 1;
    }

    .primary-navigation ul,
    .primary-navigation .menu {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        width: 100%;
        margin: 0;
        padding: 0;
        white-space: normal;
    }

    .primary-navigation li {
        width: 100%;
        margin: 0;
        border-bottom: 1px solid #242424;
    }

    .primary-navigation li:last-child {
        border-bottom: 0;
    }

    .primary-navigation a {
        display: block;
        width: 100%;
        padding: 13px 15px;
        font-size: 14px;
        line-height: 1.25;
        border: 0;
        border-radius: 0;
        background: transparent;
    }

    .primary-navigation a:hover,
    .primary-navigation .current-menu-item > a {
        background: #181818;
    }

    .bjs-featured-grid {
        grid-template-columns: 1fr;
        gap: 22px;
    }

    .bjs-section-title {
        font-size: 22px;
    }

    .bjs-feature-title {
        font-size: 17px;
    }

    .bjs-banner-ad {
        min-height: 90px;
        margin-bottom: 26px;
    }

    .bjs-rectangle-ad-wrap {
        margin-bottom: 34px;
    }
}


/* BJS Admin GIF banner integration */
.bjs-banner-ad > a,
.bjs-banner-ad > img,
.bjs-rectangle-ad > a,
.bjs-rectangle-ad > img {
    display: block;
    width: 100%;
}
.bjs-banner-ad a img,
.bjs-banner-ad > img {
    width: 100%;
    height: auto;
    max-height: 180px;
    object-fit: contain;
    display: block;
}
.bjs-rectangle-ad a img,
.bjs-rectangle-ad > img {
    width: 100%;
    height: auto;
    max-height: 360px;
    object-fit: contain;
    display: block;
}


/* Managed banner placement v1.2.2 */
.bjs-banner-ad .bjs-managed-banner,
.bjs-banner-ad .bjs-managed-banner-link,
.bjs-rectangle-ad .bjs-managed-banner,
.bjs-rectangle-ad .bjs-managed-banner-link {
    display: block;
    width: 100%;
}

.bjs-banner-ad .bjs-managed-banner-image {
    display: block;
    width: 100%;
    height: auto;
    max-height: 180px;
    object-fit: contain;
}

.bjs-rectangle-ad .bjs-managed-banner-image {
    display: block;
    width: 100%;
    height: auto;
    max-height: 360px;
    object-fit: contain;
}


@media (max-width: 782px) {
    body.admin-bar .site-header {
        top: 46px;
    }
}
