/* ==========================================
   案例详情页面 - Case Detail Module
   ========================================== */

:root {
    --casedetail-shell-width: min(1328px, calc(100% - 296px));
}

/* ==========================================
   Hero Section
   ========================================== */
.casedetail-hero {
    position: relative;
    display: flex;
    align-items: flex-end;
    min-height: 480px;
    overflow: hidden;
    background: #081426;
}

.casedetail-hero-bg,
.casedetail-hero-overlay {
    position: absolute;
    inset: 0;
}

.casedetail-hero-bg {
    z-index: 1;
}

.casedetail-hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.casedetail-hero-overlay {
    z-index: 2;
    background: linear-gradient(
        90deg,
        rgba(4, 12, 32, 0.84) 0%,
        rgba(4, 12, 32, 0.58) 42%,
        rgba(4, 12, 32, 0.18) 100%
    );
}

.casedetail-hero-return {
    position: absolute;
    top: 24px;
    left: 48px;
    z-index: 4;
}

.return-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
    line-height: 20px;
    cursor: pointer;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.return-btn:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.34);
}

.return-icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.casedetail-hero-content {
    position: relative;
    z-index: 3;
    width: var(--casedetail-shell-width);
    max-width: none;
    margin: 0 auto;
    padding: 0 0 48px;
}

.case-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.case-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 500;
    line-height: 20px;
}

.case-tag-product {
    background: rgba(0, 146, 216, 0.18);
    color: #ffffff;
}

.case-tag-scene {
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
}

.casedetail-title {
    margin: 0 0 24px;
    color: #ffffff;
    font-size: 36px;
    font-weight: 500;
    line-height: 40px;
    letter-spacing: 0.37px;
    word-break: break-word;
}

.casedetail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.meta-item {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 14px;
    font-weight: 400;
    line-height: 22px;
}

.meta-icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

/* ==========================================
   Content Section
   ========================================== */
.casedetail-content {
    background: #ffffff;
    padding: 72px 0 96px;
}

.content-container {
    width: var(--casedetail-shell-width);
    max-width: none;
    margin: 0 auto;
}

.back-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 40px;
    padding: 8px 14px;
    border: 1px solid rgba(0, 61, 136, 0.14);
    border-radius: 999px;
    background: rgba(0, 61, 136, 0.04);
    color: #003d88;
    font-size: 14px;
    font-weight: 500;
    line-height: 20px;
    cursor: pointer;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.back-button:hover {
    background: rgba(0, 61, 136, 0.08);
    border-color: rgba(0, 61, 136, 0.24);
}

.back-icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.case-overview {
    max-width: 1040px;
}

.overview-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.label-dot {
    width: 48px;
    height: 2px;
    background: #00b01d;
    border-radius: 999px;
    flex-shrink: 0;
}

.label-text {
    color: #00b01d;
    font-size: 14px;
    font-weight: 500;
    line-height: 20px;
    letter-spacing: 0.15px;
    white-space: nowrap;
}

.overview-description {
    margin: 0;
    color: #3a4558;
    font-size: 16px;
    font-weight: 400;
    line-height: 26px;
}

.case-image {
    margin: 60px 0;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 61, 136, 0.12);
}

.case-image img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
}

.case-section {
    max-width: 1040px;
    margin-bottom: 56px;
}

.section-title {
    position: relative;
    margin: 0 0 16px;
    padding-left: 16px;
    color: #101828;
    font-size: 24px;
    font-weight: 500;
    line-height: 32px;
}

.title-indicator {
    position: absolute;
    top: 50%;
    left: 0;
    width: 4px;
    height: 18px;
    border-radius: 999px;
    transform: translateY(-50%);
}

.case-section-background .title-indicator,
.case-section-result .title-indicator {
    background: #003d88;
}

.case-section-solution .title-indicator {
    background: #00b01d;
}

.section-text {
    margin: 0;
    color: #475467;
    font-size: 16px;
    font-weight: 400;
    line-height: 26px;
}

.section-richtext {
    color: #475467;
    font-size: 16px;
    line-height: 1.9;
}

.section-richtext > :first-child {
    margin-top: 0;
}

.section-richtext > :last-child {
    margin-bottom: 0;
}

.section-richtext p,
.section-richtext ul,
.section-richtext ol,
.section-richtext blockquote,
.section-richtext h3,
.section-richtext h4 {
    margin: 0 0 18px;
}

.section-richtext ul,
.section-richtext ol {
    padding-left: 20px;
}

.section-richtext img {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: 16px;
    margin: 24px 0;
}

.case-navigation {
    display: flex;
    justify-content: flex-end;
    margin-top: 64px;
    padding-top: 36px;
    border-top: 1px solid #edf2f7;
}

.next-case-link {
    display: flex;
    align-items: center;
    gap: 16px;
    width: min(100%, 460px);
    padding: 20px 22px;
    border: 1px solid #edf2f7;
    border-radius: 16px;
    background: #f9fbfe;
    text-decoration: none;
    transition: border-color 0.3s ease, background-color 0.3s ease, transform 0.3s ease;
}

