.projects-hero {
    position: relative;
    display: flex;
    min-height: 470px;
    align-items: flex-end;
    padding: 150px 0 78px;
    overflow: hidden;
    background-color: #0a0a0a;
    background-position: center;
    background-size: cover;
}

.projects-hero::before {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.78);
    content: "";
}

.projects-hero .container {
    position: relative;
    z-index: 1;
}

.projects-eyebrow,
.projects-count,
.project-detail-label {
    display: block;
    margin-bottom: 10px;
    color: #ffbd39;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
}

.projects-hero h1 {
    margin-bottom: 14px;
    color: #ffffff;
    font-size: 55px;
    font-weight: 800;
    line-height: 1.15;
}

.projects-hero p {
    max-width: 680px;
    margin: 0 auto;
    color: rgba(255, 255, 255, 0.78);
    font-size: 18px;
}

.projects-list-section {
    padding: 92px 0 100px;
    background: #090909;
}

.projects-toolbar {
    margin-bottom: 38px;
}

.projects-toolbar h2 {
    margin-bottom: 0;
    font-size: 34px;
    font-weight: 700;
    line-height: 1.25;
}

.project-search-form {
    max-width: 620px;
    margin-left: auto;
}

.project-search-form .input-group {
    flex-wrap: nowrap;
}

.project-search-form .form-control {
    height: 52px !important;
    padding: 0 18px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-right: 0;
    border-radius: 6px 0 0 6px;
    background: #141518 !important;
    color: #ffffff !important;
    font-size: 15px;
}

.project-search-form .form-control::placeholder {
    color: rgba(255, 255, 255, 0.48);
}

.project-search-form .form-control:focus {
    border-color: rgba(255, 189, 57, 0.65);
}

.project-search-form .btn {
    min-width: 120px;
    border-radius: 0 6px 6px 0;
}

.clear-search {
    display: inline-block;
    margin-top: 9px;
    color: rgba(255, 255, 255, 0.62);
    font-size: 13px;
}

.project-card {
    display: flex;
    width: 100%;
    min-height: 100%;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: 8px;
    background: #111312;
    transition:
        transform 0.25s ease,
        border-color 0.25s ease,
        box-shadow 0.25s ease;
}

.project-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 189, 57, 0.46);
    box-shadow: 0 22px 45px rgba(0, 0, 0, 0.3);
}

.project-image {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    background: #1b1d21;
}

.project-image::after {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.08);
    content: "";
    transition: background-color 0.25s ease;
}

.project-card:hover .project-image::after {
    background: rgba(0, 0, 0, 0.24);
}

.project-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.project-card:hover .project-image img {
    transform: scale(1.04);
}

.project-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 24px;
}

.project-technologies {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 14px;
}

.project-technologies .badge {
    margin: 0;
    padding: 7px 9px;
    border-radius: 4px;
    background: rgba(255, 189, 57, 0.14);
    color: #ffcc65;
    font-weight: 600;
}

.project-body h3 {
    margin-bottom: 12px;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.35;
}

.project-body h3 a {
    color: #ffffff;
}

.project-body h3 a:hover {
    color: #ffbd39;
}

.project-body p {
    margin-bottom: 24px;
    color: rgba(255, 255, 255, 0.68);
    line-height: 1.75;
}

.project-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.project-actions .btn {
    margin: 0;
}

.projects-empty {
    padding: 64px 24px;
    border: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: 8px;
    background: #111214;
}

.projects-empty > span {
    display: block;
    margin-bottom: 16px;
    color: #5bd6d0;
    font-size: 38px;
}

.projects-empty h3 {
    margin-bottom: 8px;
    font-size: 25px;
}

.projects-empty p {
    margin-bottom: 0;
}

.projects-pagination {
    display: flex;
    justify-content: center;
    margin-top: 44px;
}

.projects-pagination .pagination {
    flex-wrap: wrap;
    justify-content: center;
    gap: 7px;
    margin-bottom: 0;
}

.projects-pagination .page-link {
    display: flex;
    min-width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
    border: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: 6px;
    background: #111214;
    color: #ffffff;
}

.projects-pagination .page-item.active .page-link,
.projects-pagination .page-link:hover {
    border-color: #ffbd39;
    background: #ffbd39;
    color: #111111;
}

.projects-pagination .page-item.disabled .page-link {
    background: #0d0e10;
    color: rgba(255, 255, 255, 0.3);
}

