/* ============================================================
   MARBOX — Inner-page component library
   ------------------------------------------------------------
   Loaded on every page after style.css. Reuses the same tokens
   (--green-*, --radius, --gutter …) so inner pages stay in sync
   with the homepage — including the "Giá trị cốt lõi" section,
   which uses the brand green accent.
   ============================================================ */

/* ---------- Section rhythm helpers ---------- */
.section {
    padding-block: clamp(40px, 7vw, 40px);
}
.section--tight {
    padding-block: clamp(40px, 5vw, 40px);
}
.section--tint {
    background: var(--surface);
}
.section--dark {
    background: var(--green-900);
    color: rgba(255, 255, 255, 0.8);
}

/* left-aligned section head variant */
.section-head--left {
    justify-items: start;
    text-align: left;
}
.section-head--left .badge {
    margin-inline: 0;
}

.text-accent {
    color: var(--green-600);
}

/* visually-hidden but screen-reader-available (for section headings that
   the visual design intentionally omits) */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* standalone "Xem tất cả" link on light backgrounds (the .news .link-more
   rule in style.css only covers the dark homepage news section) */
.link-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--green-600);
    transition: color 0.2s ease;
}
.link-more:hover {
    color: var(--green-900);
}
.link-more .icon {
    transition: transform 0.25s ease;
}
.link-more:hover .icon {
    transform: translateX(4px);
}

/* ============================================================
   PAGE HERO  (breadcrumb banner — dark green, textured)
   ============================================================ */
.page-hero {
    position: relative;
    overflow: hidden;
    background-color: var(--green-900);
    background-image:
        radial-gradient(
            120% 130% at 85% -20%,
            rgba(115, 198, 156, 0.22),
            rgba(115, 198, 156, 0) 55%
        ),
        linear-gradient(rgba(6, 29, 19, 0.84), rgba(6, 29, 19, 0.93)),
        url("../images/XQeoEqW1mKNCDfoUZmATDn3qFQs.png");
    background-size: cover, cover, cover;
    background-position: center, center, center;
    background-repeat: no-repeat;
    color: #fff;
    border-bottom: 1px solid var(--line-dark);
}
.page-hero__inner {
    position: relative;
    z-index: 1;
    padding-block: clamp(30px, 5vw, 70px);
}
.page-hero__leaf {
    position: absolute;
    z-index: 0;
    opacity: 0.35;
    pointer-events: none;
    animation: float 7s ease-in-out infinite;
}
.page-hero__leaf--1 {
    top: 14%;
    right: 6%;
    width: 92px;
}
.page-hero__leaf--2 {
    bottom: 10%;
    right: 18%;
    width: 58px;
    animation-delay: 1.6s;
}

.breadcrumb ol {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 8px;
    font-size: 0.95rem;
}
.breadcrumb li {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.breadcrumb a {
    color: rgba(255, 255, 255, 0.66);
    transition: color 0.2s ease;
}
.breadcrumb a:hover {
    color: var(--green-300);
}
.breadcrumb span[aria-current] {
    color: #fff;
    font-weight: 500;
}
.breadcrumb__sep {
    color: rgba(255, 255, 255, 0.35);
}
.page-hero__eyebrow {
    margin-top: 20px;
}
.page-hero__title {
    font-size: var(--fs-h2);
    color: #fff;
    margin-top: 16px;
    max-width: 22ch;
}
.page-hero--wide .page-hero__title {
    max-width: min(94%, 900px);
    font-size: clamp(1.9rem, 1.2rem + 2.4vw, 3rem);
}
.page-hero__sub {
    font-size: var(--fs-lead);
    color: rgba(255, 255, 255, 0.72);
    margin-top: 16px;
    max-width: 62ch;
}

/* ============================================================
   CORE VALUES  (Giá trị cốt lõi — About page)
   ============================================================ */
.values__head {
    text-align: center;
    display: grid;
    justify-items: center;
    gap: 8px;
    margin-bottom: clamp(36px, 4vw, 56px);
}
.values__mark {
    width: 42px;
    height: 4px;
    border-radius: 999px;
    background: var(--green-500);
    margin-bottom: 6px;
}
.value-list {
    display: grid;
    gap: 6px;
    max-width: 940px;
    margin-inline: auto;
}
.value {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: clamp(16px, 2vw, 28px);
    align-items: start;
    padding: clamp(20px, 2.4vw, 28px) 0;
    border-bottom: 1px solid var(--line);
}
.value:last-child {
    border-bottom: 0;
}
.value__icon {
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: var(--green-50);
    color: var(--green-600);
    flex: none;
}
.value__body {
    display: grid;
    gap: 6px;
}
.value__title {
    font-size: 1.25rem;
    color: var(--ink);
}
.value__text {
    color: var(--muted);
    font-size: 1.0625rem;
}

/* About: reuse homepage .process / .benefits / .contact.
   A couple of local tweaks so the About page reads standalone. */
.about-intro .process__head {
    margin-bottom: 0;
}
.about-mission {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: clamp(32px, 5vw, 72px);
    align-items: center;
}
.about-mission__media img {
    width: 100%;
    border-radius: var(--radius);
    aspect-ratio: 5 / 4;
    object-fit: cover;
    box-shadow: var(--shadow-md);
}
.about-mission__body {
    display: grid;
    gap: 18px;
    align-content: center;
}
.about-checks {
    display: grid;
    gap: 12px;
    margin-top: 6px;
}
.about-check {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 12px;
    align-items: start;
    color: var(--body);
}
.about-check__icon {
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--green-50);
    color: var(--green-600);
    flex: none;
    margin-top: 2px;
}

