/* 1. 배너와 검색 영역 */
.main-banner-section {
    background-size: cover;
    background-position: center;
    padding: 25px 15px;
    color: white;
    position: relative;
    height: 230px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.main-banner-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    /* 검은색 오버레이 50% 투명도 */
    z-index: 1;
    /* 배경 위에, 컨텐츠 아래에 위치 */
}

.banner-content {
    z-index: 2;
}

.banner-text h2 {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 0;
    line-height: 1.2;
}

.search-bar {
    position: relative;
    margin-top: 15px;
    width: 100%;
}

.search-bar input[type="text"] {
    width: 100%;
    padding: 12px 40px 12px 15px;
    border-radius: 6px;
    border: none;
    font-size: 16px;
    /* box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); */
    font-weight: 800;
    color: #333;
}

.search-bar input[type="text"]::placeholder {
    color: #999;
}

.search-bar button {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #999;
    font-size: 16px;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

/* 2. 카테고리 링크 영역 */
.category-links-section {
    padding: 20px 15px 15px;
    background-color: white;
    margin-bottom: 8px;
    /* 간격 감소 */
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    margin-bottom: 15px;
}

.category-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
}

.category-icon {
    width: 56px;
    /* 사이즈 증가 */
    height: 56px;
    border-radius: 50%;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    overflow: hidden;
}

.category-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-name {
    font-size: 14px;
    color: #333;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    font-weight: 500;
}

/* 3. 섹션 공통 스타일 */
.section-container {
    padding: 20px 15px;
    background-color: white;
    margin-bottom: 8px;
    /* 상단 이미지와 맞게 간격 조정 */
}

.section-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    position: relative;
}

.section-header h3 {
    font-size: 22px;
    font-weight: 800;
    margin: 0;
    margin-right: 10px;
    color: var(--text-color);
}

.section-desc {
    font-size: 13px;
    color: #999;
}

.see-all {
    position: absolute;
    right: 0;
    font-size: 13px;
    color: #999;
    text-decoration: none;
    display: flex;
    align-items: center;
}

.see-all i {
    font-size: 10px;
    margin-left: 3px;
}

/* 4. 업체 카드 스타일 (인기 업체 & 추천 업체) - 레이아웃 변경 */
.vendor-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.vendor-item {
    display: flex;
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    border: 1px solid var(--border-color);
    height: 100px;
    /* 정확한 높이 */
    position: relative;
}

.vendor-name-wrapper {
    padding: 10px 0;
}

.vendor-rank {
    position: absolute;
    top: 22px;
    left: 10px;
    font-size: 30px;
    font-weight: 900;
    color: #000;
    z-index: 1;
}

.vendor-thumbnail {
    position: relative;
    padding-bottom: 60%;
}

.vendor-thumbnail img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 13px;
}

.vendor-details {
    flex: 1;
    padding: 12px 15px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.vendor-info {
    position: relative;
    padding-left: 45px;
}

.vendor-name {
    font-size: 18px;
    font-weight: 700;
    margin: 4px 0;
    line-height: 1.3;
    color: #333;
}

.vendor-category {
    font-size: 13px;
    color: #777;
    margin-bottom: 1px;
    font-weight: 600;
}

.vendor-meta {
    display: flex;
    align-items: center;
}

.vendor-rating {
    display: flex;
    align-items: center;
    color: #ff9800;
    font-weight: 500;
    font-size: 14px;
}

.vendor-rating i {
    margin-right: 2px;
    font-size: 12px;
}

.vendor-reviews {
    margin-left: 5px;
    font-size: 12px;
    color: #999;
}

/* 5. 문의 목록 스타일 */
.inquiry-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.inquiry-item {
    background: white;
    border-radius: 10px;
    padding: 20px 15px;
    border: 1px solid #ddd;
}

.inquiry-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.inquiry-title {
    font-weight: 700;
    font-size: 18px;
    color: #333;
    margin: 3px 0px;
}

.inquiry-detail {
    display: flex;
    gap: 15px;
}

.inquiry-date {
    font-size: 11px;
    color: #999;
}

.inquiry-meta {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.inquiry-user,
.inquiry-location,
.inquiry-vendor {
    color: #666;
    font-size: 14px;
}

.inquiry-user i,
.inquiry-location i,
.inquiry-vendor i {
    margin-right: 2px;
    font-size: 12px;
    color: #8a8a8a;
}

.inquiry-vendor strong {
    color: var(--primary-color);
}

.inquiry-deadline {
    color: #555;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 3px;
}

.inquiry-deadline strong {
    color: #ff5252;
}

.inquiry-content {
    overflow: hidden;
    white-space: normal;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    word-break: keep-all;
    font-size: 14px;
    margin-top: 7px;
    color: #676767;
}

/* 6. 이벤트 그리드 스타일 */
.events-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.event-card {
    position: relative;
    border-radius: 15px;
    padding-bottom: 100%;
    /* 정사각형 비율 */
    overflow: hidden;
    height: 0;
}

.event-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #f5f5f5;
    background-size: cover;
    background-position: center;
}

.event-date {
    background: rgba(0, 0, 0, 0.6);
    color: white;
    font-size: 11px;
    padding: 3px 6px;
    border-radius: 4px;
    z-index: 1;
    width: max-content;
}

.event-post-period {
    text-align: end;
    margin-bottom: 10px;
    font-size: 14px;
}

.event-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 15px 15px 20px;
    display: flex;
    justify-content: flex-end;
    flex-direction: column;
    width: 100%;
    height: 100%;
}

.event-title {
    font-size: 15px;
    font-weight: 600;
    z-index: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 5px 0;
}

.event-excerpt {
    display: none !important;
    overflow: hidden;
    white-space: normal;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    word-break: keep-all;
    font-size: 12px;
    color: #ffffffcc;
}

/* 애니메이션 및 효과 */
/* .vendor-item,
.inquiry-item,
.category-item,
.event-card {
    transition: transform 0.15s ease;
}

.vendor-item:active,
.inquiry-item:active,
.category-item:active,
.event-card:active {
    transform: scale(0.98);
}
 */
/* 메인 컨테이너 스타일 */
.main-page-container {
    background-color: #f8f9fa;
    max-width: 780px;
    margin: 0 auto;
}

/* 빈 이벤트 자리 스타일링 */
.events-grid .event-card:empty {
    background: #f5f5f5;
    border-radius: var(--border-radius);
    position: relative;
}

#document_button {
    cursor: pointer;
}

/* 반응형 디자인 */
@media (max-width: 480px) {
    .category-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 10px;
    }

    .banner-text h2 {
        font-size: 24px;
    }

    .events-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
}

@media (max-width: 360px) {
    .category-grid {
        gap: 8px;
    }

    .category-icon {
        width: 40px;
        height: 40px;
    }

    .category-name {
        font-size: 12px;
    }

    .vendor-name {
        font-size: 14px;
    }

    .inquiry-title {
        font-size: 13px;
    }

    .event-title {
        font-size: 12px;
    }
}

@media screen and (min-width:480px) {
    .category-icon {
        width: 80px;
        height: 80px;
    }
}