.project-wrapper {
    min-height: 100vh;
    padding: 124px 0 96px;
    background: #090909;
}

.project-back-link {
    display: inline-flex;
    align-items: center;
    margin-bottom: 24px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 14px;
    font-weight: 600;
}

.project-back-link:hover {
    color: #ffbd39;
}

.sidebar-card {
    position: sticky;
    top: 96px;
    padding: 22px;
    border: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: 8px;
    background: #111312;
}

.sidebar-card h2 {
    margin-bottom: 18px;
    font-size: 20px;
    font-weight: 700;
}

.project-sidebar-list {
    max-height: calc(100vh - 175px);
    overflow-y: auto;
    scrollbar-color: #3b3d42 transparent;
    scrollbar-width: thin;
}

.project-item {
    display: grid;
    grid-template-columns: 68px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    color: #ffffff;
}

.project-item:last-child {
    border-bottom: 0;
}

.project-item:hover {
    background: #1a1c20;
    color: #ffbd39;
}

.project-item img {
    width: 68px;
    height: 54px;
    border-radius: 5px;
    object-fit: cover;
}

.project-item span {
    min-width: 0;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
}

.sidebar-empty {
    margin: 0;
    color: rgba(255, 255, 255, 0.55);
    font-size: 14px;
}

.details-card {
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: 8px;
    background: #111312;
}

.project-featured-image {
    display: block;
    width: 100%;
    max-height: 570px;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

.project-detail-body {
    padding: 38px;
}

.project-title {
    margin: 0 0 22px;
    font-size: 38px;
    font-weight: 800;
    line-height: 1.2;
}

.project-description,
.project-description p,
.project-description li {
    color: rgba(255, 255, 255, 0.72);
    font-size: 16px;
    line-height: 1.85;
}

.project-description h2,
.project-description h3,
.project-description h4 {
    margin-top: 32px;
    margin-bottom: 14px;
    font-weight: 700;
}

.project-description img {
    height: auto;
    margin: 22px 0;
    border-radius: 6px;
}

.project-description a {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.visit-btn {
    margin-top: 32px;
}

@media (max-width: 991.98px) {
    .projects-hero {
        min-height: 420px;
        padding-top: 132px;
    }

    .project-search-form {
        margin-top: 24px;
        margin-left: 0;
    }

    .project-wrapper {
        padding-top: 108px;
    }

    .details-card {
        margin-bottom: 30px;
    }

    .sidebar-card {
        position: static;
    }

    .project-sidebar-list {
        display: grid;
        max-height: none;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px 14px;
    }

    .project-item {
        border: 1px solid rgba(255, 255, 255, 0.07);
        border-radius: 6px;
    }
}

@media (max-width: 767.98px) {
    .projects-hero {
        min-height: 420px;
        padding: 124px 0 64px;
    }

    .projects-hero h1 {
        font-size: 40px;
    }

    .projects-hero p {
        font-size: 16px;
    }

    .projects-list-section {
        padding: 68px 0 78px;
    }

    .projects-toolbar h2 {
        font-size: 29px;
    }

    .project-detail-body {
        padding: 26px;
    }

    .project-title {
        font-size: 31px;
    }
}

@media (max-width: 575.98px) {
    .projects-hero {
        min-height: 390px;
        background-position: center;
    }

    .projects-hero h1 {
        font-size: 35px;
    }

    .projects-hero .container,
    .projects-list-section .container,
    .project-wrapper .container {
        max-width: 100%;
        padding-right: 20px;
        padding-left: 20px;
    }

    .projects-hero p {
        max-width: 100%;
    }

    .project-search-form .input-group {
        flex-direction: column;
    }

    .project-search-form .form-control {
        width: 100%;
        border: 1px solid rgba(255, 255, 255, 0.12);
        border-radius: 6px;
    }

    .project-search-form .input-group-append {
        width: 100%;
        margin-top: 10px;
        margin-left: 0;
    }

    .project-search-form .btn {
        width: 100%;
        border-radius: 6px;
    }

    .project-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .project-actions .btn {
        width: 100%;
    }

    .project-sidebar-list {
        grid-template-columns: 1fr;
    }

    .project-detail-body {
        padding: 22px;
    }

    .project-title {
        font-size: 28px;
    }

    .visit-btn .btn {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .project-card:hover,
    .project-card:hover .project-image img {
        transform: none;
    }
}