/* ============================================================
   BLOG / NEWS LIST
   ============================================================ */
.blog__layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: clamp(32px, 4vw, 60px);
    align-items: start;
}
.post-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: clamp(24px, 2.6vw, 34px);
}

/* News card */
.news-card {
    display: flex;
    flex-direction: column;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    transition:
        transform 0.35s cubic-bezier(0.22, 0.61, 0.36, 1),
        box-shadow 0.35s ease,
        border-color 0.25s ease;
}
.news-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-md);
    border-color: transparent;
}
.news-card__media {
    display: block;
    overflow: hidden;
    aspect-ratio: 16 / 10;
}
.news-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.news-card:hover .news-card__img {
    transform: scale(1.06);
}
.news-card__body {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: clamp(18px, 2vw, 24px);
    flex: 1;
}
.news-card__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 14px;
    font-size: 0.9rem;
    color: var(--muted);
}
.news-card__meta .m {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.news-card__meta .icon {
    color: var(--green-500);
}
.news-card__cat {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: var(--radius-pill);
    background: var(--green-50);
    color: var(--green-600);
    font-size: 0.82rem;
    font-weight: 600;
    width: fit-content;
}
.news-card__title {
    font-size: 1.3rem;
    line-height: 1.28;
}
.news-card__title a {
    transition: color 0.2s ease;
}
.news-card__title a:hover {
    color: var(--green-600);
}
.news-card__excerpt {
    color: var(--muted);
    font-size: 1rem;
    margin-top: -2px;
}
.news-card__more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--green-600);
    margin-top: auto;
    padding-top: 4px;
}
.news-card__more .icon {
    transition: transform 0.25s ease;
}
.news-card__more:hover .icon {
    transform: translateX(4px);
}

/* horizontal (wide) news card — used for a featured first post */
.news-card--wide {
    grid-column: 1 / -1;
    flex-direction: row;
}
.news-card--wide .news-card__media {
    flex: 0 0 46%;
    aspect-ratio: auto;
}
.news-card--wide .news-card__body {
    justify-content: center;
    gap: 14px;
    padding: clamp(24px, 3vw, 40px);
}
.news-card--wide .news-card__title {
    font-size: clamp(1.5rem, 2vw, 2rem);
}

/* ============================================================
   SIDEBAR WIDGETS  (news list + article)
   ============================================================ */
.sidebar {
    display: grid;
    gap: clamp(24px, 2.6vw, 32px);
    position: sticky;
    top: calc(var(--nav-h) + 24px);
    align-self: start;
}
.widget {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: clamp(20px, 2vw, 26px);
}
.widget__title {
    font-size: 1.2rem;
    margin-bottom: 18px;
    position: relative;
    padding-bottom: 12px;
}
.widget__title::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 40px;
    height: 3px;
    border-radius: 999px;
    background: var(--green-500);
}
.widget-search {
    display: flex;
    background: var(--surface);
    border-radius: var(--radius-sm);
    padding: 5px;
    gap: 6px;
}
.widget-search input {
    flex: 1;
    background: none;
    border: 0;
    padding: 10px 12px;
}
.widget-search input:focus {
    outline: none;
}
.widget-search button {
    display: grid;
    place-items: center;
    width: 44px;
    border: 0;
    border-radius: var(--radius-sm);
    background: var(--green-600);
    color: #fff;
    cursor: pointer;
    transition: background-color 0.2s ease;
}
.widget-search button:hover {
    background: var(--green-900);
}

.cat-list {
    display: grid;
    gap: 2px;
}
.cat-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 11px 4px;
    border-bottom: 1px solid var(--line);
    color: var(--body);
    font-weight: 500;
    transition:
        color 0.2s ease,
        padding 0.2s ease;
}
.cat-list li:last-child a {
    border-bottom: 0;
}
.cat-list a:hover {
    color: var(--green-600);
    padding-left: 10px;
}
.cat-list .count {
    font-size: 0.85rem;
    color: var(--muted);
    background: var(--surface);
    border-radius: 999px;
    padding: 2px 10px;
    min-width: 34px;
    text-align: center;
}

