/* ==========================================================================
   Oscar Studio — project detail (case study) page styles
   Shared layout (header, footer, buttons, pill, .cta-band) comes from the
   global rssite.css.
   ========================================================================== */

/* Narrow text container for headline / breadcrumb / nav
   ------------------------------------------------------------------------ */
.text-wrap {
    max-width: 740px;
    margin: 0 auto;
    padding: 0 32px;
}

/* Breadcrumb
   ------------------------------------------------------------------------ */
.breadcrumb {
    padding: 28px 0 0;
    font-size: 13.5px;
    color: var(--text-3);
}

.breadcrumb a {
    color: var(--text-2);
}

.breadcrumb a:hover {
    color: var(--navy-900);
}

/* Case header
   ------------------------------------------------------------------------ */
.case-header {
    padding: 28px 0 40px;
}

.case-tag {
    display: inline-flex;
    background: var(--surface);
    color: var(--text-2);
    font-size: 12.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .03em;
    padding: 7px 14px;
    border-radius: var(--radius-pill);
    margin-bottom: 18px;
}

.case-header h1 {
    font-size: 38px;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 16px;
}

.case-header p.lead {
    font-size: 17px;
    color: var(--text-2);
}

.case-meta {
    display: flex;
    gap: 40px;
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
    flex-wrap: wrap;
}

.meta-item {
    font-size: 13px;
}

.meta-item .label {
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: .03em;
    font-weight: 700;
    margin-bottom: 6px;
}

.meta-item .value {
    color: var(--text-1);
    font-weight: 600;
    font-size: 14.5px;
}

/* Hero visual — wide browser mockup
   ------------------------------------------------------------------------ */
.hero-visual {
    margin: 40px 0 64px;
}

.browser-window {
    border-radius: 16px;
    border: 1px solid var(--line);
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(11, 42, 74, .12);
}

.browser-chrome {
    background: #F8F9FB;
    border-bottom: 1px solid var(--line);
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

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

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

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

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

.browser-screen {
    height: 460px;
    background: linear-gradient(160deg, var(--navy-800), var(--blue-500));
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, .8);
    font-family: 'Manrope', sans-serif;
    font-weight: 800;
    font-size: 24px;
    text-align: center;
    padding: 0 24px;
}

.browser-screen.has-image {
    padding: 0;
    position: relative;
    display: block;
    overflow: hidden;
}

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

/* Case story — Klijent / Zadatak / Šta smo uradili / Rezultat
   ------------------------------------------------------------------------ */
.story-section {
    padding-bottom: 64px;
}

.story-list {
    border-top: 1px solid var(--line);
}

.story-item {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 32px;
    padding: 32px 0;
    border-bottom: 1px solid var(--line);
}

.story-label {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 15.5px;
    font-weight: 700;
    color: var(--text-1);
}

.story-index {
    flex: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--surface);
    color: var(--text-3);
    font-family: 'Manrope', sans-serif;
    font-size: 12px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.story-item p {
    font-size: 15.5px;
    line-height: 1.7;
    color: var(--text-2);
}

.scope-list {
    list-style: none;
    margin: 20px 0 0;
    padding: 0;
    display: grid;
    gap: 12px;
}

.scope-list li {
    position: relative;
    padding-left: 28px;
    font-size: 14.5px;
    line-height: 1.5;
    color: var(--text-1);
}

.scope-list li::before {
    content: "\2713";
    position: absolute;
    left: 0;
    top: 1px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--blue-500);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.story-item.result {
    border-bottom: none;
    border-radius: var(--radius-lg);
    background: var(--navy-900);
    color: #fff;
    padding: 32px;
    margin-top: 8px;
}

.story-item.result .story-label {
    color: #fff;
}

.story-item.result .story-index {
    background: rgba(255, 255, 255, .12);
    color: #A9BFDA;
}

.story-item.result p {
    color: #D7E3F2;
}

/* Screenshots gallery
   ------------------------------------------------------------------------ */
.gallery-section {
    margin-bottom: 64px;
}

.gallery-section h2 {
    font-size: 22px;
    margin-bottom: 24px;
}

.gallery-main {
    margin-bottom: 16px;
}

.gallery-main .browser-screen {
    height: 380px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--line);
    overflow: hidden;
}

.gallery-thumbs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.thumb {
    border-radius: 12px;
    border: 1px solid var(--line);
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 4 / 3;
    background: var(--surface);
    padding: 0;
    transition: border-color .15s, transform .15s;
}

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

.thumb:hover {
    border-color: var(--blue-500);
    transform: translateY(-2px);
}

.thumb.active {
    border-color: var(--blue-500);
    border-width: 2px;
}

/* Results
   ------------------------------------------------------------------------ */
.results-section {
    padding-bottom: 64px;
}

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

.result-card {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 28px 24px;
    text-align: center;
}

.result-card b {
    display: block;
    font-family: 'Manrope', sans-serif;
    font-size: 30px;
    font-weight: 800;
    color: var(--navy-900);
    margin-bottom: 8px;
}

.result-card span {
    font-size: 13.5px;
    color: var(--text-2);
}

/* Case navigation
   ------------------------------------------------------------------------ */
.case-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 32px 0;
    border-top: 1px solid var(--line);
    margin-bottom: 72px;
}

.case-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14.5px;
    font-weight: 600;
    color: var(--text-2);
}

.case-nav-link:hover {
    color: var(--navy-900);
}

.case-nav-link.next {
    flex-direction: row-reverse;
    text-align: right;
}

/* CTA spacing
   ------------------------------------------------------------------------ */
.template-projectpage .cta-band {
    margin-bottom: 96px;
}

/* Responsive
   ------------------------------------------------------------------------ */
@media (max-width: 900px) {
    .case-header h1 {
        font-size: 28px;
    }

    .browser-screen {
        height: 300px;
    }

    .gallery-main .browser-screen {
        height: 260px;
    }

    .gallery-thumbs {
        grid-template-columns: repeat(2, 1fr);
    }

    .story-item {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .story-item.result {
        padding: 24px;
    }

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

    .case-meta {
        gap: 24px;
    }

    .case-nav {
        flex-direction: column;
        gap: 20px;
        align-items: flex-start;
    }

    .case-nav-link.next {
        flex-direction: row;
        text-align: left;
    }
}

@media (max-width: 560px) {
    .text-wrap {
        padding: 0 18px;
    }

    .gallery-thumbs {
        grid-template-columns: 1fr;
    }
}
