/* ================================
   Surgical Cases Detail Page
   detail_new.html 专用样式（sc- 前缀）
   ================================ */

/* ---------- Content Section ---------- */
.sc-content-section {
    padding-top: 40px;
}

.sc-content-layout {
    display: flex;
    gap: 80px;
    align-items: flex-start;
}

.sc-content-main {
    flex: 1;
    min-width: 0;
}

.sc-content-sidebar {
    flex: 0 0 25%;
    min-width: 240px;
    position: sticky;
    top: 220px;
    align-self: flex-start;
}

.sc-content-section p {
    font-size: 20px;
    line-height: 28px;
    font-weight: lighter;
}

.sc-content-section img {
    display: inline-block;
}

/* 后台配置的富文本参考图例（示意/版式） */
.sc-ref-figure {
    margin: 0 0 1.25rem 0;
    max-width: 100%;
}

.sc-ref-figure-img {
    display: block;
    width: 100%;
    max-width: 720px;
    height: auto;
    border-radius: 4px;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.sc-ref-figure-caption {
    margin-top: 0.5rem;
    font-size: 0.95rem;
    color: #666;
    line-height: 1.4;
}

.sc-content-section p:last-of-type {
    margin-bottom: 0;
}

@media (max-width: 991px) {
    .sc-content-layout {
        flex-direction: column;
    }
    .sc-content-sidebar {
        flex: none;
        width: 100%;
        min-width: auto;
        position: static;
    }
}

/* ---------- Case Navigation (Prev/Next) ---------- */
.sc-nav-wrapper {
    display: flex;
    justify-content: space-between;
    width: 100%;
    max-width: 904px;
}

.sc-nav-wrapper--next-only {
    justify-content: flex-end;
}

.sc-nav-wrapper--prev-only {
    justify-content: flex-start;
}

.sc-nav-item {
    display: flex;
    align-items: center;
    background-color: #ffffff;
    height: 96px;
    padding: 0;
    transition: opacity 0.3s ease;
    gap:12px;
}

.sc-nav-item:hover {
    background-color: #ffffff;
}

.sc-nav-item:hover .sc-nav-arrow {
    color: var(--accent-purple);
}

.sc-nav-item:hover .sc-nav-title {
    color: var(--accent-purple);
}

.sc-nav-item--prev {
    width: 320px;
}

.sc-nav-item--next {
    width: 320px;
}

.sc-nav-arrow {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: #2A2A2A;
    flex-shrink: 0;
}

.sc-nav-arrow svg {
    width: 32px;
    height: 32px;
    stroke-width: 1;
}

.sc-nav-thumb {
    width: 64px;
    height: 64px;
    flex-shrink: 0;
    overflow: hidden;
    background: #f5f5f5;
}

.sc-nav-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sc-nav-info {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 200px;
}

.sc-nav-label {
    font-family: 'Lato', sans-serif;
    font-size: 14px;
    line-height: 24px;
    color: #2A2A2A;
    opacity: 0.5;
}

.sc-nav-title {
    font-family: 'Lato', sans-serif;
    font-size: 14px;
    line-height: 20px;
    color: #2A2A2A;
    font-weight: normal;
    margin: 0;
}

/* ---------- Section Title & Content ---------- */
.sc-section-title {
    font-size: 40px;
    line-height: 56px;
    font-weight: 700;
    color: #6F0B65;
    margin-bottom: 24px;
}

.sc-section-content {
    /* 内容区基础 */
}
.sc-section-content a {
    text-decoration: underline;
   
}
.sc-section-content a:hover {
    color: var(--accent-purple-dark);
    text-decoration: underline;
}

/* ---------- Related Photos Carousel ---------- */
.sc-photos-carousel {
    position: relative;
    margin-top: 24px;
}

.sc-photos-track {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    overflow-y: hidden;
    position: relative;
    width: 100%;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.sc-photos-track::-webkit-scrollbar {
    display: none;
}

.sc-photo-item {
    flex: 0 0 calc(40% - 10px);
    min-width: calc(40% - 10px);
    width: calc(40% - 10px);
}

.sc-photo-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 400 / 267;
    overflow: hidden;
    cursor: pointer;
    background-color: #000;
    transition: transform 0.3s;
}

.sc-photo-wrapper:hover {
    transform: scale(1.02);
}

.sc-photo-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    transition: opacity 0.4s ease;
    opacity: 0.85;
}