.next-case-link:hover {
    background: #ffffff;
    border-color: #00b01d;
    transform: translateY(-2px);
}

.next-case-content {
    flex: 1;
    text-align: right;
}

.next-label {
    margin: 0;
    color: #98a2b3;
    font-size: 14px;
    font-weight: 500;
    line-height: 20px;
}

.next-title {
    margin: 6px 0 0;
    color: #101828;
    font-size: 24px;
    font-weight: 500;
    line-height: 32px;
}

.next-icon {
    width: 18px;
    height: 18px;
    color: #101828;
    flex-shrink: 0;
}

.next-case-link:hover .next-icon {
    color: #00b01d;
}

/* ==========================================
   Footer 覆盖
   ========================================== */
.footer-section-company {
    display: flex !important;
    flex-direction: column;
    gap: 1rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
    color: #ffffff;
    font-size: 18px;
    font-weight: 600;
}

.footer-logo-text {
    background: linear-gradient(135deg, #00b01d 0%, #00d632 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
}

.footer-section-contact .footer-contact {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

.contact-item-link {
    color: #99a1af;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.contact-item-link:hover {
    color: #0092d8;
}

/* ==========================================
   Responsive
   ========================================== */
@media (max-width: 968px) {
    :root {
        --casedetail-shell-width: min(1328px, calc(100% - 56px));
    }

    .casedetail-hero {
        min-height: 400px;
    }

    .casedetail-hero-return {
        top: 20px;
        left: 28px;
    }

    .casedetail-hero-content {
        padding-bottom: 40px;
    }

    .casedetail-title {
        margin-bottom: 20px;
        font-size: 30px;
        line-height: 36px;
        letter-spacing: 0.2px;
    }

    .casedetail-meta {
        gap: 16px;
    }

    .casedetail-content {
        padding: 56px 0 80px;
    }

    .back-button {
        margin-bottom: 32px;
    }

    .overview-description,
    .section-text {
        font-size: 15px;
        line-height: 25px;
    }

    .case-image {
        margin: 48px 0;
        border-radius: 18px;
    }

    .case-section {
        margin-bottom: 48px;
    }

    .section-title,
    .next-title {
        font-size: 24px;
        line-height: 32px;
    }

    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
}

@media (max-width: 750px) {
    :root {
        --casedetail-shell-width: min(1328px, calc(100% - 32px));
    }

    .casedetail-hero {
        min-height: 320px;
    }

    .casedetail-hero-return {
        top: 16px;
        left: 16px;
    }

    .return-btn {
        padding: 7px 12px;
        font-size: 13px;
        line-height: 21px;
    }

    .casedetail-hero-content {
        padding-bottom: 28px;
    }

    .case-tags {
        gap: 6px;
        margin-bottom: 14px;
    }

    .case-tag {
        min-height: 28px;
        padding: 4px 10px;
        font-size: 12px;
        line-height: 18px;
    }

    .casedetail-title {
        margin-bottom: 16px;
        font-size: 24px;
        line-height: 32px;
        letter-spacing: 0;
    }

    .casedetail-meta {
        gap: 12px;
    }

    .meta-item {
        font-size: 12px;
        line-height: 18px;
    }

    .casedetail-content {
        padding: 40px 0 64px;
    }

    .back-button {
        margin-bottom: 24px;
        padding: 7px 12px;
        font-size: 13px;
        line-height: 21px;
    }

    .case-overview {
        max-width: none;
    }

    .overview-label {
        gap: 8px;
        margin-bottom: 12px;
    }

    .label-dot {
        width: 32px;
    }

    .label-text {
        font-size: 12px;
        line-height: 18px;
        white-space: normal;
    }

    .overview-description,
    .section-text {
        font-size: 14px;
        line-height: 22px;
    }

    .case-image {
        margin: 36px 0;
        border-radius: 14px;
    }

    .case-section {
        max-width: none;
        margin-bottom: 36px;
    }

    .section-title {
        margin-bottom: 12px;
        padding-left: 12px;
        font-size: 24px;
        line-height: 32px;
    }

    .title-indicator {
        width: 3px;
        height: 14px;
    }

    .case-navigation {
        margin-top: 40px;
        padding-top: 24px;
    }

    .next-case-link {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        width: 100%;
        padding: 16px;
    }

    .next-case-content {
        text-align: left;
    }

    .next-label {
        font-size: 12px;
        line-height: 18px;
    }

    .next-title {
        font-size: 24px;
        line-height: 32px;
    }

    .next-icon {
        order: -1;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .footer-section-company {
        border-bottom: 1px solid #364153;
        padding-bottom: 1rem;
    }
}

@media (min-width: 1025px) {
    .casedetail-hero {
        min-height: 0;
        height: auto;
        aspect-ratio: 1920 / 675;
        box-sizing: border-box;
    }

    .casedetail-hero-content {
        min-height: 100%;
        height: 100%;
        box-sizing: border-box;
    }
}