.mini-post {
    display: grid;
    grid-template-columns: 76px 1fr;
    gap: 14px;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
}
.mini-post:first-child {
    padding-top: 0;
}
.mini-post:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}
.mini-post__img {
    width: 76px;
    height: 62px;
    border-radius: var(--radius-sm);
    object-fit: cover;
}
.mini-post__title {
    font-size: 0.98rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--ink);
    transition: color 0.2s ease;
}
.mini-post:hover .mini-post__title {
    color: var(--green-600);
}
.mini-post__date {
    font-size: 0.82rem;
    color: var(--muted);
    margin-top: 4px;
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
/* Scoped to <a> so it never collides with WordPress's `tag` body class
   (body.tag on tag archives would otherwise inherit these styles). */
a.tag {
    display: inline-flex;
    padding: 7px 14px;
    border-radius: var(--radius-pill);
    background: var(--surface);
    color: var(--body);
    font-size: 0.88rem;
    font-weight: 500;
    transition:
        background-color 0.2s ease,
        color 0.2s ease;
}
a.tag:hover {
    background: var(--green-600);
    color: #fff;
}

/* sidebar CTA card */
.widget--cta {
    background: var(--green-900);
    color: #fff;
    text-align: center;
    display: grid;
    gap: 14px;
    justify-items: center;
}
.widget--cta .widget__title {
    color: #fff;
}
.widget--cta .widget__title::after {
    left: 50%;
    transform: translateX(-50%);
    background: var(--green-300);
}
.widget--cta p {
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.98rem;
}

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: clamp(36px, 4vw, 56px);
}
.pagination a,
.pagination span {
    display: grid;
    place-items: center;
    min-width: 44px;
    height: 44px;
    padding: 0 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    font-weight: 600;
    color: var(--ink);
    transition: all 0.2s ease;
}
.pagination a:hover {
    border-color: var(--green-600);
    color: var(--green-600);
}
.pagination .is-current {
    background: var(--green-600);
    border-color: var(--green-600);
    color: #fff;
}
.pagination .is-disabled {
    opacity: 0.4;
    pointer-events: none;
}

/* ============================================================
   ARTICLE DETAIL
   ============================================================ */
.article__layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: clamp(32px, 4vw, 60px);
    align-items: start;
}
.article__header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 18px;
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--line);
    font-size: 0.95rem;
    color: var(--muted);
}
.article__header .m {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}
.article__header .icon {
    color: var(--green-500);
}
.article__cover {
    width: 100%;
    border-radius: var(--radius);
    aspect-ratio: 16 / 9;
    object-fit: cover;
    margin-bottom: clamp(24px, 3vw, 36px);
}

/* prose — long-form typography for article/project/product bodies */
.prose {
    color: var(--body);
    font-size: 1.075rem;
    line-height: 1.75;
}
.prose > * + * {
    margin-top: 1.1em;
}
.prose__lead {
    font-size: 1.2rem;
    color: var(--ink);
    font-weight: 500;
    line-height: 1.6;
}
.prose h2 {
    font-size: clamp(1.5rem, 2vw, 1.9rem);
    margin-top: 1.6em;
    line-height: 1.2;
}
.prose h3 {
    font-size: 1.3rem;
    margin-top: 1.4em;
}
.prose p {
    color: var(--muted);
}
.prose strong {
    color: var(--ink);
    font-weight: 600;
}
.prose ul {
    display: grid;
    gap: 10px;
    padding-left: 0;
}
.prose ul li {
    position: relative;
    padding-left: 30px;
    color: var(--muted);
}
.prose ul li::before {
    content: "";
    position: absolute;
    left: 4px;
    top: 0.62em;
    width: 8px;
    height: 8px;
    border-radius: 2px;
    background: var(--green-500);
    transform: rotate(45deg);
}
.prose ol {
    display: grid;
    gap: 10px;
    padding-left: 22px;
    list-style: decimal;
    color: var(--muted);
}
.prose blockquote {
    margin-top: 1.4em;
    padding: 22px 26px;
    border-left: 4px solid var(--green-500);
    background: var(--green-50);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--green-900);
    font-style: italic;
}
.prose img {
    width: 100%;
    border-radius: var(--radius);
    margin-block: 1.4em;
}
.prose a {
    color: var(--green-600);
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* article footer: tags + share */
.article__footer {
    display: flex;
    flex-wrap: wrap;
    gap: 18px 24px;
    align-items: center;
    justify-content: space-between;
    margin-top: clamp(28px, 3vw, 40px);
    padding-top: 24px;
    border-top: 1px solid var(--line);
}
.article__tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}
.article__tags .lbl {
    font-weight: 600;
    color: var(--ink);
    margin-right: 4px;
}
.share {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}
.share .lbl {
    font-weight: 600;
    color: var(--ink);
}
.share a {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--surface);
    color: var(--ink);
    transition:
        transform 0.2s ease,
        background-color 0.2s ease,
        color 0.2s ease;
}
.share a:hover {
    background: var(--green-600);
    color: #fff;
    transform: translateY(-3px);
}

/* author box */
.author-box {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 18px;
    align-items: center;
    margin-top: clamp(28px, 3vw, 40px);
    padding: clamp(20px, 2.4vw, 28px);
    background: var(--surface);
    border-radius: var(--radius);
}
.author-box__avatar {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--green-600);
    color: #fff;
}
.author-box__name {
    font-size: 1.15rem;
    color: var(--ink);
}
.author-box__role {
    color: var(--muted);
    font-size: 0.95rem;
}