.sc-photo-wrapper:hover .sc-photo-image {
    opacity: 1;
}

.sc-photo-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
    transition: background 0.4s ease;
    pointer-events: none;
}

.sc-photo-wrapper:hover::before {
    background: rgba(0, 0, 0, 0.6);
}

.sc-photo-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 20px 30px;
    font-size: 16px;
    font-weight: 400;
    color: #ffffff;
    line-height: 1.6;
    text-align: center;
    background: transparent;
    margin: 0;
    z-index: 2;
    white-space: normal;
    word-wrap: break-word;
    max-width: calc(100% - 40px);
    width: calc(100% - 40px);
    box-sizing: border-box;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sc-photos-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 128px;
    height: 128px;
    border: none;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
}

.sc-photos-nav svg {
    width: 64px;
    height: 64px;
    display: block;
    transition: stroke 0.3s ease;
}

.sc-photos-nav:hover {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.sc-photos-nav:hover svg {
    stroke: var(--accent-purple);
}

.sc-photos-nav.prev {
    left: -128px;
}

.sc-photos-nav.next {
    right: -128px;
}

@media (max-width: 1200px) {
    .sc-photos-nav {
        width: 80px;
        height: 80px;
    }
    .sc-photos-nav.prev {
        left: -80px;
    }
    .sc-photos-nav.next {
        right: -80px;
    }
}

@media (max-width: 991px) {
    .sc-photos-nav {
        display: none;
    }
    .sc-photos-track {
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
    }
    .sc-photo-item {
        scroll-snap-align: start;
    }
}

@media (max-width: 768px) {
    .sc-photo-label {
        font-size: 14px;
        padding: 16px 24px;
        max-width: calc(100% - 30px);
        width: calc(100% - 30px);
        line-height: 1.5;
    }
}

@media (max-width: 576px) {
    .sc-photo-label {
        font-size: 13px;
        padding: 12px 20px;
        max-width: calc(100% - 24px);
        width: calc(100% - 24px);
        line-height: 1.4;
    }
}

/* ---------- Image Lightbox ---------- */
.sc-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.95);
}

.sc-lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.sc-lightbox-container {
    position: relative;
    width: 90%;
    max-width: 1200px;
    max-height: 90vh;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sc-lightbox-close {
    position: absolute;
    top: -50px;
    right: 0;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    transition: all 0.3s;
    z-index: 3;
}

.sc-lightbox-close:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.8);
}

.sc-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    transition: all 0.3s;
    z-index: 3;
}

.sc-lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.8);
}

.sc-lightbox-prev {
    left: -70px;
}

.sc-lightbox-next {
    right: -70px;
}

.sc-lightbox-content {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.sc-lightbox-image {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
}

.sc-lightbox-caption {
    margin-top: 20px;
    color: white;
    font-size: 16px;
    text-align: center;
    max-width: 80%;
}

@media (max-width: 768px) {
    .sc-lightbox-prev {
        left: 10px;
    }
    .sc-lightbox-next {
        right: 10px;
    }
    .sc-lightbox-close {
        top: 10px;
        right: 10px;
    }
    .sc-lightbox-image {
        max-height: 75vh;
    }
}

/* ---------- Sidebar ---------- */
.sc-sidebar {
    margin-top: 200px;
}

.sc-sidebar-btn {
    display: block;
    width: 100%;
    padding: 16px 24px;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    background-color: var(--primary-green);
    border: none;
    text-decoration: none;
    transition: background-color 0.3s, color 0.3s;
    border-radius: 0 !important;
    margin-bottom: 12px;
}

.sc-sidebar-btn:hover {
    background-color: var(--primary-green) !important;
    color: #CBFFB5 !important;
    transform: none !important;
    box-shadow: none !important;
}

/* ---------- Other Cases Section ---------- */
.sc-other-section {
    padding: 60px 0;
    background-color: #E8E6E6;
}

.sc-other-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.sc-other-header .sc-section-title {
    margin-bottom: 0;
}

.sc-other-carousel {
    position: relative;
}

.sc-other-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 128px;
    height: 128px;
    border: none;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    border-radius: 0;
    box-shadow: none;
}

