/* Blog Details Page Styles */

/* Author Widget */
.widget_author {
    background: #f9f9f9;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 30px;
    text-align: center;
}

.widget_author .author-avatar {
    display: flex;
    margin-bottom: 15px;
    text-decoration: none;
    transition: transform 0.3s ease;
    align-items: center;
    justify-content: space-around;
}

.widget_author .author-avatar:hover {
    transform: scale(1.05);
}

.widget_author .author-avatar img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 50%;
}

.widget_author .author-details {
    margin-top: 0;
}

.widget_author .author-details h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: #333;
}

.widget_author .author-details h3 a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.widget_author .author-details h3 a:hover {
    color: #1e73be;
}

.widget_author .author-details p {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
}

/* Contact Form Widget */
.widget_contact_form {
    background: #f9f9f9;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 30px;
    /* 只过渡阴影与背景，避免吸顶切换时 left/width 被动画化产生滑动 */
    transition: box-shadow 0.3s ease, background-color 0.3s ease;
}

/* 左侧栏需要 relative 定位，作为 absolute 定位的参考 */
.yblog_left .col-lg-4 {
    position: relative;
}

/* 吸顶状态：由 sidebar-sticky.js 添加，left/width 由脚本按列宽同步 */
.widget_contact_form.is-fixed {
    position: fixed;
    top: 100px;
    z-index: 1000;
    margin-bottom: 0;
    transition: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* 到达侧栏底部：贴着列底随页面滚走，不进入 footer */
.widget_contact_form.is-bottom {
    position: absolute;
    bottom: 0;
    z-index: 1000;
    margin-bottom: 0;
    transition: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.widget_contact_form .form-control {
    margin-bottom: 15px;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 100%;
    font-size: 14px;
}

.widget_contact_form textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

.widget_contact_form button[type="submit"] {
    width: 100%;
    padding: 12px;
    background: #1e73be;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: background 0.3s;
}

.widget_contact_form button[type="submit"]:hover {
    background: #155a8a;
}

.widget_contact_form .form-messege {
    margin-top: 10px;
    text-align: center;
    font-size: 14px;
}

.widget_contact_form .form-messege.success {
    color: #28a745;
}

.widget_contact_form .form-messege.error {
    color: #dc3545;
}

/* Mobile responsive - disable fixed positioning on small screens */
@media (max-width: 991px) {
    .widget_contact_form.is-fixed {
        position: static !important;
        top: auto !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }
}

/* Widget Title */
.widget .widget_title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #333;
    text-transform: uppercase;
}

/* Promo note above contact form title */
.widget_contact_form .promo-note {
    background: #eef5fc;
    border-left: 3px solid #1e73be;
    border-radius: 4px;
    padding: 12px 14px;
    margin-bottom: 18px;
}

.widget_contact_form .promo-note .promo-badge {
    display: inline-block;
    background: #1e73be;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 3px;
    margin-bottom: 8px;
}

.widget_contact_form .promo-note .promo-title {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
    color: #333;
    margin: 0 0 6px;
}

.widget_contact_form .promo-note .promo-sub {
    font-size: 13px;
    line-height: 1.5;
    color: #666;
    margin: 0;
}

@media (max-width: 991px) {
    .widget_contact_form .promo-note {
        margin-bottom: 16px;
    }
}

/* ============ 正文图片：统一固定高度 + 图注居中 ============ */
/* 高度只在这里改一处即可全局生效 */
.inner_blog_content {
    --blog-image-height: 420px;
}

/* 正文内所有图片统一裁切到固定高度，宽度撑满正文列 */
.inner_blog_content img {
    display: block;
    width: 100%;
    height: var(--blog-image-height);
    object-fit: cover;
    object-position: center;
    border-radius: 6px;
    margin: 0 auto 12px;
}

/* 含图片的段落：图注（图片后面的文字）居中 */
.inner_blog_content p:has(img) {
    text-align: center;
}

@media (max-width: 767px) {
    .inner_blog_content {
        --blog-image-height: 240px;
    }
}
