/*
 * "Our Projects" — base styles for archive-em_project.php and
 * single-em_project.php (task 08). Scoped to .em-project(s)-* classes only —
 * no global typography/color overrides (task 03 not applied yet).
 */

.em-projects-archive-title,
.em-project-single-title {
    margin-bottom: 1em;
}

.em-projects-archive-description {
    margin-bottom: 1.5em;
}

/* Filter nav */

.em-project-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5em;
    margin-bottom: 2em;
}

.em-project-filter {
    display: inline-block;
    padding: 0.4em 1em;
    border: 1px solid #d0d0d0;
    border-radius: 999px;
    text-decoration: none;
    color: inherit;
}

.em-project-filter.is-active,
.em-project-filter:hover {
    background: #2c2c2c;
    border-color: #2c2c2c;
    color: #fff;
}

/* Archive grid */

.em-project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.5em;
    margin-bottom: 2em;
}

.em-project-card {
    display: flex;
    flex-direction: column;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
}

.em-project-card-thumb {
    aspect-ratio: 4 / 3;
    background: #f2f2f2;
    overflow: hidden;
}

.em-project-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.em-project-card-body {
    padding: 1em;
}

.em-project-card-title {
    margin: 0 0 0.4em;
}

.em-project-card-location,
.em-project-card-year {
    margin: 0.2em 0;
    color: #666;
}

.em-projects-empty {
    color: #666;
}

/* Single project */

.em-project-single-thumb {
    margin-bottom: 1.5em;
}

.em-project-single-thumb img {
    width: 100%;
    height: auto;
    display: block;
}

.em-project-single-types {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5em;
    margin-bottom: 1.5em;
}

.em-project-single-type {
    display: inline-block;
    padding: 0.3em 0.9em;
    border-radius: 999px;
    background: #f2f2f2;
    text-decoration: none;
    color: inherit;
    font-size: 0.9em;
}

.em-project-meta {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 0.5em 1.5em;
    margin: 0 0 1.5em;
}

.em-project-meta dt {
    font-weight: 600;
    color: #666;
}

.em-project-meta dd {
    margin: 0;
}

.em-project-single-content {
    margin-bottom: 1.5em;
}

.em-project-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1em;
}

.em-project-gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
}

/* Metabox (WP Admin) gallery picker preview */

.em-project-gallery-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5em;
    margin-bottom: 0.5em;
}

.em-project-gallery-thumb {
    position: relative;
    display: inline-block;
}

.em-project-gallery-thumb img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    display: block;
    border-radius: 4px;
}

.em-project-gallery-remove {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 20px;
    height: 20px;
    line-height: 18px;
    padding: 0;
    border-radius: 50%;
    border: none;
    background: #2c2c2c;
    color: #fff;
    cursor: pointer;
}
