/*
Theme Name: BMO Blog
Description: Theme cho subdomain blog, header/footer đồng bộ với site Next.js chính (Blue Moon Opportunities).
Author: Blue Moon Opportunities
Version: 1.0.0
Text Domain: bmo-blog
*/

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    overflow-x: hidden;
}

body {
    font-family: 'Inter', sans-serif;
    background: #0f0f0f;
    color: #ffffff;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

.bmo-container {
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    justify-self: center;
}

/* ---------- Header / Navbar ---------- */

.bmo-header {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 50;
    width: 100%;
    height: 58px;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(9px);
    -webkit-backdrop-filter: blur(9px);
}

.bmo-header__bar {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 20px;
}

.bmo-header__logo {
    position: relative;
    width: 127px;
}

.bmo-header__logo img {
    width: 100%;
    object-fit: contain;
    object-position: left;
}

.bmo-header__nav {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.bmo-header__link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border-radius: 4px;
    padding: 12px;
    font-size: 16px;
    font-weight: 400;
    color: #ffffff;
}

.bmo-header__link:hover,
.bmo-header__link.is-active {
    background: #ffffff;
    color: #000000;
}

.bmo-header__link.is-active {
    font-weight: 700;
}

.bmo-lang-switch {
    display: none;
    align-items: center;
    border: 1px solid #ffffff;
    border-radius: 999px;
    padding: 10px 24px;
    font-size: 14px;
}

.bmo-lang-switch a {
    color: #ffffff;
}

.bmo-lang-switch a.is-active {
    color: #1e5abc;
}

.bmo-lang-switch__divider {
    margin: 0 6px;
    color: #ffffff;
}

.bmo-lang-switch--mobile {
    display: flex;
    margin-top: 20px;
}

.bmo-header__toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    padding: 10px 14px;
    background: transparent;
    border: none;
    cursor: pointer;
}

.bmo-header__toggle img {
    width: 24px;
    height: 24px;
}

.bmo-mobile-nav {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 50;
    width: 80vw;
    height: 100vh;
    background: #000000;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 14px 16px 0;
    transform: translateX(100%);
    transition: transform 0.3s ease-out;
    pointer-events: none;
}

.bmo-mobile-nav.is-open {
    transform: translateX(0);
    pointer-events: auto;
    box-shadow: 0 4px 21.6px 6px rgba(255, 255, 255, 0.15);
}

.bmo-mobile-nav__link {
    display: flex;
    width: 100%;
    align-items: center;
    gap: 6px;
    border-radius: 4px;
    padding: 12px;
    font-size: 16px;
    font-weight: 400;
    color: #ffffff;
}

.bmo-mobile-nav__link.is-active {
    background: #ffffff;
    color: #000000;
    font-weight: 700;
}

@media (min-width: 1280px) {
    .bmo-header {
        height: 93px;
    }

    .bmo-header__bar {
        padding: 24px 60px;
    }

    .bmo-header__logo {
        width: 167px;
    }

    .bmo-header__nav {
        display: flex;
    }

    .bmo-lang-switch:not(.bmo-lang-switch--mobile) {
        display: flex;
    }

    .bmo-header__toggle {
        display: none;
    }
}

/* ---------- Footer ---------- */

.bmo-footer {
    position: relative;
    z-index: 1;
    width: 100%;
    overflow: hidden;
    background: #000000;
    padding: 40px 16px;
}

.bmo-footer__bg {
    position: absolute;
    z-index: -1;
    top: 335px;
    right: -400px;
    max-width: none;
    width: 1100px;
}

.bmo-footer__grid {
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    text-align: center;
    gap: 40px;
}

.bmo-footer__logo-mobile {
    position: relative;
    width: 266px;
    height: 72px;
    margin: 0 auto;
}

.bmo-footer__logo-mobile img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.bmo-footer__col-label {
    font-size: 16px;
    font-weight: 400;
    line-height: 20px;
    letter-spacing: 0.32px;
    color: #ffffff;
    margin-bottom: 12px;
}

.bmo-footer__col p,
.bmo-footer__col a {
    display: block;
    font-size: 16px;
    font-weight: 400;
    line-height: 20px;
    letter-spacing: 0.32px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 12px;
}

.bmo-footer__col a:hover {
    color: #ffffff;
}

.bmo-footer__logo-desktop {
    display: none;
}

