/* 지부 활동보고 게시판 스타일 */

.board-report-container {
    width: 100%;
}

.report-table-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 20px;
}

/* 권역 카테고리 */
.board-categories {
    display: flex;
    gap: 6px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    padding-bottom: 15px;
    border-bottom: 2px solid #e0e0e0;
}

.category-item {
    padding: 8px 16px;
    border: 1px solid #ddd;
    border-radius: 6px;
    text-decoration: none;
    color: #333;
    background: #fff;
    font-size: 16px;
    transition: all 0.3s;
}

.category-item:hover {
    background: #f8f9fa;
    border-color: #8030b3;
}

.category-item.active {
    background: #8030b3;
    color: #fff;
    border-color: #8030b3;
}

/* 상단 컨트롤 (전체 갯수 + 검색) */
.report-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    gap: 15px;
    flex-wrap: wrap;
}

.board-stats {
    font-size: 14px;
    color: #666;
}

.board-stats strong {
    color: #2c5aa0;
    font-weight: 600;
}

.search-form {
    display: flex;
    align-items: center;
}

.search-controls {
    display: flex;
    gap: 8px;
    align-items: center;
}

.search-type {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}

.search-input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    min-width: 200px;
}

.search-btn {
    padding: 8px 16px;
    background: #8030b3;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s;
}

.search-btn:hover {
    background: #1e3d6f;
}

.search-reset {
    padding: 8px;
    color: #666;
    text-decoration: none;
    transition: color 0.3s;
}

.search-reset:hover {
    color: #dc3545;
}

/* 테이블 */
.report-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.report-table thead {
    background: #2c5aa0;
    color: #fff;
}

.report-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
}

.report-table td {
    padding: 15px;
    border-bottom: 1px solid #e0e0e0;
}

.report-table tbody tr:hover {
    background: #f8f9fa;
}

.report-table .col-num {
    width: 80px;
    text-align: center;
}

.report-table .col-title {
    min-width: 300px;
    font-size:16px !important;
}

.report-table .col-title a:hover {color:#559dff;text-decoration: none !important;}

.report-table .col-count {
    width: 80px;
    font-size:14px !important;
    text-align: center;
}

.report-table .col-author {
    width: 120px;
    font-size:14px !important;
}

.report-table .col-date {
    width: 120px;
}

.report-table .col-views {
    width: 80px;
    text-align: center;
}

.report-table a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s;
}

.report-table a:hover {
    color: #8a3bcd !important;
    text-decoration: underline;
}

.comment-count {
    color: #666;
    font-size: 12px;
    margin-left: 5px;
}

