.bd-projects-page,
.bd-projects-page * {
    box-sizing: border-box;
}

.bd-projects-page {
    --bd-anthracite: #202b35;
    --bd-anthracite-soft: #2b3a46;
    --bd-anthracite-light: #33424e;
    --bd-burgundy: #b51636;
    --bd-burgundy-dark: #95142e;
    --bd-border: #d8e2eb;
    --bd-line: #e6edf3;
    --bd-text: #253544;
    --bd-muted: #718191;
    --bd-bg: #edf3f7;
    --bd-white: #ffffff;
    --bd-row-alt: #fbf4ee;
    --bd-row-hover: #f3f7f8;
    width: 100%;
    min-height: 100vh;
    overflow-x: hidden;
    background: var(--bd-bg);
    color: var(--bd-text);
    font-family: inherit;
}

.bd-projects-page a {
    color: inherit;
    text-decoration: none;
}

.bd-projects-page button,
.bd-projects-page input,
.bd-projects-page select {
    font-family: inherit;
}

.bd-projects-map-area {
    position: relative;
    width: 100%;
    background: #e7e4df;
    border-bottom: 1px solid #d7dee5;
}

.bd-projects-map-toolbar {
    position: absolute;
    z-index: 5;
    top: 14px;
    right: 18px;
    display: flex;
    gap: 8px;
}

.bd-map-tool {
    min-height: 32px;
    padding: 7px 14px;
    border: 1px solid rgba(32, 43, 53, 0.18);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.96);
    color: var(--bd-anthracite);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(32, 43, 53, 0.12);
}

.bd-projects-map-canvas {
    position: relative;
    width: 100%;
    height: 185px;
    overflow: hidden;
    background:
        linear-gradient(90deg, rgba(255,255,255,0.24) 1px, transparent 1px),
        linear-gradient(0deg, rgba(255,255,255,0.24) 1px, transparent 1px),
        #e7e4df;
    background-size: 62px 62px;
}

.bd-map-road,
.bd-map-pin {
    position: absolute;
    display: block;
    pointer-events: none;
}

.bd-map-road-a {
    left: -4%;
    top: 40px;
    width: 112%;
    height: 44px;
    transform: rotate(7deg);
    border-top: 8px solid rgba(255,255,255,0.72);
    border-bottom: 5px solid rgba(255,255,255,0.44);
}

.bd-map-road-b {
    left: -5%;
    top: 112px;
    width: 115%;
    height: 36px;
    transform: rotate(-8deg);
    border-top: 7px solid rgba(255,255,255,0.64);
    border-bottom: 4px solid rgba(255,255,255,0.40);
}

.bd-map-road-c {
    right: 20%;
    top: -80px;
    width: 50px;
    height: 360px;
    transform: rotate(-25deg);
    background: rgba(255,255,255,0.48);
    border-left: 1px solid rgba(150,160,170,0.20);
    border-right: 1px solid rgba(150,160,170,0.20);
}

.bd-map-pin {
    width: 16px;
    height: 16px;
    border-radius: 50% 50% 50% 0;
    background: var(--bd-burgundy);
    transform: rotate(-45deg);
    box-shadow: 0 8px 18px rgba(32, 43, 53, 0.20);
}

.bd-map-pin::after {
    content: "";
    position: absolute;
    inset: 5px;
    border-radius: 50%;
    background: #fff;
}

.bd-map-pin-1 { left: 30%; top: 38%; }
.bd-map-pin-2 { left: 61%; top: 47%; }
.bd-map-pin-3 { left: 43%; top: 66%; }

.bd-map-placeholder {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: min(360px, calc(100% - 36px));
    padding: 20px 24px;
    border: 1px solid rgba(32, 43, 53, 0.10);
    border-radius: 8px;
    background: rgba(255,255,255,0.88);
    color: var(--bd-anthracite);
    text-align: center;
    box-shadow: 0 16px 34px rgba(32, 43, 53, 0.10);
}

.bd-map-placeholder strong {
    display: block;
    margin-bottom: 6px;
    font-size: 17px;
    font-weight: 650;
    letter-spacing: -0.02em;
}