.sc-other-nav.prev {
    left: -128px;
}

.sc-other-nav.next {
    right: -128px;
}

.sc-other-nav:hover {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.sc-other-nav:hover svg {
    stroke: var(--accent-purple);
}

.sc-other-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 33px;
}

.sc-other-card {
    cursor: pointer;
    transition: box-shadow 0.3s ease;
}

.sc-other-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.sc-other-card:hover .sc-other-card-title a {
    color: var(--accent-purple);
}

.sc-other-card-img {
    overflow: hidden;
    width: 100%;
    height: 200px;
}

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

.sc-other-card-img-placeholder {
    width: 100%;
    min-height: 200px;
    background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
}

.sc-other-card-body {
    padding: 16px;
}

.sc-other-card-type {
    color: var(--accent-purple);
    font-size: 14px;
    font-weight: 600;
    display: block;
    margin-bottom: 8px;
}

.sc-other-card-title {
    font-size: 16px;
    margin-top: 8px;
    font-weight: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.5;
    max-height: 3em;
}

.sc-other-card-title a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

@media (max-width: 1200px) {
    .sc-other-nav {
        width: 80px;
        height: 80px;
    }
    .sc-other-nav.prev {
        left: -80px;
    }
    .sc-other-nav.next {
        right: -80px;
    }
}

@media (max-width: 991px) {
    .sc-other-nav {
        display: none;
    }
    .sc-other-grid {
        display: flex;
        overflow-x: auto;
        gap: 20px;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 8px;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    .sc-other-grid::-webkit-scrollbar {
        display: none;
    }
    .sc-other-card {
        flex: 0 0 clamp(240px, 75vw, 320px);
        scroll-snap-align: start;
    }
}

@media (max-width: 992px) {
    .sc-other-section {
        padding: 40px 0;
    }
}

@media (max-width: 768px) {
    .sc-other-section {
        padding: 32px 0;
    }
}

@media (max-width: 576px) {
    .sc-other-section {
        padding: 24px 0;
    }
}

/* ---------- Related Articles Section ---------- */
.sc-articles-section {
    background-color: #E8E6E6;
    padding: 60px 0;
}

.sc-articles-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 32px;
}

.sc-articles-header .sc-section-title {
    font-size: 40px;
    line-height: 56px;
    font-weight: 700;
    color: #6F0B65;
    margin: 0;
}

.sc-articles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.sc-article-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}

.sc-article-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.sc-article-card-img {
    aspect-ratio: 16/10;
    overflow: hidden;
}

.sc-article-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sc-article-card-body {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.sc-article-tag {
    display: inline-block;
    padding: 4px 10px;
    font-size: 14px;
    line-height: 20px;
    margin-bottom: 10px;
    align-self: flex-start;
    border-radius: 0;
    background: rgba(111, 11, 101, 0.5);
    color: #6F0B65;
}

.sc-article-tag.news {
    background: #00423573;
    color: #004235;
}

.sc-article-title {
    font-size: 20px;
    font-weight: lighter;
    color: #2A2A2A;
    line-height: 28px;
    margin: 0;
    transition: color 0.25s;
    font-family: 'Lato';
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sc-article-title a {
    color: var(--text-primary);
    text-decoration: none;
}

@media (max-width: 991px) {
    .sc-articles-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 992px) {
    .sc-articles-section {
        padding: 40px 0;
    }
}

@media (max-width: 768px) {
    .sc-articles-section {
        padding: 32px 0;
    }
}

@media (max-width: 576px) {
    .sc-articles-section {
        padding: 24px 0;
    }
}
