/* 시공업체 상세보기 페이지 스타일 */

.container {
    max-width: 1060px;
    margin: 30px auto;
    box-sizing: border-box;
}

/* 상단 정보 섹션 */
.top-section {
    margin-bottom: 30px;
}

/* 상세 정보 영역 (2영역 레이아웃) */
.detail-info-section {
    display: flex;
    gap: 2rem;
    margin-bottom: 30px;
    align-items: flex-start;
}

/* 왼쪽 영역: 회사 정보 */
.company-overview-section {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    overflow: hidden;
}

.company-overview-section .info-row-item {
    display: flex;
    flex-direction: row;
    padding: 12px;
    border-bottom: 1px solid #e5e7eb;
    align-items: flex-start;
}

.company-overview-section .info-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #666;
    min-width: 80px;
    flex-shrink: 0;
}

.company-overview-section .info-value {
    font-size: 0.875rem;
    color: #333;
    font-weight: 500;
    flex: 1;
}

/* 사업자 인증 표시 */
.company-overview-section .info-value.verified {
    color: #198754;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.company-overview-section .info-value.verified i {
    font-size: 16px;
}

.company-overview-section .info-value.unverified {
    color: #dc3545;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.company-overview-section .info-value.unverified i {
    font-size: 16px;
}

/* 대표 인사말 */
.company-detail-section .greeting-section {
    background-color: #f5f5f5;
    padding: 1rem;
    margin: 2rem 0;
}

.company-detail-section .greeting-label {
    font-size: 0.875rem;
    color: #666;
    margin-bottom: 0.25rem;
}

.company-detail-section .greeting-content {
    font-size: 0.875rem;
    color: #333;
    white-space: pre-wrap;
}

/* 상세 소개 */
.company-detail-section .detail-content-section {
    margin: 2rem 0 5rem;
}

.company-detail-section .detail-content-label {
    font-size: 1.25rem;
    color: #333;
    margin-bottom: 0.25rem;
}

.company-detail-section .detail-content {
    font-size: 0.875rem;
    color: #333;
    line-height: 1.8;
}

.company-detail-section .detail-content p {
    margin-bottom: 1rem;
}

.company-detail-section .detail-content p:last-child {
    margin-bottom: 0;
}

/* 주소 및 지도 */
.company-detail-section .address-map-section {
    margin: 2rem 0 0;
}

.company-detail-section .address-map-label {
    font-size: 1.125rem;
    color: #333;
    margin-bottom: 0.75rem;
}

.company-detail-section .address-text {
    font-size: 0.875rem;
    color: #666;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.company-detail-section .map-container {
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
}

.company-detail-section .map-container #map {
    width: 100%;
    height: 300px;
}

@media (max-width: 1060px) {
    .company-detail-section .map-container #map {
        height: 250px;
    }
}

@media (max-width: 768px) {
    .company-detail-section .map-container #map {
        height: 200px;
    }
}

/* 오른쪽 영역: 연락처 정보 */
.contact-section {
    width: 25%;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: sticky;
    top: calc(80px + 20px); /* 헤더 높이(80px) + 여백(20px) */
    align-self: flex-start;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
}

.contact-section .contact-info-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.contact-section .contact-label {
    font-size: 0.875rem;
    color: #666;
}

.contact-section .contact-value {
    font-size: 0.875rem;
    color: #333;
}

.contact-section .contact-btn {
    width: 100%;
    padding: 0.75rem 1.5rem;
    background-color: #4169e1;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
    margin-top: 1rem;
}

.contact-section .contact-btn:hover {
    background-color: #3151c7;
}

/* 위쪽: 이미지, 업체명, 제목 */
.top-section .info-box {
    display: flex;
    flex-direction: row;
    gap: 1.5rem;
    align-items: center;
}

.top-section .info-box .image-box {
    width: 8rem;
    height: 8rem;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.top-section .info-box .image-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.top-section .info-box .text-box {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1;
}

.top-section .info-box .text-box .company-name {
    font-size: 0.875rem;
    color: #666;
}

.top-section .info-box .text-box .company-name .bi-geo-alt {
    font-size: 0.75rem;
    margin-right: 4px;
    color: #999;
}

.top-section .info-box .text-box .detail-title {
    font-size: 1.375rem;
    font-weight: 600;
    color: #333;
    padding: 0;
    word-break: keep-all;
    overflow-wrap: break-word;
}

/* 아래쪽: 연락처 정보 */
.top-section .contact-box {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: flex-start;
}

.top-section .contact-box .contact-info {
    display: flex;
    flex-direction: row;
    gap: 24px;
    align-items: center;
    flex-wrap: wrap;
}

.top-section .contact-box .contact-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.top-section .contact-box .contact-label {
    font-size: 0.75rem;
    color: #999;
    font-weight: 500;
}

.top-section .contact-box .contact-value {
    font-size: 0.9375rem;
    color: #333;
    font-weight: 500;
}

.top-section .contact-box .contact-btn {
    padding: 12px 24px;
    background-color: #4169e1;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
    white-space: nowrap;
}

.top-section .contact-box .contact-btn:hover {
    background-color: #3151c7;
}

.top-section .info-box .info-row {
    font-size: 15px;
    padding: 8px 0;
    color: #333;
}

.top-section .info-box .info-label {
    font-weight: 600;
    color: #003b5c;
    margin-right: 8px;
}

.top-section .separator {
    height: 1px;
    background-color: #e5e7eb;
    margin: 4px 0;
}

/* 회사 소개 드롭다운 */
.profile-dropdown {
    position: relative;
    margin: 20px 0;
}

.dropdown-toggle {
    background-color: #3399cc;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.dropdown-toggle:hover {
    background-color: #267aa5;
}

.dropdown-content {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    max-width: 800px;
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 15px;
    background: #ffffff;
    margin-top: 5px;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.profile-item {
    margin-bottom: 10px;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
}

.profile-item strong {
    color: #003b5c;
    font-weight: 600;
    margin-right: 8px;
}

/* 상세 소개 섹션 */
h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 30px 0 15px 0;
    color: #003b5c;
    padding-bottom: 8px;
}

.content-container {
    border-radius: 8px;
    color: #333;
    margin-bottom: 30px;
    font-size: 14px;
    line-height: 1.6;
    padding: 20px;
    background-color: #ffffff;
    min-height: 100px;
}

.content-container img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 15px auto;
    border-radius: 5px;
}