.bd-map-placeholder span {
    display: block;
    color: var(--bd-muted);
    font-size: 12px;
    line-height: 1.45;
}

.bd-projects-shell {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 18px 18px 64px;
    display: grid;
    grid-template-columns: 310px minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.bd-projects-filter,
.bd-projects-results {
    min-width: 0;
}

.bd-filter-box {
    width: 100%;
    padding: 18px 18px 20px;
    border: 1px solid var(--bd-border);
    border-radius: 8px;
    background: var(--bd-white);
    box-shadow: 0 10px 26px rgba(32, 43, 53, 0.055);
}

.bd-filter-box h1 {
    margin: 0 0 16px;
    padding: 0 0 4px;
    border: 0;
    color: var(--bd-anthracite);
    font-size: 18px;
    font-weight: 650;
    line-height: 1.25;
    text-align: center;
    letter-spacing: -0.01em;
}

.bd-field {
    position: relative;
    margin-bottom: 10px;
}

.bd-field-labeled {
    margin-top: 12px;
}

.bd-field label,
.bd-range-group > label {
    display: block;
    margin: 0 0 6px;
    color: var(--bd-anthracite);
    font-size: 12px;
    font-weight: 600;
}

.bd-field select,
.bd-field input,
.bd-range-row input,
.bd-table-search input {
    width: 100%;
    min-height: 38px;
    border: 1px solid #d4dee8;
    border-radius: 7px;
    background: #fff;
    color: var(--bd-text);
    font-size: 13px;
    line-height: 1.2;
    outline: none;
    transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.bd-field select {
    padding: 8px 34px 8px 12px;
    appearance: auto;
}

.bd-field input,
.bd-range-row input,
.bd-table-search input {
    padding: 8px 12px;
}

.bd-field select:focus,
.bd-field input:focus,
.bd-range-row input:focus,
.bd-table-search input:focus {
    border-color: rgba(181, 22, 54, 0.45);
    box-shadow: 0 0 0 3px rgba(181, 22, 54, 0.08);
}

.bd-filter-group {
    margin: 11px 0 0;
    border: 1px solid var(--bd-border);
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
}

.bd-filter-group summary {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 9px 34px;
    background: var(--bd-anthracite);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.1;
    cursor: pointer;
    list-style: none;
    user-select: none;
    transition: background 160ms ease;
}

.bd-filter-group summary:hover {
    background: var(--bd-anthracite-soft);
}

.bd-filter-group summary::-webkit-details-marker {
    display: none;
}

.bd-filter-group summary::after {
    content: "";
    position: absolute;
    right: 14px;
    top: 50%;
    width: 7px;
    height: 7px;
    border-right: 1.5px solid rgba(255,255,255,0.88);
    border-bottom: 1.5px solid rgba(255,255,255,0.88);
    transform: translateY(-65%) rotate(45deg);
    transition: transform 160ms ease;
}

.bd-filter-group[open] summary::after {
    transform: translateY(-35%) rotate(-135deg);
}

.bd-check-list {
    padding: 11px 12px 12px;
    background: #fff;
}

.bd-check-list label {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 24px;
    margin: 0 0 5px;
    color: #354657;
    font-size: 13px;
    font-weight: 450;
    line-height: 1.25;
    cursor: pointer;
}

.bd-check-list label:last-child {
    margin-bottom: 0;
}

.bd-check-list input {
    width: 14px;
    height: 14px;
    margin: 0;
    accent-color: var(--bd-burgundy);
    flex: 0 0 auto;
}

.bd-range-group {
    margin-top: 12px;
}

.bd-range-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.bd-range-row span {
    display: block;
    margin-bottom: 4px;
    color: var(--bd-muted);
    font-size: 10px;
    font-weight: 600;
    text-transform: lowercase;
}

.bd-range-row input {
    min-height: 35px;
}

.bd-search-button {
    width: 100%;
    min-height: 42px;
    margin-top: 15px;
    border: 0;
    border-radius: 7px;
    background: var(--bd-anthracite);
    color: #fff;
    font-size: 13px;
    font-weight: 650;
    cursor: pointer;
    box-shadow: 0 10px 18px rgba(32, 43, 53, 0.12);
    transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.bd-search-button:hover {
    transform: translateY(-1px);
    background: var(--bd-anthracite-soft);
    box-shadow: 0 14px 24px rgba(32, 43, 53, 0.16);
}

.bd-results-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 56px;
    margin-bottom: 14px;
    padding: 12px 16px;
    border: 1px solid var(--bd-border);
    border-radius: 8px;
    background: var(--bd-white);
    box-shadow: 0 10px 26px rgba(32, 43, 53, 0.045);
}

.bd-total-count {
    color: var(--bd-anthracite);
    font-size: 15px;
    font-weight: 600;
}

.bd-total-count strong {
    color: var(--bd-burgundy);
    font-size: 16px;
    font-weight: 650;
}

.bd-view-buttons {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.bd-view-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 9px 17px;
    border: 1px solid #ccd8e3;
    border-radius: 7px;
    background: #fff;
    color: var(--bd-anthracite);
    font-size: 13px;
    font-weight: 650;
    line-height: 1;
    cursor: pointer;
    transition: all 160ms ease;
}

.bd-view-btn:hover {
    border-color: rgba(32, 43, 53, 0.38);
    background: #f6f8fa;
}

.bd-view-btn.active {
    border-color: var(--bd-anthracite);
    background: var(--bd-anthracite);
    color: #fff;
    box-shadow: 0 10px 18px rgba(32, 43, 53, 0.12);
}

.bd-table-card {
    border: 1px solid var(--bd-border);
    border-radius: 8px;
    background: var(--bd-white);
    box-shadow: 0 12px 28px rgba(32, 43, 53, 0.055);
    overflow: hidden;
}

.bd-table-search {
    padding: 14px 16px;
    border-bottom: 1px solid var(--bd-line);
    background: #fff;
}

.bd-table-search input {
    max-width: 560px;
    min-height: 40px;
}

.bd-table-wrap {
    width: 100%;
    overflow-x: hidden;
}

.bd-project-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
    background: #fff;
}

.bd-col-no { width: 80px; }
.bd-col-project { width: auto; }
.bd-col-stage { width: 122px; }
.bd-col-country { width: 92px; }
.bd-col-city { width: 105px; }
.bd-col-district { width: 108px; }

.bd-project-table thead th {
    padding: 14px 14px;
    border-bottom: 1px solid #cfdbe5;
    background: #f3f6f8;
    color: var(--bd-anthracite);
    font-size: 12.5px;
    font-weight: 650;
    line-height: 1.2;
    text-align: left;
    text-transform: none;
}

.bd-project-table tbody td {
    padding: 17px 14px;
    border-bottom: 1px solid #e0e8ef;
    color: #304253;
    font-size: 13.5px;
    font-weight: 500;
    line-height: 1.45;
    vertical-align: middle;
}

.bd-project-table tbody tr:nth-child(even) td {
    background: var(--bd-row-alt);
}

.bd-project-table tbody tr:hover td {
    background: var(--bd-row-hover);
}

.bd-project-table tbody td:first-child {
    color: var(--bd-anthracite);
    font-weight: 560;
    white-space: nowrap;
}

.bd-project-table tbody td:nth-child(2) {
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: normal;
}

.bd-project-table tbody td:nth-child(3),
.bd-project-table tbody td:nth-child(4),
.bd-project-table tbody td:nth-child(5),
.bd-project-table tbody td:nth-child(6) {
    color: #344757;
    font-size: 13px;
    font-weight: 500;
}

.bd-project-table a {
    color: var(--bd-anthracite);
    font-weight: 600;
    line-height: 1.45;
}

.bd-project-table a:hover {
    color: var(--bd-burgundy-dark);
}

.bd-table-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 13px 16px;
    border-top: 1px solid var(--bd-line);
    background: #fff;
    color: var(--bd-muted);
    font-size: 13px;
}