/* prev / next */
.post-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 24px;
}
.post-nav a {
    display: grid;
    gap: 4px;
    padding: 18px 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    transition:
        border-color 0.2s ease,
        background-color 0.2s ease;
}
.post-nav a:hover {
    border-color: var(--green-600);
    background: var(--green-50);
}
.post-nav__label {
    font-size: 0.85rem;
    color: var(--muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.post-nav__title {
    font-weight: 600;
    color: var(--ink);
    line-height: 1.3;
}
.post-nav--next {
    text-align: right;
}

/* comments (static placeholder) */
.comments {
    margin-top: clamp(36px, 4vw, 56px);
}
.comment-form {
    display: grid;
    gap: 16px;
    margin-top: 20px;
}
.comment-form .row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.comment-form input,
.comment-form textarea {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    transition: border-color 0.2s ease;
}
.comment-form input:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: var(--green-500);
}
.comment-form textarea {
    resize: vertical;
    min-height: 130px;
}
/* WordPress comment form — match the static design.
   Fields sit inside <p>/.row wrappers, so stretch them to fill the cell,
   drop the generated labels (design is placeholder-only), and match the
   heading size used on the static "Viết bình luận" section. */
.comments .section-title {
    font-size: var(--fs-h3);
}
.comment-form .row input,
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form textarea {
    width: 100%;
}
.comment-form label {
    display: none;
}
.comment-form .comment-notes,
.comment-form .comment-form-url,
.comment-form .comment-form-cookies-consent {
    display: none;
}

/* related posts / projects grid */
.related {
    margin-top: clamp(48px, 6vw, 80px);
}
.related__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: clamp(20px, 2.4vw, 28px);
    margin-top: 28px;
}

/* ============================================================
   PORTFOLIO  (Project / Product list)
   ============================================================ */
.filter-chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: clamp(32px, 4vw, 48px);
}
.chip {
    padding: 10px 22px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--line);
    background: var(--white);
    color: var(--ink);
    font-weight: 600;
    font-size: 0.98rem;
    cursor: pointer;
    transition: all 0.2s ease;
}
.chip:hover {
    border-color: var(--green-500);
    color: var(--green-600);
}
.chip.is-active {
    background: var(--green-600);
    border-color: var(--green-600);
    color: #fff;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(22px, 2.6vw, 32px);
}
.pcard {
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    transition:
        transform 0.35s cubic-bezier(0.22, 0.61, 0.36, 1),
        box-shadow 0.35s ease,
        border-color 0.25s ease;
}
.pcard:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-md);
    border-color: transparent;
}
.pcard__media {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 4 / 3;
}
.pcard__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.pcard:hover .pcard__img {
    transform: scale(1.07);
}
.pcard__cat {
    position: absolute;
    top: 14px;
    left: 14px;
    padding: 6px 14px;
    border-radius: var(--radius-pill);
    background: rgba(255, 255, 255, 0.92);
    color: var(--green-900);
    font-size: 0.82rem;
    font-weight: 600;
    backdrop-filter: blur(4px);
}
.pcard__body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: clamp(18px, 2vw, 24px);
    flex: 1;
}
.pcard__title {
    font-size: 1.25rem;
    line-height: 1.3;
}
.pcard__title a {
    transition: color 0.2s ease;
}
.pcard__title a:hover {
    color: var(--green-600);
}
.pcard__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    font-size: 0.9rem;
    color: var(--muted);
    margin-top: auto;
}
.pcard__meta .m {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.pcard__meta .icon {
    color: var(--green-500);
}
.pcard__brand {
    height: 30px;
    width: auto;
    max-width: 120px;
    object-fit: contain;
    object-position: left;
    opacity: 0.9;
}
.pcard.is-hidden {
    display: none;
}

/* ============================================================
   PROJECT / PRODUCT DETAIL
   ============================================================ */
.pd__top {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(28px, 4vw, 56px);
    align-items: start;
}
.pd__gallery {
    display: grid;
    gap: 14px;
    position: sticky;
    top: calc(var(--nav-h) + 24px);
}
.pd__stage {
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--surface);
    aspect-ratio: 4 / 3;
}
.pd__stage img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.pd__thumbs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}
.pd__thumb {
    border: 2px solid transparent;
    border-radius: var(--radius-sm);
    overflow: hidden;
    cursor: pointer;
    background: var(--surface);
    aspect-ratio: 1 / 1;
    padding: 0;
    transition: border-color 0.2s ease;
}
.pd__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.pd__thumb.is-active {
    border-color: var(--green-500);
}

