/* Community Detail Page Styles */
.community-detail-section {
    margin-top: 100px;
    padding: 40px 20px;
    min-height: calc(100vh - 100px);
    background-color: #fff;
}

.community-detail-container {
    max-width: 1000px;
    margin: 0 auto;
}

.page-header {
    padding: 50px 0 30px;
    border-bottom: 1px solid #e5e7eb;
    position: relative;
}

.page-header h1 {
    font-size: 42px;
    margin-bottom: 8px;
    font-weight: 700;
    color: #1a1a1a;
    letter-spacing: -0.5px;
}

.page-header .subtitle {
    font-size: 13px;
    letter-spacing: 1.5px;
    color: #9ca3af;
    font-weight: 500;
    text-transform: uppercase;
}

.info-box {
    position: absolute;
    top: 50px;
    right: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.info-box-item {
    font-size: 15px;
    color: #4b5563;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tabs-container {
    display: flex;
    gap: 32px;
    padding: 24px 0 0;
    border-bottom: 1px solid #e5e7eb;
}

.tab-btn {
    padding: 12px 0;
    background: none;
    border: none;
    font-size: 15px;
    font-weight: 500;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 2px solid transparent;
    position: relative;
}

.tab-btn:hover {
    color: #1a1a1a;
}

.tab-btn.active {
    color: #1a1a1a;
    border-bottom-color: #1a1a1a;
    font-weight: 600;
}

.content-area {
    padding: 50px 0;
    line-height: 1.7;
}

.content-area h2 {
    font-size: 28px;
    color: #1a1a1a;
    margin-bottom: 32px;
    font-weight: 600;
    letter-spacing: -0.3px;
}

.content-area p {
    margin-bottom: 16px;
    color: #4b5563;
    font-size: 16px;
    line-height: 1.8;
}

.info-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin: 32px 0;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 20px;
    background: #f9fafb;
    border-radius: 8px;
    font-weight: 500;
    font-size: 14px;
    color: #374151;
    border: 1px solid #e5e7eb;
    transition: all 0.2s;
}

.info-item:hover {
    background: #f3f4f6;
}

.info-item .icon {
    font-size: 20px;
    margin-bottom: 4px;
}

/* 이미지 갤러리 */
.image-gallery {
    margin-top: 60px;
    padding-top: 60px;
    border-top: 1px solid #e5e7eb;
}

.image-gallery h3 {
    font-size: 24px;
    color: #1a1a1a;
    margin-bottom: 32px;
    font-weight: 600;
    letter-spacing: -0.3px;
}

/* 갤러리 그리드 */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.gallery-item {
    position: relative;
    width: 100%;
    padding-top: 75%; /* 4:3 비율 */
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.gallery-item img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.gallery-item:hover .gallery-overlay {
    background: rgba(0, 0, 0, 0.4);
}

.gallery-icon {
    font-size: 36px;
    opacity: 0;
    transition: opacity 0.3s;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.gallery-item:hover .gallery-icon {
    opacity: 1;
}

/* 이미지 모달 */
.image-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    display: block;
    margin: auto;
    max-width: 90%;
    max-height: 85vh;
    object-fit: contain;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: zoomIn 0.3s;
}

@keyframes zoomIn {
    from { transform: translate(-50%, -50%) scale(0.8); }
    to { transform: translate(-50%, -50%) scale(1); }
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #fff;
    font-size: 50px;
    font-weight: 300;
    cursor: pointer;
    transition: color 0.3s;
    z-index: 10001;
}

.modal-close:hover {
    color: #ccc;
}

.modal-nav {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    transform: translateY(-50%);
    z-index: 10001;
}

.modal-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    font-size: 40px;
    padding: 10px 20px;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.3s;
}

.modal-btn:hover {
    background: rgba(255, 255, 255, 0.4);
}

.modal-caption {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-size: 18px;
    text-align: center;
    background: rgba(0, 0, 0, 0.5);
    padding: 10px 20px;
    border-radius: 20px;
}

/* 모바일 대응 */
@media (max-width: 768px) {
    .community-detail-section {
        margin-top: 100px;
        padding: 20px 16px;
    }

    .page-header {
        padding: 30px 0 20px;
    }

    .page-header h1 {
        font-size: 32px;
    }

    .page-header .subtitle {
        font-size: 12px;
    }

    .info-box {
        position: static;
        margin-top: 20px;
        gap: 8px;
    }

    .info-box-item {
        font-size: 14px;
    }

    .tabs-container {
        padding: 16px 0 0;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        gap: 24px;
    }

    .tab-btn {
        padding: 10px 0;
        font-size: 14px;
        white-space: nowrap;
    }

    .content-area {
        padding: 32px 0;
    }

    .content-area h2 {
        font-size: 24px;
        margin-bottom: 24px;
    }

    .content-area p {
        font-size: 15px;
    }

    .info-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .image-gallery {
        margin-top: 40px;
        padding-top: 40px;
    }

    .image-gallery h3 {
        font-size: 20px;
        margin-bottom: 24px;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .modal-close {
        top: 10px;
        right: 20px;
        font-size: 40px;
    }

    .modal-btn {
        font-size: 30px;
        padding: 8px 16px;
    }

    .modal-caption {
        bottom: 20px;
        font-size: 16px;
        padding: 8px 16px;
    }
}