.bmo-footer__copyright {
    position: relative;
    margin-top: 40px;
    width: 100%;
    text-align: center;
}

.bmo-footer__copyright p {
    font-size: 16px;
    color: #ffffff;
}

@media (min-width: 1280px) {
    .bmo-footer {
        padding: 80px 0 40px;
    }

    .bmo-footer__bg {
        position: absolute;
        z-index: -1;
        top: 50px;
        right: 50px;
        max-width: none;
        width: 1100px;
    }

    .bmo-footer__grid {
        display: grid;
        grid-template-columns: repeat(10, 1fr);
        gap: 24px;
        text-align: left;
        padding: 0 70px;
    }

    .bmo-footer__logo-mobile {
        display: none;
    }

    .bmo-footer__col--company {
        grid-column: span 2 / span 2;
    }

    .bmo-footer__col--projects {
        grid-column: span 3 / span 3;
    }

    .bmo-footer__col--follow {
        grid-column: span 2 / span 2;
    }

    .bmo-footer__col p,
    .bmo-footer__col a,
    .bmo-footer__col-label {
        margin-bottom: 0;
    }

    .bmo-footer__col {
        display: flex;
        flex-direction: column;
        gap: 24px;
    }

    .bmo-footer__logo-desktop {
        display: block;
        grid-column: span 3 / span 3;
        position: relative;
        width: 411px;
        height: 111px;
    }

    .bmo-footer__logo-desktop img {
        width: 100%;
        height: 100%;
        object-fit: contain;
        object-position: left;
    }

    .bmo-footer__copyright {
        margin-top: 80px;
    }
}

/* ---------- Back to top (khớp components/BackToTop.tsx) ---------- */

.bmo-back-to-top {
    position: fixed;
    z-index: 50;
    bottom: 24px;
    right: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    border: 1px solid #ffffff;
    background: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.3s, transform 0.3s, background 0.3s;
    pointer-events: none;
}

.bmo-back-to-top:hover {
    background: #ffffff;
}

.bmo-back-to-top.is-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.bmo-back-to-top svg {
    width: 20px;
    height: 20px;
    color: #000000;
}

@media (min-width: 1280px) {
    .bmo-back-to-top {
        right: 32px;
    }
}

/* ---------- Hero + Filter (khớp blog/(main)/layout.tsx) ---------- */

.bmo-hero {
    position: relative;
    display: grid;
    padding-top: 115px;
}

.bmo-hero__bg {
    position: absolute;
    top: 80px;
    line-height: 0;
}

.bmo-hero__bg img {
    max-width: none;
    width: 1000px;
    height: 1000px;
}

.bmo-hero__bg--1 {
    right: -720px;
}

.bmo-hero__bg--2 {
    top: 200px;
    left: -720px;
}

.bmo-hero__inner {
    display: flex;
    flex-direction: column;
    width: 100%;
    padding: 0 16px;
}

.bmo-hero__title {
    color: #ffffff;
}

.bmo-hero__title--desktop {
    display: none;
}

.bmo-hero__title--mobile {
    font-size: 32px;
    font-weight: 400;
    line-height: 42px;
    letter-spacing: -2px;
    padding-right: 73px;
}

.bmo-hero__desc {
    font-size: 16px;
    font-weight: 400;
    line-height: 20px;
    letter-spacing: 0.32px;
    color: rgba(255, 255, 255, 0.6);
}

@media (min-width: 1280px) {
    .bmo-hero {
        grid-template-columns: repeat(3, 1fr);
        padding-top: 160px;
    }

    .bmo-hero__bg--1 {
        right: -400px;
    }

    .bmo-hero__bg--2 {
        top: 400px;
        left: -400px;
    }

    .bmo-hero__inner {
        grid-column: span 2 / span 2;
        padding: 0 70px;
    }

    .bmo-hero__title--desktop {
        display: block;
    }

    .bmo-hero__title--mobile {
        display: none;
    }

    .bmo-hero__desc {
        font-size: 20px;
        font-weight: 300;
        line-height: 32px;
        letter-spacing: 0.4px;
        padding-right: 56px;
    }
}

.bmo-filter {
    position: relative;
    z-index: 10;
    margin-top: 40px;
    padding: 0 16px;
}

