/* ==========================================================================
   Portfolio & Cases Section (Main Page & Category Grid)
   ========================================================================== */

.cases-hero-section {
    position: relative;
    padding-bottom: 80px;
    min-height: 100vh;
    z-index: 10;
}

.cases-container {
    position: relative;
    z-index: 2;
}

.cases-header-row {
    margin-bottom: 40px;
}

.cases-header-col {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.title-main.cases-title {
    font-size: clamp(32px, 4vw, 48px);
    font-weight: 900;
    color: #ffffff;
    margin: 16px 0;
    font-family: 'Benzin', sans-serif;
    line-height: 1.2;
}

.text-yellow {
    color: var(--z-yellow);
}

.cases-desc {
    font-size: 18px;
    color: rgba(253, 251, 237, 0.7);
    margin: 16px 0 0 0;
    line-height: 1.6;
}

/* --- Category Filters --- */
.cases-filters-row {
    margin-bottom: 40px;
}

.quick-filters-wrapper {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.filter-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid rgba(253, 251, 237, 0.2);
    color: rgba(253, 251, 237, 0.8);
    padding: 10px 20px;
    border-radius: 100px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
}

.filter-pill:hover,
.filter-pill.active {
    background: var(--z-yellow);
    color: var(--z-green-dark);
    border-color: var(--z-yellow);
    box-shadow: 0 0 15px rgba(255, 230, 0, 0.2);
}

/* --- Cards Grid --- */
.cases-grid-row {
    row-gap: 28px;
}

.case-card-wrapper {
    display: flex;
    flex-direction: column;
}

.case-card {
    display: flex;
    flex-direction: column;
    width: 100%;
    border-radius: 24px;
    overflow: hidden;
    text-decoration: none;
    height: 100%;
    transition: transform 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease, background 0.4s ease;
}

.case-card:hover {
    transform: translateY(-8px);
    border-color: rgba(255, 230, 0, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35), 0 0 20px rgba(255, 230, 0, 0.1);
    background: rgba(20, 36, 23, 0.85);
}

.case-visual {
    position: relative;
    width: 100%;
    height: 240px;
    overflow: hidden;
    border-bottom: 1px solid rgba(253, 251, 237, 0.08);
}

.case-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.case-card:hover .case-img {
    transform: scale(1.06);
}

.case-tag {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 3;
    padding: 6px 14px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    backdrop-filter: blur(8px);
}

.tag-hit {
    background: var(--z-yellow);
    color: var(--z-green-dark);
    border: 1px solid var(--z-yellow);
}

.tag-outline {
    background: rgba(20, 36, 23, 0.8);
    border: 1px solid rgba(255, 230, 0, 0.3);
    color: var(--z-yellow);
}

.case-body {
    padding: 28px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.case-location {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: rgba(253, 251, 237, 0.6);
    margin-bottom: 12px;
}

.case-location svg {
    color: var(--z-yellow);
    flex-shrink: 0;
}

.case-title {
    font-size: 19px;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.4;
    margin: 0 0 20px 0;
    font-family: 'Benzin', sans-serif;
    letter-spacing: -0.01em;
}

.case-metrics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 24px;
}

.metric-box {
    padding: 14px 16px;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
}

.metric-highlight {
    background: rgba(255, 230, 0, 0.08);
    border: 1px solid rgba(255, 230, 0, 0.2);
}

.metric-dark {
    background: rgba(253, 251, 237, 0.04);
    border: 1px solid rgba(253, 251, 237, 0.08);
}

.metric-val {
    font-size: 20px;
    font-weight: 900;
    font-family: 'Benzin', sans-serif;
    color: #ffffff;
    line-height: 1.1;
    margin-bottom: 4px;
    white-space: nowrap;
}

.metric-highlight .metric-val {
    color: var(--z-yellow);
}

.metric-lbl {
    font-size: 11px;
    color: rgba(253, 251, 237, 0.6);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.case-economics {
    display: flex;
    flex-direction: column;
    margin-bottom: 24px;
    flex-grow: 1;
}

.eco-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 12px;
    margin-bottom: 12px;
    border-bottom: 1px dashed rgba(253, 251, 237, 0.1);
}

.eco-item-last {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}

.eco-label-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.eco-label-group svg {
    stroke: rgba(253, 251, 237, 0.5);
    flex-shrink: 0;
}

.eco-lbl {
    font-size: 13px;
    color: rgba(253, 251, 237, 0.6);
}

.eco-val {
    font-size: 14px;
    font-weight: 700;
    color: #ffffff;
    white-space: nowrap;
}

.case-action-btn {
    margin-top: auto;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border: 1px solid rgba(255, 230, 0, 0.3);
    border-radius: 100px;
    color: var(--z-yellow);
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    transition: all 0.3s ease;
}

.case-card:hover .case-action-btn {
    background: var(--z-yellow);
    color: var(--z-green-dark);
    border-color: var(--z-yellow);
}

/* ==========================================================================
   Case Detail Page (Hero & Layout)
   ========================================================================== */

.case-hero-detail {
    min-height: 60vh;
    padding-top: 160px;
    padding-bottom: 60px;
    display: flex;
    align-items: flex-end;
    position: relative;
}

.case-hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.case-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(29, 60, 37, 0.6) 0%, rgba(18, 36, 22, 0.95) 80%, var(--z-green-dark) 100%);
}

