/* ==========================================================
   Cases Page — Fixed template (2026-11-27 design spec)
   Hero + 6 category chips + 3x3 case grid + pagination
   Dark tech style, scoped under .cases-page
   ========================================================== */

.cases-page {
    background: #070b16;
    color: #ffffff;
    overflow-x: hidden;
    font-family: "Inter", "Segoe UI", Arial, sans-serif;
}

.cases-page h1,
.cases-page h2,
.cases-page h3,
.cases-page h4,
.cases-page h5,
.cases-page h6 {
    color: #ffffff;
    line-height: 1.25;
    letter-spacing: -0.02em;
    margin: 0 0 0.6em;
    font-weight: 700;
}

.cases-container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ============ 1. Hero ============ */
.cases-hero {
    position: relative;
    min-height: 52vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-size: cover;
    background-position: center;
    overflow: hidden;
    padding-top: 60px;
}

.cases-hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(7, 11, 22, 0.42) 0%, rgba(7, 11, 22, 0.72) 100%),
        radial-gradient(circle at 50% 45%, rgba(0, 102, 255, 0.22), transparent 62%);
}

.cases-hero-content {
    position: relative;
    z-index: 2;
    padding: 140px 24px 120px;
}

.cases-crumb {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.68);
    margin-bottom: 14px;
    letter-spacing: 0.02em;
}

.cases-crumb a {
    color: #3ea6ff;
    text-decoration: none;
}

.cases-crumb a:hover {
    text-decoration: underline;
}

.cases-hero-title {
    font-size: clamp(2.8rem, 6vw, 4.5rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin: 0 0 18px;
    text-transform: uppercase;
}

.cases-hero-desc {
    font-size: 1.08rem;
    color: rgba(255, 255, 255, 0.8);
    max-width: 640px;
    margin: 0 auto;
    line-height: 1.7;
}

/* ============ 2. Category Filters ============ */
.cases-filters-section {
    padding: 48px 0 10px;
}

.cases-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.cases-filter {
    padding: 9px 22px;
    border-radius: 30px;
    color: #3ea6ff;
    background: rgba(0, 102, 255, 0.08);
    border: 1px solid rgba(0, 102, 255, 0.35);
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.cases-filter:hover {
    background: rgba(0, 102, 255, 0.2);
    border-color: rgba(0, 102, 255, 0.55);
}

.cases-filter.active {
    background: #0a2a5e;
    color: #ffffff;
    border-color: #0a2a5e;
}

/* ============ 3. Case Grid ============ */
.cases-grid-section {
    padding: 40px 0 72px;
}

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

.cases-card {
    position: relative;
    aspect-ratio: 16 / 9;
    border-radius: 14px;
    overflow: hidden;
    background: #0d1220;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cases-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 44px rgba(0, 102, 255, 0.18);
}

.cases-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}

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

.cases-card-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 20%;
    display: flex;
    align-items: center;
    padding: 0 14px;
    background: rgba(5, 10, 22, 0.78);
    backdrop-filter: blur(4px);
    transform: translateY(100%);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.cases-card:hover .cases-card-caption {
    transform: translateY(0);
    opacity: 1;
}

.cases-card-caption span {
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    max-width: 100%;
}

.cases-empty {
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    padding: 60px 0;
}

/* ============ 4. Pagination ============ */
.cases-pagination {
    padding-top: 44px;
    text-align: left;
}

.cases-older-link {
    color: #3ea6ff;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 600;
}

.cases-older-link:hover {
    text-decoration: underline;
}

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

@media (max-width: 600px) {
    .cases-hero {
        min-height: 60vh;
    }

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

    .cases-filters {
        justify-content: flex-start;
    }
}

/* ==========================================================
   Case Detail — Fixed template (2026-11-28 design spec)
   Hero (left text / right 16:9 image) + intro + vertical
   full-width image stack + bottom CTA
   ========================================================== */

a.cases-card {
    display: block;
    color: inherit;
    text-decoration: none;
}

a.cases-card:hover {
    color: inherit;
    text-decoration: none;
}

.case-detail-hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    background: #0a0e1a;
    padding-top: 60px;
}

.case-detail-hero-left {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 64px 6% 64px 7%;
}

.case-detail-title {
    font-size: clamp(1.9rem, 3.4vw, 2.9rem);
    font-weight: 700;
    color: #ffffff;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin: 18px 0 10px;
}

.case-detail-meta {
    margin-top: 8px;
}

.case-detail-meta p {
    margin: 0 0 10px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 1.02rem;
    line-height: 1.6;
}

.case-detail-meta p span {
    display: inline-block;
    min-width: 92px;
    color: #3ea6ff;
    font-weight: 600;
}

.case-detail-hero-right {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 7% 40px 3%;
}

.case-detail-hero-img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}

.case-detail-intro {
    padding: 64px 0 20px;
}

.case-detail-text {
    max-width: 900px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 1.06rem;
    line-height: 1.9;
    margin: 0 0 22px;
}

.case-detail-gallery {
    padding: 28px 0 36px;
}

.case-detail-img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 28px;
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.35);
}

.case-detail-cta {
    text-align: center;
    padding: 84px 24px 100px;
}

.case-detail-cta-title {
    font-size: clamp(1.5rem, 2.6vw, 2.1rem);
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.01em;
    margin: 0 0 28px;
}

@media (max-width: 860px) {
    .case-detail-hero {
        grid-template-columns: 1fr;
        padding-top: 40px;
    }

    .case-detail-hero-left,
    .case-detail-hero-right {
        padding: 32px 24px;
    }
}