/* info / specs column */
.pd__info {
    display: grid;
    gap: 18px;
    align-content: start;
}
.pd__status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    padding: 7px 16px;
    border-radius: var(--radius-pill);
    background: var(--green-50);
    color: var(--green-600);
    font-weight: 600;
    font-size: 0.9rem;
}
.pd__status::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--green-500);
}
.pd__title {
    font-size: clamp(1.6rem, 1.1rem + 1.8vw, 2.4rem);
}
.pd__excerpt {
    color: var(--muted);
    font-size: var(--fs-lead);
}
.pd__specs {
    display: grid;
    gap: 0;
    background: var(--surface);
    border-radius: var(--radius);
    padding: clamp(18px, 2vw, 26px);
    margin-top: 4px;
}
.spec-row {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 16px;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
    font-size: 1rem;
}
.spec-row:first-child {
    padding-top: 0;
}
.spec-row:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}
.spec-row .k {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: var(--muted);
    font-weight: 500;
}
.spec-row .k .icon {
    color: var(--green-500);
}
.spec-row .v {
    color: var(--ink);
    font-weight: 600;
}
.pd__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 6px;
}

/* full-width body under the top block */
.pd__body {
    margin-top: clamp(40px, 5vw, 64px);
    max-width: 900px;
}

/* dark CTA strip */
.cta-strip {
    background: var(--green-900);
    border-radius: var(--radius);
    color: #fff;
    padding: clamp(28px, 3.5vw, 48px);
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 24px;
    align-items: center;
    margin-top: clamp(40px, 5vw, 64px);
    position: relative;
    overflow: hidden;
}
.cta-strip__title {
    color: #fff;
    font-size: clamp(1.4rem, 2vw, 2rem);
}
.cta-strip__text {
    color: rgba(255, 255, 255, 0.72);
    margin-top: 8px;
    max-width: 52ch;
}
.cta-strip__phone {
    font-size: 1.6rem;
    font-weight: 700;
    color: #fff;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}
.cta-strip__actions {
    display: grid;
    gap: 12px;
    justify-items: start;
}

/* ============================================================
   CONTACT PAGE
   ============================================================ */
.contact-page__grid {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: clamp(28px, 4vw, 56px);
    align-items: start;
}
.contact-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: clamp(36px, 4vw, 56px);
}
.contact-card {
    display: grid;
    gap: 8px;
    padding: clamp(20px, 2.2vw, 28px);
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease;
}
.contact-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}
.contact-card__icon {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--green-50);
    color: var(--green-600);
    margin-bottom: 4px;
}
.contact-card__label {
    font-weight: 600;
    color: var(--ink);
    font-size: 1.05rem;
}
.contact-card__value {
    color: var(--muted);
    font-size: 0.98rem;
}
.contact-card__value a:hover {
    color: var(--green-600);
}
.social-row {
    display: flex;
    gap: 12px;
    margin-top: 22px;
}
.social-row a {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: var(--green-900);
    color: #fff;
    transition:
        transform 0.2s ease,
        background-color 0.2s ease;
}
.social-row a:hover {
    transform: translateY(-3px);
    background: var(--green-600);
}

/* map */
.map-embed {
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--line);
    line-height: 0;
    box-shadow: var(--shadow-sm);
    /* soft fallback so an unloaded/slow map isn't a stark white void */
    background: repeating-linear-gradient(
        45deg,
        var(--surface) 0 14px,
        #ededed 14px 28px
    );
}
.map-embed iframe {
    width: 100%;
    height: clamp(300px, 40vw, 460px);
    border: 0;
    display: block;
    filter: grayscale(0.2);
}

/* ============================================================
   FAQ (accordion)
   ============================================================ */
