/* ==========================================================================
   Oscar Studio — projects index (Projekti) page styles
   Shared layout (header, footer, buttons, pill, .page-hero, .cta-band) comes
   from the global rssite.css.
   ========================================================================== */

/* Filters
   ------------------------------------------------------------------------ */
.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    padding-bottom: 56px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 56px;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    border: 1.5px solid var(--line);
    color: var(--text-2);
    background: #fff;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    padding: 10px 18px;
    border-radius: var(--radius-pill);
    cursor: pointer;
    transition: border-color .15s, background .15s, color .15s;
}

.filter-chip:hover {
    border-color: var(--navy-800);
}

.filter-chip.active {
    background: var(--navy-900);
    border-color: var(--navy-900);
    color: #fff;
}

/* Case grid
   ------------------------------------------------------------------------ */
.projects-section {
    padding-bottom: 96px;
}

.case-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

.case-card {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform .18s, box-shadow .18s, border-color .18s;
    cursor: pointer;
}

.case-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 32px rgba(11, 42, 74, .08);
    border-color: var(--blue-500);
}

/* Screenshot area — 4:3 browser mockup */
.case-screen {
    aspect-ratio: 4 / 3;
    background: var(--surface);
    position: relative;
    overflow: hidden;
}

.case-screen .browser-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 28px;
    background: #fff;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    padding: 0 12px;
    gap: 6px;
    z-index: 1;
}

.browser-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--line);
}

.browser-dot:nth-child(1) {
    background: #FF6058;
}

.browser-dot:nth-child(2) {
    background: #FFBD2E;
}

.browser-dot:nth-child(3) {
    background: #27C93F;
}

.case-screen .screen-content {
    position: absolute;
    inset: 0;
    top: 28px;
    background: linear-gradient(160deg, var(--navy-800), var(--blue-500));
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, .85);
    font-family: 'Manrope', sans-serif;
    font-weight: 800;
    font-size: 20px;
    text-align: center;
    padding: 0 18px;
}

.case-screen .screen-content.has-image {
    padding: 0;
    display: block;
    overflow: hidden;
}

.case-screen .screen-content.has-image .case-screen-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.case-card:hover .screen-content.has-image .case-screen-image {
    transform: scale(1.03);
    transition: transform .3s ease;
}

.case-card:hover .screen-content:not(.has-image) {
    transform: scale(1.03);
    transition: transform .3s ease;
}

.case-body {
    padding: 22px 22px 26px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
}

.case-tag {
    display: inline-flex;
    width: fit-content;
    background: var(--surface);
    color: var(--text-2);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .03em;
    padding: 6px 12px;
    border-radius: var(--radius-pill);
}

.case-card h3 {
    font-size: 18px;
    font-weight: 700;
}

.case-result {
    font-size: 13.5px;
    color: var(--text-2);
    line-height: 1.6;
    flex: 1;
}

.case-result strong {
    color: var(--navy-900);
    font-weight: 600;
}

.case-cta {
    margin-top: auto;
    padding-top: 6px;
    font-size: 13.5px;
    font-weight: 700;
    color: var(--blue-600);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.case-card:hover .case-cta {
    gap: 10px;
    transition: gap .18s;
}

.empty-state {
    display: none;
    text-align: center;
    padding: 60px 0;
    color: var(--text-2);
    font-size: 15px;
}

.empty-state.visible {
    display: block;
}

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

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

@media (max-width: 560px) {
    .filters {
        gap: 8px;
    }

    .filter-chip {
        font-size: 13px;
        padding: 8px 14px;
    }
}