.bmo-filter__inner {
    display: flex;
    flex-direction: column-reverse;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.bmo-filter__nav {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 18px;
}

.bmo-filter__search {
    width: 100%;
}

.bmo-filter__search label {
    display: flex;
    width: 100%;
    align-items: center;
    background: #000000;
    border-bottom: 2px solid rgba(255, 255, 255, 0.6);
    padding: 16px;
    border-radius: 10px;
}

.bmo-filter__search input {
    width: 100%;
    background: transparent;
    border: none;
    outline: none;
    font-size: 16px;
    font-weight: 400;
    line-height: 20px;
    letter-spacing: 0.32px;
    color: #ffffff;
}

.bmo-filter__search input::placeholder {
    color: #ffffff;
}

.bmo-filter__row,
.bmo-filter__tags {
    display: flex;
    color: #ffffff;
    overflow-x: scroll;
}

.bmo-filter__row {
    gap: 32px;
}

.bmo-filter__row a {
    color: rgba(255, 255, 255, 0.6);
    white-space: nowrap;
    flex-shrink: 0;
}

.bmo-filter__row a.is-active {
    color: #ffffff;
    font-weight: 700;
}

.bmo-filter__tags {
    gap: 12px;
}

.bmo-filter__tag {
    display: flex;
    width: fit-content;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: 1px solid #ffffff;
    white-space: nowrap;
    flex-shrink: 0;
}

.bmo-filter__tag span {
    margin: 12px 24px;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    color: #ffffff;
}

.bmo-filter__tag.is-active {
    background: #ffffff;
}

.bmo-filter__tag.is-active span {
    color: #000000;
}

@media (min-width: 1280px) {
    .bmo-filter {
        margin-top: 50px;
        padding: 0 70px;
    }

    .bmo-filter__inner {
        flex-direction: row;
        align-items: flex-start;
        gap: 40px;
    }

    .bmo-filter__nav {
        width: auto;
        gap: 16px;
    }

    .bmo-filter__search {
        width: 468px;
        flex-shrink: 0;
    }

    .bmo-filter__row,
    .bmo-filter__tags {
        overflow-x: hidden;
    }

    .bmo-filter__tags {
        gap: 32px;
    }
}

/* ---------- Blog listing (khớp components/blog/Trending.tsx) ---------- */

.bmo-section-label {
    font-size: 32px;
    font-weight: 400;
    line-height: 42px;
    letter-spacing: -2px;
    text-transform: uppercase;
    color: #ffffff;
}

.bmo-trending {
    display: flex;
    flex-direction: column;
    gap: 32px;
    margin-top: 40px;
    margin-bottom: 40px;
    padding: 0 16px;
}

.bmo-trending__block {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.bmo-trending__block:first-child {
    position: relative;
    z-index: 10;
}

.bmo-trending__featured {
    display: grid;
    gap: 16px;
}

@media (min-width: 1280px) {
    .bmo-trending {
        gap: 40px;
        margin-bottom: 70px;
        padding: 0 70px;
    }

    .bmo-trending__block {
        gap: 32px;
    }

    .bmo-trending__featured {
        grid-template-columns: repeat(4, 1fr);
        gap: 32px;
    }

    .bmo-post-grid__card--wide {
        grid-column: span 2 / span 2;
    }
}

/* ---------- Category archive (khớp blog/(main)/category/[slug]/page.tsx) ---------- */

.bmo-archive {
    margin-top: 40px;
    margin-bottom: 40px;
    padding: 0 16px;
}

@media (min-width: 1280px) {
    .bmo-archive {
        margin-bottom: 70px;
        padding: 0 70px;
    }
}

.bmo-search__label {
    margin-bottom: 32px;
}

.bmo-pagination {
    margin-top: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    color: #ffffff;
}

.bmo-pagination__current {
    color: rgba(255, 255, 255, 0.6);
}

.bmo-empty {
    margin-top: 40px;
    color: rgba(255, 255, 255, 0.6);
}

/* ---------- Headings (khớp @layer base trong app/globals.css) ---------- */

h1 {
    font-size: 32px;
    font-style: normal;
    font-weight: 400;
    line-height: 42px;
    letter-spacing: -2px;
}

h2 {
    font-size: 24px;
    font-style: normal;
    font-weight: 700;
    line-height: 40px;
}

h3 {
    font-size: 32px;
    font-style: normal;
    font-weight: 400;
    line-height: 42px;
    letter-spacing: -2px;
}

h4 {
    font-size: 14px;
    font-style: normal;
    font-weight: 700;
    line-height: normal;
}

h6 {
    font-size: 18px;
    font-style: normal;
    font-weight: 700;
    line-height: 22px;
    letter-spacing: 0.36px;
}

@media (min-width: 1280px) {
    h1 {
        font-size: 70px;
        font-style: normal;
        font-weight: 500;
        line-height: normal;
        letter-spacing: -2.1px;
    }

    h2 {
        font-size: 50px;
        font-style: normal;
        font-weight: 500;
        line-height: 56px;
    }

    h3 {
        font-size: 40px;
        font-style: normal;
        font-weight: 500;
        line-height: 67px;
    }

    h4 {
        font-size: 24px;
        font-style: normal;
        font-weight: 700;
        line-height: 40px;
    }

    h5 {
        font-size: 20px;
        font-style: normal;
        font-weight: 700;
        line-height: 32px;
    }

    h6 {
        font-size: 18px;
        font-style: normal;
        font-weight: 700;
        line-height: 22px;
        letter-spacing: 0.36px;
    }
}

/* ---------- Single post (khớp app/[locale]/blog/post/[slug]/page.tsx) ---------- */

.bmo-single-article {
    padding-bottom: 90px;
}

.bmo-single__hero {
    position: relative;
    height: 500px;
    width: 100%;
    overflow: hidden;
}

.bmo-single__hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bmo-single__container {
    padding: 0 16px;
}

.bmo-single__meta-row {
    margin-top: 60px;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.bmo-single__meta-col {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.bmo-single__meta-col p {
    color: #ffffff;
}

.bmo-single__meta-label--mobile {
    font-size: 18px;
    font-weight: 400;
    line-height: 28px;
    letter-spacing: 0.36px;
    color: #ffffff;
}

.bmo-single__meta-label--desktop {
    display: none;
}

.bmo-single__meta-value {
    font-size: 18px;
    font-weight: 400;
    line-height: 28px;
    letter-spacing: 0.36px;
}

.bmo-single__title {
    margin-top: 135px;
    color: #ffffff;
    text-transform: uppercase;
}

.bmo-single__body {
    margin-top: 18px;
    color: #ffffff;
    line-height: 1.7;
}

.bmo-single__body img {
    border-radius: 8px;
    margin: 24px 0;
}

@media (min-width: 1280px) {
    .bmo-single__container {
        padding: 0 70px;
    }

    .bmo-single__meta-row {
        flex-direction: row;
        gap: 200px;
    }

    .bmo-single__meta-label--mobile {
        display: none;
    }

    .bmo-single__meta-label--desktop {
        display: block;
    }

    .bmo-single__meta-value {
        font-size: 20px;
        font-weight: 300;
        line-height: 32px;
        letter-spacing: 0.4px;
    }

    .bmo-single__title {
        margin-top: 16px;
    }

    .bmo-single__body {
        margin-top: 32px;
    }
}

/* ---------- Share buttons (khớp components/blog/ShareButtons.tsx) ---------- */

.bmo-share {
    margin-top: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.bmo-share__btn {
    display: flex;
    height: 40px;
    width: 40px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: transparent;
    color: #ffffff;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s;
}

.bmo-share__btn:hover {
    background: #1e5abc;
    border-color: #1e5abc;
}

.bmo-share__icon-check {
    display: none;
}

.bmo-share__btn.is-copied .bmo-share__icon-default {
    display: none;
}

.bmo-share__btn.is-copied .bmo-share__icon-check {
    display: block;
}

.bmo-share__feedback {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    opacity: 0;
    transition: opacity 0.2s;
}

.bmo-share__feedback.is-visible {
    opacity: 1;
}

/* ---------- Related posts (khớp components/blog/PostGrid.tsx) ---------- */

.bmo-related {
    margin-top: 80px;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

@media (min-width: 1280px) {
    .bmo-related {
        gap: 32px;
    }
}

.bmo-post-grid {
    display: grid;
    gap: 16px;
}

@media (min-width: 1280px) {
    .bmo-post-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 32px;
    }
}

.bmo-post-grid__card {
    position: relative;
    display: block;
    height: 460px;
    width: 100%;
    overflow: hidden;
    border-radius: 12px;
}

.bmo-post-grid__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}

.bmo-post-grid__overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 160px;
    display: flex;
    align-items: flex-start;
    padding: 24px;
    background: #000000;
}

.bmo-post-grid__title {
    font-size: 24px;
    font-weight: 700;
    color: #ffffff;
}