.bd-pagination {
    display: flex;
    align-items: center;
    gap: 6px;
}

.bd-pagination a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    min-height: 34px;
    padding: 7px 11px;
    border: 1px solid #d3dee8;
    border-radius: 7px;
    background: #fff;
    color: var(--bd-anthracite);
    font-size: 12px;
    font-weight: 650;
}

.bd-pagination a.active {
    border-color: var(--bd-burgundy);
    background: var(--bd-burgundy);
    color: #fff;
}

.bd-pagination a.disabled {
    opacity: 0.54;
    pointer-events: none;
}

@media (max-width: 1200px) {
    .bd-projects-shell {
        grid-template-columns: 290px minmax(0, 1fr);
        gap: 16px;
        padding-left: 14px;
        padding-right: 14px;
    }

    .bd-col-no { width: 78px; }
    .bd-col-stage { width: 115px; }
    .bd-col-country { width: 86px; }
    .bd-col-city { width: 96px; }
    .bd-col-district { width: 98px; }
}

@media (max-width: 900px) {
    .bd-projects-shell {
        grid-template-columns: 1fr;
    }

    .bd-table-wrap {
        overflow-x: auto;
    }

    .bd-project-table {
        min-width: 860px;
    }
}

@media (max-width: 700px) {
    .bd-projects-shell {
        padding: 14px 12px 44px;
    }

    .bd-results-topbar,
    .bd-table-footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .bd-table-search input {
        max-width: 100%;
    }
}

