.listing-header {
    padding-top: calc(var(--header-height) + 3rem);
    padding-bottom: 2rem;
    text-align: center;
}

.listing-header h1 {
    margin-bottom: 0.75rem;
}

.listing-header p {
    margin: 0 auto;
    color: var(--text-secondary);
    max-width: 50ch;
}

.filter-bar {
    padding: 0 var(--gutter);
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: center;
}

.filter-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
    max-width: var(--container-max);
}

@media (max-width: 768px) {
    .filter-tags {
        flex-wrap: nowrap;
        overflow-x: auto;
        justify-content: flex-start;
        padding-bottom: 0.5rem;
        -ms-overflow-style: none;
        scrollbar-width: none;
    }

    .filter-tags::-webkit-scrollbar {
        display: none;
    }
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0 0 4rem 0;
}

@media (max-width: 1024px) {
    .project-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .project-grid {
        grid-template-columns: 1fr;
    }
}

.project-card {
    background: var(--bg-card);
    border-radius: 0;
    overflow: hidden;
    position: relative;
    border: none;
}

.project-card:hover {
    transform: none;
    box-shadow: none;
    border-color: transparent;
}

.card-image-box {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    min-height: 280px;
    overflow: hidden;
    background: #000000;
    text-decoration: none;
    color: inherit;
    opacity: 1 !important;
}

.card-image-box:hover {
    opacity: 1 !important;
}

.card-image-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s var(--ease-smooth);
    position: relative;
    z-index: 0;
}

.project-card:hover .card-image-box img {
    transform: scale(1.05);
}

.card-image-box::after {
    content: '';
    position: absolute;
    inset: 0;
    background: #000000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s var(--ease-smooth);
    z-index: 1;
}

.project-card:hover .card-image-box::after {
    opacity: 0.05;
}

.card-image-placeholder {
    width: 100%;
    height: 100%;
    background: #000000;
}

.card-overlay-gradient {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60%;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.8) 0%,
        rgba(0, 0, 0, 0) 100%
    );
    pointer-events: none;
    z-index: 2;
}

.card-content-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 2rem 1.75rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-end;
    text-align: left;
    z-index: 3;
    pointer-events: none;
    opacity: 1 !important;
}

@media (max-width: 640px) {
    .card-content-overlay {
        padding: 1.5rem 1.25rem 1rem;
    }
}

.card-content-overlay .card-title {
    font-size: clamp(1.4rem, 2.5vw, 2.2rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.2;
    color: #ffffff;
    margin: 0 0 0.5rem 0;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.48), 0 4px 14px rgba(0, 0, 0, 0.42);
    display: block;
    overflow: visible;
    word-break: break-word;
}

.card-content-overlay .card-date {
    font-size: 0.85rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.95);
    margin: 0 0 0.75rem 0;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.48), 0 2px 8px rgba(0, 0, 0, 0.42);
    letter-spacing: 0.03em;
}

.card-content-overlay .card-tags {
    display: flex;
    flex-wrap: nowrap;
    overflow: hidden;
    gap: 0.4rem;
    margin: 0;
    pointer-events: auto;
    max-width: 100%;
    align-items: center;
    white-space: nowrap;
}

.card-content-overlay .card-tags .tag-display,
.card-content-overlay .card-tags .tag-more {
    white-space: nowrap;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.26);
    color: #c4c4c4;
}

.tag-display,
.tag-pill {
    border-radius: 0 !important;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 600;
}

.card-thumbnail {
    width: 100%;
    aspect-ratio: 3 / 2;
    overflow: hidden;
    background: var(--bg-secondary);
}

.card-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s var(--ease-smooth);
}

.project-card:hover .card-thumbnail img {
    transform: scale(1.05);
}

.card-content {
    padding: 1.25rem;
}

.card-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
    color: var(--text-primary);
    display: block;
    overflow: visible;
    word-break: break-word;
}

.card-date {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 1rem;
}

.card-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: gap 0.2s ease;
}

.card-link:hover {
    gap: 0.7rem;
    opacity: 1;
}

.card-link::after {
    content: '→';
    font-size: 1rem;
    transition: transform 0.2s ease;
}

.project-card.hidden {
    display: none;
}

.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 1rem;
    color: var(--text-muted);
    font-size: 1.1rem;
}

.card-admin-drag-handle {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 10;
    width: 32px;
    height: 32px;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    cursor: grab;
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.2s ease, transform 0.2s ease, background 0.2s ease;
    user-select: none;
}

.project-card:hover .card-admin-drag-handle {
    opacity: 1;
    transform: scale(1);
}

.card-admin-drag-handle:hover {
    background: #0071e3;
    border-color: #0071e3;
    color: #ffffff;
}

.card-admin-drag-handle:active {
    cursor: grabbing;
}

.project-card.is-dragging {
    opacity: 0.35 !important;
    outline: 2px dashed #0071e3 !important;
}

.project-card.drag-over {
    transform: scale(1.02);
    outline: 2px solid #0071e3;
}

.site-header .nav-link {
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.site-header .header-logo img,
.site-header .header-logo svg,
.site-header .header-logo-img {
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.25));
}

.site-header .burger-line {
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}

