/* 编辑按钮的基础样式 */
.edit-overlay {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
}

/* 图片容器相关样式 */
.image-container {
    position: relative;
    /* 添加相对定位 */
    width: 300px;
    height: 300px;
}

/* 文本容器相关样式 */
.text-container {
    position: relative;
    /* 添加相对定位 */
    flex: 1;
    padding: 20px;
}

/* 编辑按钮样式 */
.edit-btn-profile {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* 文字编辑按钮特殊样式 */
.text-container .edit-btn-profile {
    background: rgba(240, 240, 240, 0.9);
    /* 稍微不同的背景色 */
}

/* 图片编辑按钮特殊样式 */
.image-container .edit-btn-profile {
    background: rgba(255, 255, 255, 0.9);
}

/* 悬停效果 */
.edit-btn-profile:hover {
    background: #27ae60;
    transform: scale(1.1);
    transition: transform 0.2s ease;
}

/* 图片选择器模态框样式 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    padding: 20px;
    border-radius: 8px;
    width: 80%;
    max-width: 800px;
    max-height: 85vh;
    position: relative;
}

.image-grid-container {
    height: 60vh;
    overflow-y: auto;
    margin: 20px 0;
}

.image-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.image-item {
    display: flex;
    align-items: center;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
}

.image-item.selected {
    background: #e3f2fd;
    border-color: #2196f3;
}

.image-item img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    margin: 0 20px;
}

.modal-footer {
    display: flex;
    flex-direction: row;
    margin-top: 20px;
    justify-content: space-between;
    align-items: center;
}

.button-group {
    display: flex;
}

.cancel-btn {
    margin-right: 20px;
}

/* 文本编辑器样式 */
#textEditor {
    width: 100%;
    margin: 10px 0;
    border: 1px solid #ddd;
    border-radius: 4px;
    resize: vertical;
}

.upload-btn {
    padding: 10px 20px;
    margin-top: 10px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
    background: #4CAF50;
    color: white;
}


.upload-btn:hover {
    background: #45a049;
}

/* 公司简介页面样式 */
.container {
    width: 80%;
    /* 增加宽度以获得更好的阅读体验 */
    max-width: 1200px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    /* 增加行间距 */
    margin: 180px auto 100px;
    /* 调整上下边距 */
    padding: 5px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.row {
    display: flex;
    gap: 40px;
    /* 增加图文间距 */
    align-items: center;
    padding: 20px;
    padding-top: 0px;
    padding-bottom: 0px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

.row:hover {
    transform: translateY(-5px);
}

.image-container {
    width: 300px;
    /* 增加图片尺寸 */
    height: 300px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* 保持图片比例 */
    transition: transform 0.3s ease;
}

.image-container:hover img {
    transform: scale(1.05);
}

.text-container {
    flex: 1;
    min-height: 200px;
    padding: 20px;
    font-size: 16px;
    line-height: 1.8;
    color: #2c3e50;
    text-align: justify;
    letter-spacing: 0.5px;
}

/* 最后一行（两张图片）的特殊样式 */
.row:last-child {
    justify-content: space-between;
}

.row:last-child .image-container {
    width: 48%;
    /* 调整最后一行两张图片的宽度 */
    height: 400px;
}

/* 响应式布局 */
@media (max-width: 768px) {
    .container {
        width: 95%;
        padding: 15px;
    }

    .row {
        flex-direction: column;
        gap: 20px;
    }

    .image-container {
        width: 100%;
        height: 250px;
    }

    .row:last-child {
        flex-direction: row;
    }

    .row:last-child .image-container {
        height: 280px;
    }
}

@media (max-width: 480px) {
    .container {
        width: 98%;
        margin: 130px auto 80px;
        padding: 10px;
    }

    .image-container {
        height: 200px;
    }

    .row:last-child {
        flex-direction: column;
    }

    .row:last-child .image-container {
        width: 100%;
        height: 200px;
    }

    .text-container {
        font-size: 14px;
        padding: 10px;
    }
}

#editor—wrapper {
    border: 1px solid #ccc;
    z-index: 100;
}

#toolbar-container {
    border-bottom: 1px solid #ccc;
}

#editor-container {
    height: 500px;
}