.content-container p {
    margin-bottom: 15px;
}

.content-container strong {
    font-weight: 600;
}

.content-container em {
    font-style: italic;
}

.content-container a {
    color: #3399cc;
    text-decoration: underline;
}

.content-container a:hover {
    color: #267aa5;
}

.content-container ul,
.content-container ol {
    padding-left: 25px;
    margin: 10px 0;
}

.content-container li {
    margin-bottom: 8px;
}

.content-container table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
}

.content-container table th,
.content-container table td {
    border: 1px solid #e5e7eb;
    padding: 8px 12px;
    text-align: left;
}

.content-container table th {
    background-color: #d4ecf5;
    color: #003b5c;
    font-weight: 600;
}

.content-container blockquote {
    border-left: 3px solid #3399cc;
    padding-left: 15px;
    margin: 15px 0;
    color: #555;
    font-style: italic;
}

.content-container pre {
    background-color: #f5f5f5;
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
    border: 1px solid #e5e7eb;
}

.company-overview-section .key-features-row .info-label {
    margin-right: 12px;
}

/* 댓글 섹션 */
.comments-wrapper {
    margin-top: 40px;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

.comments-title {
    font-size: 1.125rem;
    color: #333;
    margin-bottom: 1rem;
}

.comment-list {
    background-color: #ffffff;
}

/* 댓글 작성 폼 */

.common-comment-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
}

.common-comment-form textarea {
    width: 100%;
    min-height: 80px;
    padding: 12px;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
    font-size: 14px;
    resize: vertical;
    font-family: inherit;
    box-sizing: border-box;
}

.common-comment-form textarea:focus {
    outline: none;
    border-color: #4169e1;
    box-shadow: 0 0 0 3px rgba(51, 153, 204, 0.1);
}

.comment-form-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.common-comment-form label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #666;
    cursor: pointer;
    margin: 0;
}

.common-comment-form button[type="submit"],
.cancel-btn {
    padding: 0.5rem 1.25rem;
    border: none;
    border-radius: 6px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
    background-color: #4169e1;
    color: #fff;
}
.common-comment-form button[type="submit"] {
    border: 1px solid #3151c7;
}
.cancel-btn {
    background-color: #e5e7eb;
    color: #333;
}

.common-comment-form button[type="submit"]:hover {
    background-color: #4169e1;
    color: #fff;
}

/* 댓글 아이템 */
.comment-item {
    margin-bottom: 0;
    padding: 1.5rem 0;
    border-bottom: 1px solid #e5e7eb;
    background-color: #ffffff;
    position: relative;
}

.comment-list .comment-item.last-comment-item {
    border-bottom: none;
    margin-bottom: 15px;
}

.comment-item .comment-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 12px;
}

.comment-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.comment-author-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.author-name {
    font-weight: 600;
    color: #222;
    font-size: 14px;
}

.comment-time {
    font-size: 12px;
    color: #666;
}

.reply-icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #666;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: color 0.2s ease;
    padding: 0;
}

.reply-icon-btn i {
    font-size: 0.875rem;
}

.reply-icon-btn span {
    font-size: 0.875rem;
}

.reply-icon-btn:hover {
    color: #065fd4;
}

.reply-icon-btn.delete-btn,
.reply-icon-btn.delete-btn:hover {
    color: #e74c3c;
}

.comment-header .badge-new {
    display: inline-block;
    padding: 2px 8px;
    font-size: 10px;
    color: #fff;
    background: #e74c3c;
    border-radius: 12px;
    font-weight: 600;
    animation: blink 1s infinite alternate;
}

.top-section .info-box .text-box .portfolio-count {
    margin: 0;
    padding: 0;
}

.top-section .info-box .text-box .portfolio-count a {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #0a0a0a;
    font-size: 0.875rem;
    text-decoration: none;
    transition: color 0.2s ease;
}

