/*
 * single-usecase-default.php - Stylesheet
 *
 * @package Shengwang
 * @since 1.0.8
 */

body.single-sw-usecase {
    font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

.sw-usecase-container {
    width: 100%;
    overflow-x: hidden;
}

.single-sw-usecase .rbt-breadcrumb-default {
    display: none;
}

/* Header Banner */
.sw-usecase-banner {
    height: 392px;
    background: radial-gradient(88.74% 111.22% at 50% -6.98%, rgba(0, 0, 0, 0.00) 32.27%, rgba(0, 87, 255, 0.20) 67.28%, #099DFD 100%), #000;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    padding: 20px;
}

.sw-usecase-banner-content {
    max-width: 1200px;
    margin: 0 auto;
}

.sw-usecase-client-name {
    font-size: 24px;
    font-weight: 500;
    margin: 0 auto 32px;
    color: #fff;
    position: relative;
    padding: 16px 32px;
    border-radius: 16px;
    width: fit-content;
}

.sw-usecase-client-name::after {
    content: '';
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    inset: 0;
    padding: 1px; /* the border length */
    background: linear-gradient(20deg, rgba(255,255,255,1) 0%, rgba(255,255,255,0.5) 25%, rgba(255,255,255,0.3) 50%, rgba(255,255,255,0.28) 70%, rgba(255,255,255,1) 100%);
    border-radius: inherit;
    --m:conic-gradient(#000 0 0);
    mask: var(--m) content-box exclude,var(--m);
    pointer-events: none;
}

.sw-usecase-title {
    font-size: 48px;
    font-weight: 600;
    line-height: 1.2;
    color: #fff;
    max-width: 1200px;
    margin: 0 auto;
}

.sw-usecase-subtitle {
    font-size: 18px;
    font-weight: 400;
    margin-top: 16px;
    opacity: 0.8;
    color: #fff;
}

/* Main Content Layout */
.sw-usecase-main-content {
    display: flex;
    width: 1200px;
    margin: 80px auto;
    padding: 0;
    gap: 96px;
}

/* Sidebar */
.sw-usecase-sidebar {
    width: 320px;
    flex-shrink: 0;
}

.sw-usecase-sidebar .sw_button {
    width: 230px;
    font-size: 16px;
    font-weight: 500;
}

.sw-usecase-sidebar .sw_button_text {
    color: var(--sw-color-heading);
}

.sw-usecase-sidebar .sw_button:hover .sw_button_text {
    color: #fff;
}

.sw-usecase-sidebar .sw_button_arrow {
    margin-left: 8px;
}

.sidebar-wrapper {
    border-radius: 24px;
    border: 1px solid #E6E9F2;
}

.sidebar-widgets {
    padding: 24px 32px;;
}

.sidebar-box {
    margin: auto;
    border-bottom: 1px solid #E6E9F2;
    padding-bottom: 24px;
    margin-bottom: 24px;
}

.sidebar-box:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.sidebar-box.sw-sidebar-header {
    padding: 0;
    margin-bottom: 0;
    background: #EBF1F9;
    border-radius: 24px 24px 0 0;
    border: none;
}

.sidebar-title {
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 10px;
    color: var(--sw-color-heading);
}

.sidebar-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.sidebar-box.sw-sidebar-header .sidebar-content {
    padding: 32px;
}
.sidebar-box.sw-sidebar-header .sidebar-title {
    margin-bottom: 0;
}

.sidebar-box .sw-sidebar-logo {
    max-height: 75px;
    margin-bottom: 24px;
}
.sidebar-box .sw-sidebar-logo img {
    max-height: 75px;
    width: auto;
    object-fit: contain;
}

.sidebar-content-excerpt {
    font-size: 14px;
    line-height: 22px;
    font-weight: 400;
    color: #181F27;
}


/* Article Content */
.sw-usecase-article {
    width: 784px;
    font-size: 16px;
    line-height: 26px;
    font-weight: 400;
    color: var(--sw-color-heading);
}

.sw-usecase-article h2 {
    font-size: 36px;
    font-weight: 600;
    line-height: 44px;
    margin-top: 48px;
    margin-bottom: 24px;
    color: var(--sw-color-heading);
}
.sw-usecase-article h2:first-child {
    margin-top: 0;
}

.sw-usecase-article h3,
.sw-usecase-article h4 {
    color: var(--sw-color-heading);
    font-weight: 600;
    margin-top: 2.5em;
    margin-bottom: 1em;
}

.sw-usecase-article p {
    margin-bottom: 16px;
    font-size: 16px;
    line-height: 26px;
    font-weight: 400;
}

/* Gutenberg Editor Styles */
.wp-block-post-content {
    font-size: 16px;
    line-height: 26px;
    font-weight: 400;
}

.wp-block-post-content h2 {
    font-size: 36px;
    font-weight: 600;
    line-height: 44px;
    margin-bottom: 24px;
    color: #1a1a1a;
}

.wp-block-post-content p {
    margin-bottom: 16px;
    font-size: 16px;
    line-height: 26px;
    font-weight: 400;
}


.wp-block-image, .wp-block-video,
.sw-usecase-article img,
.sw-usecase-article video {
    margin: 48px 24px 48px 0 !important;
    max-width: 100%;
    border-radius: 24px;
    height: auto;
}

.sw-usecase-article blockquote,
blockquote.wp-block-quote {
    padding: 48px 258px 48px 48px;
    margin: 48px 24px 48px 0;
    border-radius: 32px;
    background: #EBF1F9;
    border: none;
    font-size: 24px;
    line-height: 32px;
    font-weight: 400;
    color: #181F27;
    position: relative;
}
.sw-usecase-article blockquote p,
blockquote.wp-block-quote p {
    margin-bottom: 24px;
    font-size: 24px;
    line-height: 32px;
    font-weight: 400;
}

.sw-usecase-article blockquote pre,
blockquote.wp-block-quote pre {
    font-style: normal;
    font-size: 14px;
    line-height: 22px;
    font-weight: 400;
    color: #181F27;
    padding: 0;
    background: none;
    font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

.sw-usecase-article blockquote p:first-child,
blockquote.wp-block-quote p:first-child {
    margin-top: 0;
}

.sw-usecase-article blockquote p:last-child,
blockquote.wp-block-quote p:last-child {
    margin-bottom: 0;
}

.sw-usecase-article p:has(img) {
    margin-bottom: 0;
}

/* 处理相邻段落中的图片间距 */
.sw-usecase-article p:has(img) + p:has(img) img,
.wp-block-post-content p:has(img) + p:has(img) img {
    margin-top: 0 !important;
}

/* 处理blockquote和包含图片的段落相邻时的间距 */
.sw-usecase-article blockquote + p:has(img) img,
.wp-block-post-content blockquote + p:has(img) img,
.sw-usecase-article p:has(img) + blockquote,
.wp-block-post-content p:has(img) + blockquote {
    margin-top: 0 !important;
}

/* 处理相邻的blockquote间距 */
.sw-usecase-article blockquote + blockquote,
.wp-block-post-content blockquote + blockquote {
    margin-top: 0 !important;
}

.sw-usecase-article blockquote::before,
blockquote.wp-block-quote::before {
    display: none;
}
.sw-usecase-article blockquote::after,
blockquote.wp-block-quote::after {
    content: '';
    display: block;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    right: 48px;
    background: url(../resources/quote.svg) no-repeat right 48px;
}

/* Responsive */
@media (max-width: 1024px) {
    .sw-usecase-main-content {
        flex-direction: column;
        gap: 40px;
    }

    .sw-usecase-sidebar,
    .sw-usecase-article {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .sw-usecase-banner {
        height: auto;
        min-height: 300px;
    }

    .sw-usecase-title {
        font-size: 36px;
    }

    .sw-usecase-client-name {
        font-size: 20px;
    }
    
    .sw-usecase-article h2 {
        font-size: 28px;
        line-height: 36px;
    }
} 