/* Old reference aligned project detail */
.bd-old-project-detail {
    background: #edf3f7;
    min-height: auto;
}

.bd-old-project-shell {
    max-width: 1180px;
    margin: 0 auto;
    padding: 18px 14px 58px;
}

.bd-old-header-tabs {
    margin-bottom: 12px;
}

.bd-old-header-inner {
    min-height: 54px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border: 1px solid #d8e2eb;
    background: #fff;
    padding: 10px 12px;
    box-shadow: 0 6px 16px rgba(32,43,53,.045);
}

.bd-old-company-title {
    color: #202b35;
    font-size: 14px;
    font-weight: 760;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.bd-old-tabs {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
    flex-wrap: wrap;
}

.bd-old-tabs button {
    min-height: 34px;
    padding: 8px 13px;
    border: 1px solid #cfd9e3;
    background: #f8fafc;
    color: #202b35;
    font-size: 12.5px;
    font-weight: 720;
    cursor: pointer;
}

.bd-old-tabs li.active button,
.bd-old-tabs button:hover {
    border-color: #202b35;
    background: #202b35;
    color: #fff;
}

.bd-old-project-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.18fr) minmax(400px, .82fr);
    gap: 14px;
    align-items: start;
}

.bd-old-info-side { order: 1; }
.bd-old-media-side { order: 2; }

.bd-old-info-box,
.bd-old-media-box,
.bd-old-map-box,
.bd-old-description-box,
.bd-old-alert,
.bd-old-completed-alert {
    border: 1px solid #d8e2eb;
    background: #fff;
    box-shadow: 0 8px 20px rgba(32,43,53,.055);
}

.bd-old-info-box h1 {
    margin: 0;
    padding: 13px 15px;
    border-bottom: 1px solid #e3ebf2;
    color: #202b35;
    font-size: clamp(19px, 2vw, 26px);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -.02em;
    overflow-wrap: anywhere;
}

.bd-old-company-line {
    padding: 10px 15px;
    border-bottom: 1px solid #e3ebf2;
    color: #415466;
    font-size: 14px;
    font-weight: 700;
}

.bd-old-info-table {
    width: 100%;
    margin: 0;
    border-collapse: collapse;
}

.bd-old-info-table td {
    padding: 8px 15px;
    border-bottom: 1px solid #eef3f7;
    color: #526575;
    font-size: 13px;
    font-weight: 560;
    line-height: 1.42;
    vertical-align: middle;
}

.bd-old-info-table tr:nth-child(even) td {
    background: #fbfcfd;
}