.no-posts {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

/* 글쓰기 버튼 */
.write-button-container {
    display: flex;
    justify-content: flex-end;
    margin-top: 20px;
}

.btn-write {
    padding: 10px 20px;
    background: #8030b3;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s;
}

.btn-write:hover {
    background: #7028ad;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* 지부 활동보고 글쓰기 폼 스타일 */
.report-write-form {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

.report-write-form h2 {
    margin-bottom: 30px;
    color: #2c5aa0;
    font-size: 24px;
    font-weight: 600;
}

.report-write-form .form-section {
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.report-write-form .form-section h3 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 18px;
    color: #2c5aa0;
    border-bottom: 2px solid #2c5aa0;
    padding-bottom: 10px;
}

.report-write-form .form-group {
    margin-bottom: 20px;
}

.report-write-form .form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
}

.report-write-form .form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.report-write-form .form-control:focus {
    outline: none;
    border-color: #2c5aa0;
    box-shadow: 0 0 0 3px rgba(44, 90, 160, 0.1);
}

.report-write-form .form-row {
    display: flex;
    gap: 15px;
}

.report-write-form .form-row .form-group {
    flex: 1;
}

.report-write-form .required {
    color: #e74c3c;
}

.report-write-form .form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.report-write-form .btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
}

.report-write-form .btn-primary {
    background: #2c5aa0;
    color: #fff;
}

.report-write-form .btn-primary:hover {
    background: #1e3d6f;
}

.report-write-form .btn-secondary {
    background: #f7fafc;
    color: #4a5568;
    border: 1px solid #e2e8f0;
}

.report-write-form .btn-secondary:hover {
    background: #edf2f7;
}

.report-write-form .btn-danger {
    background: #e74c3c;
    color: #fff;
}

.report-write-form .btn-danger:hover {
    background: #c0392b;
}

/* SNS 공유 섹션 */
.sns-share-section {
    padding: 20px 30px;
    background: #f8f9fa;
    border-top: 1px solid #ddd;
    margin-top: 40px;
}

.sns-share-section h3 {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sns-icons {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.sns-icon {
    display: inline-block;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.sns-icon:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.sns-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 댓글 스타일 */
.comments-section {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #e0e0e0;
}

.comments-section h3 {
    margin-bottom: 20px;
    color: #2c5aa0;
}

.comment-list {
    list-style: none;
    padding: 0;
    margin: 0 0 30px 0;
}

.comment-item {
    padding: 15px;
    margin-bottom: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 3px solid #2c5aa0;
}

.comment-item.comment-reply {
    margin-left: 40px;
    background: #ffffff;
    border-left-color: #6c757d;
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.comment-writer {
    font-weight: 600;
    color: #2c5aa0;
}

.comment-date {
    color: #6c757d;
    font-size: 0.9em;
}

.comment-actions {
    margin-left: auto;
    display: flex;
    gap: 8px;
}

.comment-content {
    color: #333;
    line-height: 1.6;
    margin-bottom: 10px;
}

.comment-form-wrapper {
    margin-top: 20px;
}

.comment-form textarea {
    width: 100%;
    min-height: 100px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-family: inherit;
    resize: vertical;
    margin-bottom: 10px;
}

.comment-guest-info {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.comment-guest-info input {
    flex: 1;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 6px;
}

.report-actions {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.actions-left {
    display: flex;
    gap: 10px;
}

.actions-right {
    display: flex;
    gap: 10px;
    margin-left: auto;
}

.report-actions .btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s;
}

.report-actions .btn-secondary {
    background: #6c757d;
    color: #fff;
}

.report-actions .btn-secondary:hover {
    background: #5a6268;
}

.report-actions .btn-primary {
    background: #2c5aa0;
    color: #fff;
}

.report-actions .btn-primary:hover {
    background: #1e3d6f;
}

.report-actions .btn-danger {
    background: #dc3545;
    color: #fff;
}

.report-actions .btn-danger:hover {
    background: #c82333;
}

/* 페이징 스타일 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin: 30px 0;
    flex-wrap: wrap;
}

.page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 6px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s;
}

.page-link:hover {
    background: #f8f9fa;
    border-color: #2c5aa0;
    color: #2c5aa0;
}

.page-link.active {
    background: #2c5aa0;
    color: #fff;
    border-color: #2c5aa0;
}

.page-link i {
    font-size: 14px;
}

/* view.php 전용 스타일 (newsletter 관련) */
.newsletter-format {
    max-width: 100%;
    margin: 0 auto;
    padding: 30px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.newsletter-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 3px solid #2c5aa0;
}

.newsletter-title-box {
    background: #2c5aa0;
    color: #fff;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.newsletter-title {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
}

.newsletter-meta {
    color: #666;
    font-size: 14px;
}

.branch-section {
    margin-bottom: 20px;
    padding: 15px;
    background: #fff;
    border: #ddd solid 1px;
    border-radius: 12px;
}

.branch-name {
    margin: 0 0 20px 0;
    font-size: 28px;
    font-weight: 700;
    color: #2c5aa0;
    border-bottom: 2px solid #2c5aa0;
    padding-bottom: 10px;
}

.activity-info {
    padding: 15px;
    background: #fff;
    border-radius: 6px;
}

.info-row {
    display: flex;
    margin-bottom: 8px;
    padding-bottom: 10px;
    border-bottom: #ddd solid 1px;
}

.info-label {
    width: 100px;
    font-weight: 600;
    color: #777;
}

.info-value {
    flex: 1;
    color: #333;
}

.activity-content {
    margin-bottom: 20px;
    padding: 12px 14px;
    background: #fff;
    border-radius: 6px;
    line-height: 1.8;
}

.activity-images {
    margin-top: 20px;
    margin-bottom: 0;
}

.image-slider {
    position: relative;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 0;
    min-height: 200px;
}

.image-slider::after {
    content: '';
    display: block;
    clear: both;
}

.slider-wrapper {
    position: relative;
    overflow: hidden;
    width: 100%;
}

.slider-container {
    display: flex;
    transition: transform 0.5s ease-in-out;
    will-change: transform;
    width: 100%;
}

.slide-item {
    flex: 0 0 100%;
    width: 100%;
    min-width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.slide-item img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    object-fit: contain;
    display: block;
    max-width: 100%;
    vertical-align: top;
}

.slider-controls {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    pointer-events: none;
    padding: 0 10px;
    z-index: 10;
}

.slider-controls button {
    background: rgba(44, 90, 160, 0.8);
    color: #fff;
    border: none;
    padding: 12px 16px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.3s;
    pointer-events: all;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.slider-controls button:hover {
    background: rgba(44, 90, 160, 1);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.comments-section {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #e0e0e0;
}

.comments-section h3 {
    margin-bottom: 20px;
    color: #2c5aa0;
}

.comment-item {
    padding: 15px;
    margin-bottom: 15px;
    background: #f8f9fa;
    border-radius: 6px;
}

.comment-author {
    font-weight: 600;
    color: #2c5aa0;
    margin-bottom: 5px;
}

.comment-date {
    font-size: 12px;
    color: #999;
    margin-bottom: 10px;
}

.comment-content {
    color: #333;
    line-height: 1.6;
}

/* PC 가로 2개 */
@media (min-width: 768px) {
    .slide-item {
        flex: 0 0 50%;
        width: 50%;
        min-width: 50%;
        padding: 0 7.5px;
    }
    
    .slide-item:first-child {
        padding-left: 0;
    }
    
    .slide-item:last-child {
        padding-right: 0;
    }

    .slide-item img {
        width: 100%;
        height: auto;
        max-height: 500px;
        object-fit: contain;
    }
}

/* 모바일 최적화 */
@media (max-width: 768px) {
    .board-categories {
        gap: 6px;
    }
    
    .category-item {
        padding: 6px 12px;
        font-size: 14px;
    }
    
    .report-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    
    .board-stats {
        text-align: center;
        font-size: 13px;
    }
    
    .search-form {
        width: 100%;
    }
    
    .search-controls {
        width: 100%;
        flex-wrap: wrap;
        gap: 6px;
    }
    
    .search-type {
        flex: 0 0 auto;
        min-width: 100px;
        font-size: 13px;
        padding: 8px 10px;
    }
    
    .search-input {
        flex: 1;
        min-width: 0;
        font-size: 13px;
        padding: 8px 10px;
    }
    
    .search-btn {
        padding: 8px 14px;
        font-size: 13px;
        white-space: nowrap;
    }
    
    .board-report-container {
        width: 100%;
    }
    
    .total-posts {display: none !important;}
    .report-table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        width: 100%;
        margin-bottom: 20px;
    }
    
    .report-table {
        font-size: 13px;
        display: table;
        width: 100%;
        min-width: 600px;
        white-space: nowrap;
    }
    
    .report-table thead {
        display: table-header-group;
    }
    
    .report-table tbody {
        display: table-row-group;
    }
    
    .report-table tr {
        display: table-row;
        margin-bottom: 0;
        border: none;
        border-radius: 0;
        padding: 0;
        background: transparent;
        box-shadow: none;
    }
    
    .report-table th,
    .report-table td {
        display: table-cell;
        padding: 10px 8px;
        text-align: left;
        border-bottom: 1px solid #e0e0e0;
        position: static;
        padding-left: 8px !important;
    }
    
    .report-table th {
        padding: 12px 8px;
        font-size: 14px;
        white-space: nowrap;
    }
    
    .report-table td:before {
        display: none;
    }
    
    .report-table .col-title {
        white-space: normal;
        word-break: break-word;
    }
    
    .report-table .col-title a {
        font-size: 15px;
        line-height: 1.4;
    }
    .report-table .col-author {width: 80px !important;}
    .report-table .col-date {
        width: 90px !important;
    }

    .pagination {
        gap: 4px;
        margin: 20px 0;
    }
    
    .page-link {
        min-width: 32px;
        height: 32px;
        padding: 4px 8px;
        font-size: 13px;
    }
    
    .page-link i {
        font-size: 12px;
    }
    
    .write-button-container {
        justify-content: center;
        margin-top: 15px;
    }
    
    .btn-write {
        width: 100%;
        justify-content: center;
        padding: 12px 20px;
        font-size: 15px;
    }
    
    .newsletter-format {
        padding: 15px;
    }
    
    .newsletter-title {
        font-size: 20px;
    }
    
    .branch-section {
        padding: 0px;
        border: none !important;
    }
    
    .branch-name {
        font-size: 20px !important;
    }
    
    .activity-images {
        margin-top: 20px;
    }

    .activity-info {
        padding: 8px 12px;
        background: #fff !important;
        border-radius: 6px;
    }

    .activity-info .info-row {
        padding-bottom: 8px;
        border-bottom: #ddd solid 1px;
    }
    
    .image-slider {
        padding: 0px;
        background: #f8f9fa;
        border-radius: 8px;
        margin-bottom: 0;
        position: relative;
    }
    
    .slider-wrapper {
        overflow: hidden !important;
        position: relative;
        width: 100%;
        touch-action: pan-x;
    }
    
    .image-slider {
        touch-action: pan-x;
    }
    
    .slider-container {
        display: flex !important;
        flex-direction: row !important;
        width: 100% !important;
        transition: transform 0.5s ease-in-out;
        will-change: transform;
    }
    
    .slide-item {
        flex: 0 0 100% !important;
        width: 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
        display: flex !important;
        align-items: center;
        justify-content: center;
        opacity: 1 !important;
        visibility: visible !important;
        padding: 0;
    }
    
    .slide-item.active {
        display: flex !important;
    }
    
    .slide-item img {
        width: 100% !important;
        height: auto !important;
        max-height: 400px;
        object-fit: contain;
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        border-radius: 8px;
    }
    
    .slider-controls {
        display: flex !important;
    }
    
    .image-slider[data-total-slides="1"] .slider-controls {
        display: none !important;
    }
    
    .sns-share-section {
        padding: 20px 15px;
        margin-top: 30px;
    }
    
    .sns-share-section h3 {
        font-size: 16px !important;
        margin-bottom: 12px;
    }
    
    .sns-icons {
        gap: 6px;
    }
    
    .sns-icon {
        width: 36px;
        height: 36px;
    }
    
    .report-actions {
        flex-direction: column;
    }
    
    .actions-left,
    .actions-right {
        width: 100%;
        justify-content: center;
    }
    
    .comment-item.comment-reply {
        margin-left: 20px;
    }
    
    .comment-form-wrapper textarea {
        min-height: 80px;
    }
}

@media (max-width: 480px) {
    .report-write-form {
        padding: 12px;
    }
    
    .report-write-form .form-section {
        padding: 12px;
    }
    
    .report-write-form .form-row {
        flex-direction: column;
    }
}