.faq {
    display: grid;
    gap: 14px;
    max-width: 840px;
    margin-inline: auto;
}
.faq__item {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    transition: border-color 0.2s ease;
}
.faq__item.is-open {
    border-color: var(--green-500);
}
.faq__q {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
    padding: clamp(18px, 2vw, 24px);
    background: none;
    border: 0;
    text-align: left;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--ink);
    cursor: pointer;
}
.faq__icon {
    flex: none;
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--green-50);
    color: var(--green-600);
    transition:
        transform 0.3s ease,
        background-color 0.2s ease,
        color 0.2s ease;
}
.faq__item.is-open .faq__icon {
    transform: rotate(180deg);
    background: var(--green-600);
    color: #fff;
}
.faq__a {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
}
.faq__a-inner {
    padding: 0 clamp(18px, 2vw, 24px) clamp(18px, 2vw, 24px);
    color: var(--muted);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
    .blog__layout,
    .article__layout {
        grid-template-columns: 1fr;
    }
    .sidebar {
        position: static;
        grid-template-columns: repeat(2, 1fr);
    }
    .related__grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .project-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .about-mission {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 860px) {
    .pd__top,
    .contact-page__grid {
        grid-template-columns: 1fr;
    }
    .pd__gallery {
        position: static;
    }
    .news-card--wide {
        flex-direction: column;
    }
    .news-card--wide .news-card__media {
        flex-basis: auto;
        aspect-ratio: 16 / 10;
    }
    .cta-strip {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .post-grid,
    .sidebar,
    .contact-cards,
    .comment-form .row {
        grid-template-columns: 1fr;
    }
    .project-grid,
    .related__grid {
        grid-template-columns: 1fr;
    }
    .spec-row {
        grid-template-columns: 1fr;
        gap: 4px;
    }
    .post-nav {
        grid-template-columns: 1fr;
    }
    .value {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .pd__thumbs {
        grid-template-columns: repeat(4, 1fr);
    }
    .site-header__inner {
        gap: 15px;
        height: 65px;
    }
    .nav.is-open {
        inset: 65px 0 auto 0;
    }
}

/* ============================================================
   WP THEME ADDITIONS
   Active-nav state + utility classes that replace the prototype's
   inline styles (Theme Check flags inline style="") when ported
   into WordPress templates.
   ============================================================ */
.nav__list .current-menu-item > a,
.nav__list .current-menu-ancestor > a,
.nav__list .current_page_item > a {
    color: var(--green-600);
}

/* product card variant */
.pcard__excerpt {
    color: var(--muted);
    font-size: 0.98rem;
    margin: 0;
}
.pcard .news-card__more {
    margin-top: 8px;
}

/* spacing / layout utilities */
.section--flush-top {
    padding-top: 0;
}
.badge--light {
    background: var(--white);
}
.btn--start {
    justify-self: start;
}
.u-mt-6 {
    margin-top: 6px;
}
.u-mt-14 {
    margin-top: 14px;
}
.lead--w52 {
    max-width: 52ch;
}
.lead--w60 {
    max-width: 60ch;
}

/* related block head */
.related__head {
    margin-bottom: 8px;
}
.related__head .section-title {
    font-size: var(--fs-h3);
}

/* map height variants (avoid inline style on the iframe) */
.map-embed--tall iframe {
    height: clamp(340px, 46vw, 520px);
}

/* WP core alignment helpers for the post content */
.prose .alignleft {
    float: left;
    margin: 0.4em 1.5em 1em 0;
}
.prose .alignright {
    float: right;
    margin: 0.4em 0 1em 1.5em;
}
.prose .aligncenter {
    display: block;
    margin-inline: auto;
}
.prose figure {
    margin: 1.4em 0;
}
.prose figcaption {
    font-size: 0.9rem;
    color: var(--muted);
    margin-top: 8px;
    text-align: center;
}

/* comment list (native WP) */
.comment-list {
    display: grid;
    gap: 20px;
    margin: 24px 0 0;
}
.comment-list .comment-body {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 20px 22px;
}
.comment-list .comment-author {
    font-weight: 600;
    color: var(--ink);
}
.comment-list .comment-meta {
    font-size: 0.85rem;
    color: var(--muted);
    margin-bottom: 8px;
}
.comment-list .comment-meta a {
    color: var(--muted);
}
.comment-respond {
    margin-top: 28px;
}

/* detail info column brand logo */
.pd__brand {
    height: 40px;
    width: auto;
    object-fit: contain;
    object-position: left;
}

/* compact news card (related grid) */
.news-card--compact .news-card__title {
    font-size: 1.1rem;
}

/* narrow content utilities */
.container--narrow {
    max-width: 760px;
}
.u-maxw-420 {
    max-width: 420px;
}

/* flexible-layout helpers */
.text-muted {
    color: var(--muted);
}
.section--round-top {
    border-radius: var(--radius) var(--radius) 0 0;
}
.faq__item.is-open .faq__a {
    max-height: 640px;
}

/* hidden inline SVG sprite */
.marbox-sprite {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

/* ============================================================
   WIDGETS — custom MARBOX widgets + core widgets styled to match
   ============================================================ */

/* CTA card widget (green) — mirrors .widget--cta */
.widget_marbox_cta {
    background: var(--green-900);
    color: #fff;
    text-align: center;
    display: grid;
    gap: 14px;
    justify-items: center;
}
.widget_marbox_cta .widget__title {
    color: #fff;
}
.widget_marbox_cta .widget__title::after {
    left: 50%;
    transform: translateX(-50%);
    background: var(--green-300);
}
.widget_marbox_cta p {
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.98rem;
}

/* Core tag-cloud widget → styled like .tag chips */
.sidebar .widget_tag_cloud .tagcloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.sidebar .widget_tag_cloud a {
    display: inline-flex;
    padding: 7px 14px;
    border-radius: var(--radius-pill);
    background: var(--surface);
    color: var(--body);
    font-size: 0.88rem !important;
    font-weight: 500;
    text-decoration: none;
    transition:
        background-color 0.2s ease,
        color 0.2s ease;
}
.sidebar .widget_tag_cloud a:hover {
    background: var(--green-600);
    color: #fff;
}

/* Core list widgets in the sidebar (Categories, Nav Menu, Pages, Recent, Archive) */
.sidebar .widget_categories ul,
.sidebar .widget_nav_menu ul,
.sidebar .widget_pages ul,
.sidebar .widget_recent_entries ul,
.sidebar .widget_archive ul,
.sidebar .widget_meta ul {
    display: grid;
    gap: 2px;
}
.sidebar .widget_categories li a,
.sidebar .widget_nav_menu li a,
.sidebar .widget_pages li a,
.sidebar .widget_recent_entries li a,
.sidebar .widget_archive li a,
.sidebar .widget_meta li a {
    display: block;
    padding: 10px 4px;
    border-bottom: 1px solid var(--line);
    color: var(--body);
    font-weight: 500;
    transition:
        color 0.2s ease,
        padding 0.2s ease;
}
.sidebar .widget_categories li:last-child a,
.sidebar .widget_nav_menu li:last-child a {
    border-bottom: 0;
}
.sidebar .widget_categories li a:hover,
.sidebar .widget_nav_menu li a:hover,
.sidebar .widget_pages li a:hover,
.sidebar .widget_recent_entries li a:hover,
.sidebar .widget_archive li a:hover,
.sidebar .widget_meta li a:hover {
    color: var(--green-600);
    padding-left: 8px;
}

/* ============================================================
   FLOAT CONTACT — fixed Phone / Zalo / Facebook buttons
   ============================================================ */
.float-contact {
    position: fixed;
    bottom: 22px;
    z-index: 99;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.float-contact--left {
    left: 20px;
}
.float-contact--right {
    right: 20px;
}
.float-contact__btn {
    position: relative;
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    color: #fff;
    transition: transform 0.2s ease;
}
.float-contact__btn:hover {
    transform: scale(1.08);
}
.float-contact__btn .icon {
    position: relative;
    z-index: 1;
}
.float-contact__btn--phone {
    background: #16a34a;
    animation: marbox-fc-phone 1.6s ease-out infinite;
}
.float-contact__btn--zalo {
    background: #0068ff;
    animation: marbox-fc-zalo 1.6s ease-out infinite 0.3s;
}
.float-contact__btn--facebook {
    background: #1877f2;
    animation: marbox-fc-fb 1.6s ease-out infinite 0.6s;
}
@keyframes marbox-fc-phone {
    0% {
        box-shadow:
            0 0 0 0 rgba(22, 163, 74, 0.55),
            0 6px 16px rgba(0, 0, 0, 0.25);
    }
    70% {
        box-shadow:
            0 0 0 16px rgba(22, 163, 74, 0),
            0 6px 16px rgba(0, 0, 0, 0.25);
    }
    100% {
        box-shadow:
            0 0 0 0 rgba(22, 163, 74, 0),
            0 6px 16px rgba(0, 0, 0, 0.25);
    }
}
@keyframes marbox-fc-zalo {
    0% {
        box-shadow:
            0 0 0 0 rgba(0, 104, 255, 0.55),
            0 6px 16px rgba(0, 0, 0, 0.25);
    }
    70% {
        box-shadow:
            0 0 0 16px rgba(0, 104, 255, 0),
            0 6px 16px rgba(0, 0, 0, 0.25);
    }
    100% {
        box-shadow:
            0 0 0 0 rgba(0, 104, 255, 0),
            0 6px 16px rgba(0, 0, 0, 0.25);
    }
}
@keyframes marbox-fc-fb {
    0% {
        box-shadow:
            0 0 0 0 rgba(24, 119, 242, 0.55),
            0 6px 16px rgba(0, 0, 0, 0.25);
    }
    70% {
        box-shadow:
            0 0 0 16px rgba(24, 119, 242, 0),
            0 6px 16px rgba(0, 0, 0, 0.25);
    }
    100% {
        box-shadow:
            0 0 0 0 rgba(24, 119, 242, 0),
            0 6px 16px rgba(0, 0, 0, 0.25);
    }
}

/* phone number label — slides out on hover */
.float-contact__label {
    position: absolute;
    top: 50%;
    left: calc(100% + 12px);
    transform: translateY(-50%) translateX(-6px);
    white-space: nowrap;
    background: #16a34a;
    color: #fff;
    padding: 8px 16px;
    border-radius: var(--radius-pill);
    font-size: 0.95rem;
    font-weight: 700;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
    opacity: 0;
    pointer-events: none;
    transition:
        opacity 0.25s ease,
        transform 0.25s ease;
}
.float-contact__btn--phone:hover .float-contact__label {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}
.float-contact--right .float-contact__label {
    left: auto;
    right: calc(100% + 12px);
    transform: translateY(-50%) translateX(6px);
}
.float-contact--right .float-contact__btn--phone:hover .float-contact__label {
    transform: translateY(-50%) translateX(0);
}

@media (max-width: 560px) {
    .float-contact {
        gap: 12px;
        bottom: 16px;
    }
    .float-contact--left {
        left: 14px;
    }
    .float-contact--right {
        right: 14px;
    }
    .float-contact__btn {
        width: 48px;
        height: 48px;
    }
    .float-contact__label {
        display: none;
    }
}
@media (prefers-reduced-motion: reduce) {
    .float-contact__btn {
        animation: none;
        box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
    }
}

/* ============================================================
   BACK TO TOP — fixed bottom-right, appears on scroll
   ============================================================ */
.back-to-top {
    position: fixed;
    right: 20px;
    bottom: 22px;
    z-index: 98;
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--green-600);
    color: #fff;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(6, 29, 19, 0.3);
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition:
        opacity 0.25s ease,
        transform 0.25s ease,
        background-color 0.2s ease,
        visibility 0.25s;
}
.back-to-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: none;
}
.back-to-top:hover {
    background: var(--green-900);
    transform: translateY(-3px);
}

/* When the float contact is on the RIGHT, lift it so the back-to-top
   button sits just below it (no overlap). */
.float-contact--right {
    bottom: 84px;
}

@media (max-width: 560px) {
    .back-to-top {
        right: 14px;
        bottom: 16px;
        width: 42px;
        height: 42px;
    }
    .float-contact--right {
        bottom: 72px;
    }
}

/* ============================================================
   HEADER SEARCH + SEARCH LIGHTBOX
   ============================================================ */
.header-search-toggle {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: none;
    color: var(--ink);
    cursor: pointer;
    transition:
        background-color 0.2s ease,
        color 0.2s ease;
    flex: none;
}
.header-search-toggle:hover {
    background: var(--surface);
    color: var(--green-600);
}

.search-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition:
        opacity 0.3s ease,
        visibility 0.3s ease;
}
.search-modal.is-open {
    opacity: 1;
    visibility: visible;
}
.search-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(6, 29, 19, 0.72);
    backdrop-filter: saturate(1.1) blur(6px);
    cursor: pointer;
}
.search-modal__close {
    position: fixed;
    top: 22px;
    right: 22px;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    cursor: pointer;
    transition:
        background-color 0.2s ease,
        transform 0.2s ease;
}
.search-modal__close:hover {
    background: rgba(255, 255, 255, 0.28);
    transform: rotate(90deg);
}
.search-modal__inner {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 720px;
    margin-top: clamp(90px, 20vh, 220px);
    padding-inline: var(--gutter);
    opacity: 0;
    transform: translateY(-18px);
    transition:
        opacity 0.3s ease 0.05s,
        transform 0.4s cubic-bezier(0.22, 0.61, 0.36, 1) 0.05s;
}
.search-modal.is-open .search-modal__inner {
    opacity: 1;
    transform: none;
}
.search-modal__form {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--white);
    border-radius: var(--radius);
    padding: 8px 8px 8px 26px;
    box-shadow: var(--shadow-md);
}
.search-modal__form input {
    flex: 1;
    min-width: 0;
    border: 0;
    background: none;
    color: var(--ink);
    font-size: clamp(1.15rem, 1rem + 1.1vw, 1.6rem);
    font-weight: 500;
    padding: 16px 0;
}
.search-modal__form input::placeholder {
    color: var(--muted-2);
    font-weight: 400;
}
.search-modal__form input:focus {
    outline: none;
}
.search-modal__submit {
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    flex: none;
    border: 0;
    border-radius: 12px;
    background: var(--green-600);
    color: #fff;
    cursor: pointer;
    transition:
        background-color 0.2s ease,
        transform 0.2s ease;
}
.search-modal__submit:hover {
    background: var(--green-900);
    transform: scale(1.05);
}
.search-modal__hint {
    margin-top: 18px;
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}
body.search-open {
    overflow: hidden;
}