.bd-old-info-table tr:last-child td {
    border-bottom: 0;
}

.bd-old-info-table .bd-project-label {
    width: 155px;
    color: #202b35;
    font-size: 13px;
    font-weight: 760;
    white-space: nowrap;
}

.bd-company-button {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    margin: 2px 0;
    padding: 6px 10px;
    border: 1px solid #d5dde6;
    background: #f8fafc;
    color: #202b35;
    font-size: 12.5px;
    font-weight: 720;
}

.bd-company-partnership {
    display: inline-block;
    margin-top: 3px;
    color: #202b35;
    font-size: 12px;
    font-weight: 760;
}

.bd-old-progress {
    width: 100%;
    max-width: 320px;
    height: 18px;
    overflow: hidden;
    border: 1px solid #d4dde6;
    background: #f4f7f9;
}

.bd-old-progress span {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #d71920;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
}

.bd-old-media-box {
    position: relative;
    height: 420px;
    overflow: hidden;
}

.bd-old-media-pane {
    display: none;
    width: 100%;
    height: 100%;
}

.bd-old-media-pane.active {
    display: block;
}

.bd-old-media-pane img,
.bd-old-media-pane iframe {
    width: 100%;
    height: 100%;
    display: block;
    border: 0;
}

.bd-old-media-pane img {
    object-fit: cover;
}

.bd-old-media-empty {
    width: 100%;
    height: 100%;
    min-height: 420px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #718191;
    background: #f8fafc;
    font-size: 17px;
    font-weight: 760;
}

.bd-old-map-box {
    margin-top: 10px;
    overflow: hidden;
}

.bd-route-btn {
    min-height: 34px;
    margin: 10px;
    padding: 7px 13px;
    border: 0;
    background: #b51636;
    color: #fff;
    font-size: 12.5px;
    font-weight: 760;
    cursor: pointer;
}

.bd-old-map-box iframe {
    width: 100%;
    height: 235px;
    display: block;
    border: 0;
}

.bd-old-description-box {
    margin-top: 14px;
    padding: 18px 20px;
}

.bd-old-description-box h2 {
    margin: 0 0 10px;
    color: #202b35;
    font-size: 18px;
    font-weight: 800;
}

.bd-old-description-box h3 {
    margin: 0 0 10px;
    color: #314455;
    font-size: 17px;
    font-weight: 720;
}

.bd-old-description-box div {
    color: #526575;
    font-size: 14px;
    line-height: 1.68;
}

.bd-old-completed-alert {
    margin-bottom: 10px;
    padding: 12px 14px;
    color: #9f2f2a;
    background: #fff1f1;
    border-color: #f1caca;
    font-size: 13px;
    font-weight: 800;
}

.bd-old-alert {
    padding: 22px;
}

.bd-old-alert strong,
.bd-old-alert span {
    display: block;
}

.bd-old-alert strong {
    margin-bottom: 6px;
    color: #202b35;
    font-size: 20px;
    font-weight: 800;
}

.bd-old-alert span {
    color: #718191;
    font-size: 14px;
}

.bd-old-alert a {
    display: inline-flex;
    margin-top: 14px;
    min-height: 36px;
    align-items: center;
    padding: 8px 13px;
    background: #202b35;
    color: #fff;
    font-size: 13px;
    font-weight: 760;
}

@media (max-width: 1050px) {
    .bd-old-project-grid {
        grid-template-columns: 1fr;
    }

    .bd-old-info-side,
    .bd-old-media-side {
        order: initial;
    }
}

@media (max-width: 700px) {
    .bd-old-project-shell {
        padding: 14px 10px 44px;
    }

    .bd-old-header-inner {
        align-items: flex-start;
        flex-direction: column;
    }

    .bd-old-media-box {
        height: 300px;
    }

    .bd-old-media-empty {
        min-height: 300px;
    }

    .bd-old-info-table .bd-project-label {
        width: 120px;
        white-space: normal;
    }

    .bd-old-info-table td {
        padding: 8px 10px;
    }
}
