:root {
    --black: #000000;
    --blue: #0300f5;
    --white: #ffffff;
    --accent: #89ff47;
    --dash-border: 1px dashed rgba(255,255,255,0.25);
    --max-w: 1400px;
}

* { font-family: 'Inter', sans-serif; }

/* ─── MAIN SECTION ─── */
.projects-section {
    min-height: 100vh;
    background: var(--black);
    color: var(--white);
    padding: 100px 50px;
}

.projects-inner {
    max-width: var(--max-w);
    margin: 0 auto;
}

/* ─── BREADCRUMB ─── */
.breadcrumb-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 50px;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.breadcrumb-row a {
    color: var(--white);
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.breadcrumb-row a:hover { opacity: 0.6; }

.breadcrumb-sep { color: rgba(255,255,255,0.25); }
.breadcrumb-current { color: var(--white); }

/* ─── HEADER ─── */
.projects-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 50px;
    padding-bottom: 30px;
    border-bottom: var(--dash-border);
}

.projects-title {
    font-size: clamp(3rem, 6vw, 5rem);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -2px;
}

.projects-subtitle {
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--white);
    max-width: 350px;
    line-height: 1.8;
    text-align: right;
}

/* ─── FILTERS AREA ─── */
.filters-block {
    margin-bottom: 40px;
}

.filter-group {
    margin-bottom: 15px;
}

.filter-group-header {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.filter-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--white);
    min-width: 80px;
    padding: 14px 0;
    flex-shrink: 0;
}

/* ─── PILL CONTAINER WITH COLLAPSE ─── */
.filter-pills-wrap {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 0;
}

/* visible pills always shown */
.pills-visible {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
}

/* collapsible overflow pills */
.pills-overflow {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height 0.4s cubic-bezier(0.4,0,0.2,1), opacity 0.3s ease;
}

.pills-overflow.expanded {
    max-height: 400px;
    opacity: 1;
}

/* The +More / Less toggle button */
.pills-more-btn {
    padding: 14px 20px;
    border: var(--dash-border);
    border-left: none;
    background: transparent;
    color: var(--white);
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
    outline: none;
}

.pills-more-btn:hover {
    background: rgba(255,255,255,0.07);
}

.pills-more-btn .toggle-arrow {
    font-style: normal;
    display: inline-block;
    transition: transform 0.3s ease;
}

.pills-more-btn.open .toggle-arrow {
    transform: rotate(180deg);
}

/* When overflow is expanded, the extra pills wrap below */
.pills-overflow .filter-pill {
    border-top: none;
}

/* ─── FILTER PILLS ─── */
.filter-pill {
    padding: 14px 24px;
    border: var(--dash-border);
    background: transparent;
    color: var(--white);
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    outline: none;
}

.filter-pill + .filter-pill { border-left: none; }

.filter-pill:hover {
    background: rgba(255,255,255,0.05);
}

.filter-pill.active {
    background: var(--white);
    color: var(--black);
    border-color: var(--white);
}

/* Pills in overflow row need left border removed when continuing a row */
.pills-overflow .filter-pill:first-child {
    border-left: none;
}

/* Active filters display */
.active-filters {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    min-height: 36px;
    margin-bottom: 10px;
}

.active-filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border: 1px solid var(--white);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--white);
    background: transparent;
    cursor: pointer;
    transition: all 0.3s ease;
}

.active-filter-tag:hover {
    background: rgba(255,255,255,0.1);
}

.active-filter-tag .tag-x {
    font-weight: 400;
    font-size: 0.85rem;
    opacity: 0.6;
}

.clear-all-btn {
    padding: 6px 14px;
    border: var(--dash-border);
    background: transparent;
    color: var(--white);
    font-family: 'Inter', sans-serif;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0.6;
}

.clear-all-btn:hover {
    opacity: 1;
    background: rgba(255,255,255,0.05);
}

/* ─── RESULTS COUNTER ─── */
.results-counter {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--white);
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: var(--dash-border);
}

.results-counter span { font-weight: 800; }

/* ─── PROJECT GRID ─── */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
}

.project-card {
    border: var(--dash-border);
    position: relative;
    display: flex;
    flex-direction: column;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 1;
    transform: translateY(0);
}

.project-card:hover {
    background: rgba(255,255,255,0.03);
}

/* Animation States */
.project-card.filtering-out {
    opacity: 0;
    transform: scale(0.9) translateY(20px);
    pointer-events: none;
}

.project-card.filtering-in {
    animation: gridFilterIn 0.45s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

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

@keyframes gridFilterIn {
    0% { opacity: 0; transform: scale(0.9) translateY(20px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}

/* ─── PROJECT IMAGE ─── */
.project-image-wrap {
    position: relative;
    padding: 5px;
    aspect-ratio: 4 / 3;
    overflow: hidden;
}

.project-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s ease;
}

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

.project-number {
    position: absolute;
    top: 5px;
    left: 5px;
    background: var(--black);
    color: var(--white);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 4px 8px;
    z-index: 2;
    letter-spacing: 1px;
    line-height: 1;
}

.admin-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    background: var(--blue);
    color: var(--white);
    font-size: 0.65rem;
    font-weight: 700;
    padding: 4px 8px;
    z-index: 2;
    letter-spacing: 1px;
}

/* ─── PROJECT CONTENT ─── */
.project-content {
    padding: 25px 25px 30px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    border-top: var(--dash-border);
}

.project-category-tag {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--white);
    margin-bottom: 12px;
}

.project-title {
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 10px;
    color: var(--white);
}

.project-description {
    font-size: 0.85rem;
    font-weight: 400;
    line-height: 1.6;
    color: var(--white);
    margin-bottom: 20px;
    flex-grow: 1;
}

.project-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.project-cat-pill {
    padding: 6px 14px;
    border: var(--dash-border);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--white);
}

.project-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: var(--dash-border);
    color: var(--white);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.project-link:hover {
    background: var(--white);
    color: var(--black);
    border-color: var(--white);
}

/* ─── EMPTY / NO RESULTS ─── */
.empty-state,
.no-results {
    text-align: center;
    padding: 80px 30px;
    color: var(--white);
    border: var(--dash-border);
}

.empty-state h3,
.no-results h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.empty-state p,
.no-results p {
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--white);
}

.empty-state i,
.no-results i {
    font-size: 2.5rem;
    margin-bottom: 20px;
    opacity: 0.3;
}

.no-results { display: none; }
.no-results.show {
    display: block;
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ─── RESPONSIVE ─── */
@media (max-width: 1024px) {
    .projects-grid { grid-template-columns: repeat(2, 1fr); }

    .filter-group-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
    }
    .filter-label { padding: 10px 0 5px; min-width: unset; }
}

@media (max-width: 768px) {
    .projects-section { padding: 60px 20px; }

    .projects-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    .projects-subtitle { text-align: left; }

    .projects-grid { grid-template-columns: 1fr; }

    .project-image-wrap { aspect-ratio: 16 / 10; }
}