.case-hero-container {
    position: relative;
    z-index: 2;
    width: 100%;
}

.case-meta-group {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.case-hero-location {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
}

.case-hero-title {
    margin: 0 0 20px 0;
    font-size: clamp(30px, 4vw, 46px);
    font-weight: 900;
    color: #ffffff;
    font-family: 'Benzin', sans-serif;
    line-height: 1.25;
}

.case-hero-desc {
    font-size: 18px;
    color: rgba(253, 251, 237, 0.8);
    line-height: 1.6;
    margin: 0;
    max-width: 800px;
}

.case-detail-section {
    position: relative;
    padding-bottom: 80px;
    margin-top: -30px;
    z-index: 5;
}

.case-layout-row {
    row-gap: 40px;
}

/* ==========================================================================
   Telemetry Block & Content Components
   ========================================================================== */

.telemetry-card {
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid rgba(255, 230, 0, 0.2);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
    background: rgba(20, 36, 23, 0.7);
    backdrop-filter: blur(12px);
}

.telemetry-header {
    padding: 16px 24px;
    border-bottom: 1px solid rgba(253, 251, 237, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.telemetry-period {
    color: var(--z-yellow);
    font-weight: 800;
    font-family: 'Benzin', sans-serif;
    font-size: 14px;
}

.telemetry-wrapper {
    background: rgba(0, 0, 0, 0.2);
    display: block;
}

.telemetry-screenshot-img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.telemetry-wrapper:hover .telemetry-screenshot-img {
    transform: scale(1.01);
    filter: brightness(1.05);
}

.telemetry-footer {
    padding: 16px 24px;
    background: rgba(12, 24, 15, 0.6);
    border-top: 1px solid rgba(253, 251, 237, 0.05);
}

.telemetry-note-text {
    font-size: 13px;
    color: rgba(253, 251, 237, 0.7);
    line-height: 1.5;
    margin: 0;
}

/* --- Rich Text & Feature List --- */
.case-rich-text h2 {
    font-size: 24px;
    font-weight: 800;
    color: #ffffff;
    margin: 32px 0 16px 0;
    font-family: 'Benzin', sans-serif;
}

.case-rich-text p {
    font-size: 16px;
    color: rgba(253, 251, 237, 0.8);
    line-height: 1.7;
    margin-bottom: 20px;
}

.feature-list {
    list-style: none;
    padding: 0;
    margin: 0 0 32px 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.feature-item {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.feature-icon {
    color: var(--z-yellow);
    flex-shrink: 0;
    margin-top: 3px;
}

.feature-text {
    font-size: 15px;
    color: rgba(253, 251, 237, 0.8);
    line-height: 1.6;
}

.feature-text strong {
    color: #ffffff;
}

/* --- Manager Card (Cross-linking) --- */
.case-manager-card {
    padding: 24px;
    border-radius: 24px;
    margin-top: 32px;
    border: 1px solid rgba(255, 230, 0, 0.15);
    background: rgba(20, 36, 23, 0.7);
}

.manager-card-header {
    display: flex;
    align-items: center;
    gap: 16px;
}

.manager-avatar-wrapper {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--z-yellow);
    flex-shrink: 0;
}

.manager-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
}

.manager-info {
    display: flex;
    flex-direction: column;
}

.manager-badge {
    color: var(--z-yellow);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.manager-name {
    font-size: 18px;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 2px 0;
    font-family: 'Benzin', sans-serif;
}

.manager-role {
    font-size: 13px;
    color: rgba(253, 251, 237, 0.6);
    margin: 0;
}

.manager-card-divider {
    margin: 16px 0;
    border: 0;
    border-top: 1px solid rgba(253, 251, 237, 0.08);
}

.manager-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.manager-hint {
    font-size: 13px;
    color: rgba(253, 251, 237, 0.7);
}

/* ==========================================================================
   Finance Unit-Economics Sidebar
   ========================================================================== */

.finance-card {
    padding: 36px 32px;
    border-radius: 24px;
    border: 1px solid rgba(255, 230, 0, 0.2);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), inset 0 0 0 1px rgba(255, 255, 255, 0.05);
    background: rgba(20, 36, 23, 0.85);
    backdrop-filter: blur(16px);
}

.sticky-card {
    position: sticky;
    top: 100px;
}

.finance-card-title {
    font-size: 24px;
    font-weight: 800;
    color: #ffffff;
    font-family: 'Benzin', sans-serif;
    text-align: center;
    margin: 0 0 24px 0;
}

.finance-metrics {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
}

.finance-metrics .metric-box {
    width: 100%;
    padding: 20px 16px;
}

.large-val {
    font-size: 32px;
}

.eco-table {
    display: flex;
    flex-direction: column;
}

.eco-group {
    margin-bottom: 20px;
}

.eco-group-title {
    font-size: 12px;
    font-family: 'Benzin', sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.text-danger {
    color: #ff5252;
}

.payback-box {
    padding: 20px;
    border-radius: 16px;
    background: rgba(253, 251, 237, 0.04);
    border: 1px solid rgba(253, 251, 237, 0.08);
    margin-top: 16px;
}

.payback-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 10px;
}

.payback-lbl {
    font-size: 12px;
    color: rgba(253, 251, 237, 0.6);
    text-transform: uppercase;
    font-weight: 700;
}

.payback-val {
    font-size: 20px;
    font-family: 'Benzin', sans-serif;
    color: var(--z-yellow);
}

.payback-progress-wrapper {
    height: 6px;
    background: rgba(253, 251, 237, 0.1);
    border-radius: 100px;
    overflow: hidden;
}

.payback-progress-bar {
    height: 100%;
    width: 100%;
    background: var(--z-yellow);
    box-shadow: 0 0 10px rgba(255, 230, 0, 0.5);
}

.payback-footer {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    font-size: 13px;
    color: rgba(253, 251, 237, 0.6);
}

.finance-action-btn {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 24px;
}

/* ==========================================================================
   FAQ Section
   ========================================================================== */

.case-faq-section {
    padding: 60px 0;
    position: relative;
}

.faq-title-row {
    margin-bottom: 28px;
}

.faq-content-row {
    row-gap: 32px;
}

.faq-accordion-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.faq-item {
    border-radius: 20px;
    transition: border-color 0.4s ease, box-shadow 0.4s ease, background 0.4s ease;
    border: 1px solid rgba(253, 251, 237, 0.08);
    background: rgba(20, 36, 23, 0.6);
}

.faq-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 28px;
    cursor: pointer;
    list-style: none;
    color: #ffffff;
    outline: none;
}

.faq-summary::-webkit-details-marker {
    display: none;
}

.faq-question {
    font-family: 'Benzin', sans-serif;
    font-size: clamp(12px, 1.1vw, 16px);
    font-weight: 800;
    text-transform: uppercase;
    line-height: 1.4;
    padding-right: 20px;
    transition: color 0.3s ease;
    letter-spacing: -0.01em;
}

.faq-item:hover .faq-question,
.faq-item[open] .faq-question {
    color: var(--z-yellow);
}

.faq-chevron {
    flex-shrink: 0;
    color: var(--z-yellow);
    transition: transform 0.4s ease, background 0.4s ease, color 0.4s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(255, 230, 0, 0.05);
    border-radius: 50%;
    border: 1px solid rgba(255, 230, 0, 0.1);
}

.faq-item[open] .faq-chevron {
    transform: rotate(45deg);
    background: var(--z-yellow);
    color: var(--z-green-dark);
}

.faq-answer {
    padding: 0 28px 24px 28px;
    color: rgba(253, 251, 237, 0.8);
    font-size: 15px;
    line-height: 1.6;
}

.faq-answer p {
    margin: 0;
}

.faq-cta-card {
    padding: 40px 32px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
    border-radius: 24px;
}

.faq-cta-title {
    font-size: 22px;
    font-family: 'Benzin', sans-serif;
    color: #ffffff;
    margin: 0 0 12px 0;
}

.faq-cta-desc {
    font-size: 15px;
    color: rgba(253, 251, 237, 0.7);
    margin: 0 0 24px 0;
    line-height: 1.5;
}

/* ==========================================================================
   Comprehensive Mobile & Tablet Media Queries (Max Responsiveness)
   ========================================================================== */

@media (max-width: 1199.98px) {
    .cases-header-row {
        margin-bottom: 32px;
    }

    .title-main.cases-title,
    .case-hero-title {
        font-size: clamp(28px, 3.5vw, 40px);
    }

    .finance-card {
        padding: 28px 20px;
    }

    .large-val {
        font-size: 26px;
    }
}

@media (max-width: 991.98px) {
    .cases-hero-section {
        padding-bottom: 60px;
        min-height: auto;
    }

    .cases-desc,
    .case-hero-desc {
        font-size: 16px;
    }

    .sticky-card {
        position: static;
        margin-top: 20px;
    }

    .case-detail-section {
        margin-top: 0;
        padding-bottom: 60px;
    }

    .case-layout-row {
        row-gap: 32px;
    }

    .faq-content-row {
        row-gap: 24px;
    }
}

@media (max-width: 768px) {
    .cases-hero-section {
        padding: 0 0 40px 0;
    }

    .cases-header-row {
        margin-bottom: 24px;
    }

    .quick-filters-wrapper {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 12px;
        margin-right: -12px;
        margin-left: -12px;
        padding-right: 12px;
        padding-left: 12px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .quick-filters-wrapper::-webkit-scrollbar {
        display: none;
    }

    .filter-pill {
        white-space: nowrap;
        padding: 8px 16px;
        font-size: 13px;
        flex-shrink: 0;
    }

    .case-visual {
        height: 200px;
    }

    .case-body {
        padding: 20px;
    }

    .case-title {
        font-size: 17px;
        margin-bottom: 16px;
    }

    .case-metrics {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .metric-box {
        padding: 12px;
    }

    .metric-val {
        font-size: 17px;
    }

    .metric-lbl {
        font-size: 10px;
    }

    .case-hero-detail {
        padding-top: 90px;
        padding-bottom: 32px;
        min-height: auto;
    }

    .case-meta-group {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .telemetry-card {
        border-radius: 16px;
    }

    .telemetry-header {
        padding: 12px 16px;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .telemetry-footer {
        padding: 12px 16px;
    }

    .case-manager-card {
        padding: 20px;
        border-radius: 18px;
    }

    .manager-card-header {
        flex-direction: row;
        align-items: center;
        gap: 12px;
    }

    .manager-card-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .manager-card-footer .btn-outline-small {
        width: 100%;
        text-align: center;
        justify-content: center;
    }

    .faq-summary {
        padding: 16px 20px;
    }

    .faq-answer {
        padding: 0 20px 20px 20px;
        font-size: 14px;
    }

    .faq-cta-card {
        padding: 28px 20px;
    }
}

@media (max-width: 576px) {
    .title-main.cases-title,
    .case-hero-title {
        font-size: 16px;
        text-align: start;
    }

    .eco-item {
        align-items: flex-start;
        gap: 4px;
        padding-bottom: 10px;
        margin-bottom: 10px;
    }

    .finance-card .eco-item {
        flex-direction: column;
    }

    .eco-val {
        align-self: flex-end;
    }

    .payback-header,
    .payback-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .payback-val,
    .payback-footer span:last-child {
        align-self: flex-end;
    }

    .feature-item {
        gap: 12px;
    }

    .feature-text {
        font-size: 14px;
    }

    .finance-card {
        padding: 20px 16px;
        border-radius: 18px;
    }

    .case-action-btn,
    .finance-action-btn {
        padding: 12px 16px;
    }
}

/* --- SEO & Rich Text Content Formatting --- */
.case-rich-text .case-description {
    font-size: 16px;
    color: rgba(253, 251, 237, 0.85);
    line-height: 1.75;
    margin-bottom: 32px;
}

.case-rich-text h3 {
    font-size: 19px;
    font-weight: 800;
    color: #ffffff;
    margin: 28px 0 14px 0;
    font-family: 'Benzin', sans-serif;
    letter-spacing: -0.01em;
}

.case-rich-text p {
    margin-bottom: 18px;
    color: rgba(253, 251, 237, 0.8);
}

.case-rich-text p strong {
    color: #ffffff;
    font-weight: 700;
}

.case-rich-text ul {
    list-style: none;
    padding-left: 0;
    margin: 0 0 24px 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.case-rich-text ul li {
    position: relative;
    padding-left: 28px;
    font-size: 15px;
    color: rgba(253, 251, 237, 0.85);
    line-height: 1.6;
}

.case-rich-text ul li::before {
    content: "—";
    position: absolute;
    left: 0;
    top: 0;
    color: var(--z-yellow);
    font-weight: 900;
}

.case-rich-text ul li strong {
    color: var(--z-yellow);
}

@media (max-width: 768px) {
    .case-rich-text h2 {
        font-size: 20px;
        margin: 24px 0 12px 0;
    }
    .case-rich-text h3 {
        font-size: 16px;
        margin: 20px 0 10px 0;
    }
    .case-rich-text .case-description,
    .case-rich-text p {
        font-size: 15px;
    }
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
    margin: 32px 0 40px 0;
    border-radius: 16px;
    border: 1px solid rgba(253, 251, 237, 0.1);
    background: rgba(20, 36, 23, 0.5);
    backdrop-filter: blur(8px);
}

.seo-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 15px;
}

.seo-table th {
    background: rgba(253, 251, 237, 0.08);
    color: var(--z-yellow);
    font-weight: 700;
    padding: 16px 20px;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 0.5px;
    border-bottom: 1px solid rgba(253, 251, 237, 0.1);
}

.seo-table td {
    padding: 16px 20px;
    color: rgba(253, 251, 237, 0.85);
    border-bottom: 1px solid rgba(253, 251, 237, 0.05);
}

.seo-table tbody tr:last-child td {
    border-bottom: none;
}

.seo-table tbody tr:hover {
    background: rgba(255, 230, 0, 0.03);
}