.top-section .info-box .text-box .portfolio-count a:hover {
    color: #4169e1;
}

.top-section .info-box .text-box .portfolio-count a i {
    font-size: 0.875rem;
}

@keyframes blink {
    from {
        opacity: 1;
    }
    to {
        opacity: 0.5;
    }
}

.comment-content {
    font-size: 14px;
    color: #333;
    margin-bottom: 10px;
    line-height: 1.6;
    word-break: break-word;
}

.secret-comment {
    font-style: italic;
    color: #999;
}

/* 댓글 액션 버튼 */
.comment-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.comment-actions button {
    font-size: 12px;
    padding: 5px 12px;
    border-radius: 4px;
    border: 1px solid;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
}

.comment-actions .edit-comment-btn {
    color: #4169e1;
    background: #e5f1ff;
    border-color: #4169e1;
}

.comment-actions .edit-comment-btn:hover {
    background: #4169e1;
    color: #fff;
}

.comment-actions .delete-btn {
    color: #e74c3c;
    background: #fdecea;
    border-color: #e74c3c;
}

.comment-actions .delete-btn:hover {
    background: #e74c3c;
    color: #fff;
}

/* 대댓글 */
.reply-item {
    background-color: #f9f9f9;
    margin-bottom: 10px;
    padding: 1rem;
    border-radius: 4px;
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.reply-arrow {
    color: #999;
    font-size: 16px;
    margin-top: 2px;
    flex-shrink: 0;
}

.reply-content-wrapper {
    flex: 1;
}

.reply-item .comment-header {
    margin-bottom: 8px;
}

.reply-item .comment-author-info {
    margin-bottom: 0;
}

.reply-item .comment-content {
    margin-bottom: 8px;
}

/* 공통 버튼 스타일 */

.toggle-comment-form-btn,
.toggle-reply-form-btn {
    margin-bottom: 10px;
}

.comments-wrapper
    button:not(.delete-btn):not(.edit-comment-btn).toggle-replies-btn {
    background: none;
    border: none;
    font-size: 0.875rem;
    color: #999;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
    transition: color 0.2s ease;
}

#login-alert-btn {
    padding: 10px 20px;
    background-color: #ff7043;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

#login-alert-btn:hover {
    background-color: #e64a19;
}

.labor-check-section {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #eee;
}

/* 연락처 무단 이용 안내 */
.labor-check-section .contact-warning {
    margin: 0 0 12px;
    color: #777;
    font-size: 12px;
    line-height: 1.6;
    word-break: keep-all;
}

/* 임금체불 사업주 링크 */
.labor-check-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #333;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

.labor-check-link:hover {
    color: #111;
    text-decoration: underline;
}

/* 고용노동부 안내 */
.labor-check-section .labor-check-description {
    margin: 6px 0 0;
    color: #999;
    font-size: 11px;
    line-height: 1.5;
    word-break: keep-all;
}

/* 조회수 / 등록일 */
.top-section .info-box .text-box .view-count-row {
    display: flex;
    align-items: center;
    gap: 3px;
}

.top-section .info-box .text-box .created-at {
    display: block;
}

.job-option-badge {
    display: inline-block;
    padding: 4px 6px;
    margin: 2px 4px 2px 0;
    border-radius: 4px;
    background: #f5f5f5;
    font-size: 13px;
}

@media (max-width: 1060px) {
    .detail-header-wrapper {
        margin-bottom: 1rem;
    }
    .container {
        padding: 0 15px;
    }

    .top-section {
        flex-direction: column;
        gap: 24px;
    }

    .top-section .info-box .image-box {
        align-self: flex-start;
    }
    .top-section .info-box .text-box {
        gap: 4px;
    }

    .detail-info-section {
        flex-direction: column;
        gap: 24px;
    }

    .company-overview-section {
        grid-template-columns: 1fr;
    }

    .company-overview-section .info-row-item {
        border-right: none;
        border-bottom: 1px solid #e5e7eb;
    }

    .company-overview-section .info-row-item:last-child {
        border-bottom: none;
    }

    .contact-section {
        width: 100%;
    }

    .top-section .info-box {
        width: 100%;
        min-width: auto;
    }

    .dropdown-content {
        width: 100%;
        max-width: 100%;
    }

    .content-container {
        padding: 15px;
    }

    .comment-item {
        padding: 12px;
    }

    .reply-item {
        margin-left: 20px;
    }
}



@media (max-width: 480px) {
    .top-section {
        margin-bottom: 20px;
    }
    .top-section .info-box .image-box {
        width: 6rem;
        height: 6rem;
    }

    .top-section .info-box {
        gap: 12px;
    }
    .top-section .info-box .text-box .company-name {
        font-size: 13px;
    }
    .top-section .info-box .text-box .detail-title {
        font-size: 16px;
    }
    .company-overview-section .info-row-item {
        padding: 12px;
    }
    .company-detail-section .greeting-section {
        margin: 20px 0;
    }
    .content-container {
        padding: 12px;
        font-size: 13px;
    }

    .comment-item {
        padding: 10px;
    }
}