@media (max-width: 860px) {
    /* Only the search toggle takes the auto margin so the search + menu
       buttons group flush-right and sit side by side. Without this the
       toggle's own margin-left:auto (in style.css) splits the free space
       and strands the search button in the middle. */
    .header-search-toggle {
        margin-left: auto;
    }
    .nav-toggle {
        margin-left: 0;
    }
    .search-modal__form {
        padding-left: 18px;
    }
    .search-modal__submit {
        width: 48px;
        height: 48px;
    }
}
@media (prefers-reduced-motion: reduce) {
    .search-modal,
    .search-modal__inner,
    .search-modal__close {
        transition: none;
    }
}

/* ============================================================
   AJAX FORMS — honeypot + status states
   ============================================================ */
.marbox-hp {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}
.contact-form__status.is-error {
    color: #ff9b9b;
}
.newsletter__status {
    margin-top: 8px;
    font-size: 0.85rem;
    color: var(--green-600);
    min-height: 1.1em;
}
.newsletter__status.is-error {
    color: #c0392b;
}

/* ============================================================
   MOBILE OVERFLOW GUARDS — blog / article / sidebar
   ------------------------------------------------------------
   Same min-width:auto trap as the footer/contact fix: the blog &
   article layouts collapse to a single grid column on mobile, but
   the track refuses to shrink below its content's min-content
   (post cards, the wide featured card, and the sidebar's search
   form), pushing it ~30px past the viewport. With html{overflow-x:
   clip} that surplus was being cut flush against the right edge
   (no gutter). Let these grid tracks + the search field shrink so
   the content reflows inside the container instead.
   ============================================================ */
.blog__layout > *,
.article__layout > *,
.sidebar > *,
.post-grid > *,
.related__grid > * {
    min-width: 0;
}
.widget form,
.widget input,
.search-form,
.search-form input {
    min-width: 0;
}
