/* partners.css */

.partners-page {
    padding-top: 120px;
    padding-bottom: 50px;
}

.partners-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.page-title {
    text-align: left;
    font-size: 2.5rem;
    font-weight: bold;
    color: #333;
    border-bottom: 2px solid #ff6a00;
    text-indent: 0;
    padding-left: 0;
    margin-bottom: 20px;
    padding-bottom: 10px;

    display: block;
    width: 100%;
}

.partners-layout {
    display: flex;
    gap: 30px;
    margin-left: 0;
}

/* -------------------------
 * 좌측 카테고리 필터 (Sidebar)
 * ------------------------- */
.category-sidebar {
    flex-basis: 250px;
    flex-shrink: 0;
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-top: none;
    border-right: 1px solid #e0e0e0;
    border-radius: 8px;
    height: fit-content;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    overflow: hidden;
}

.category-header {
    background-color: #ff6a00;
    color: white;
    padding: 15px 20px;
    font-size: 1.2rem;
    font-weight: bold;
    display: block;
}

.category-header h2 {
    margin: 0;
    font-size: 1.2rem;
}

#category-list {
    list-style: none;
    padding: 10px 0;
    margin: 0;
}

#category-list li {
    padding: 12px 20px;
    font-size: 1rem;
    color: #555;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
    border-left: 3px solid transparent;
}

#category-list li:hover {
    background-color: #f5f5f5;
    color: #333;
}

#category-list li.active {
    background-color: #fff0e0;
    color: #ff6a00;
    font-weight: bold;
    border-left: 3px solid #ff6a00;
}


/* ---------------------
 * 우측 파트너 목록 (Grid)
 * --------------------- */
.partner-list-section {
    flex-grow: 1;
    border-top: 1px solid #e0e0e0;
}

.partner-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
    padding: 20px 0 0 0;
    border-top: none;
}

/* 개별 로고 카드 스타일 */
.partner-item {
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    text-align: center;
    padding: 15px 10px;
    height: auto;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.logo-wrapper {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-height: 80px;
}

.partner-item img {
    max-width: 90%;
    max-height: 80px;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

/* 페이지네이션 스타일 */
.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    margin-top: 40px;
}

.pagination-container button {
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 1rem;
    color: #555;
    transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}

.pagination-container button:hover:not(:disabled) {
    background-color: #ddd;
    color: #333;
    border-color: #ccc;
}

.pagination-container button.active {
    background-color: #ff6a00;
    color: #fff;
    border-color: #ff6a00;
    font-weight: bold;
    cursor: default;
}


/* -----------------------
 * 모바일 반응형 (768px 이하)
 * ----------------------- */
@media (max-width: 768px) {
    .partners-page {
        padding-top: 120px;
    }

    .partners-container {
        max-width: 100%;
        padding: 0 20px;
        margin: 0 auto;
    }

    .page-title {
        font-size: 2rem;
        margin-bottom: 25px;
        text-align: center;
        padding-left: 0;
        border-bottom: none;
        display: block;
        text-indent: 0;
    }

    .partners-layout {
        flex-direction: column;
        gap: 20px;
        margin-left: 0;
    }

    .category-sidebar {
        flex-basis: auto;
        overflow-x: auto;
        white-space: nowrap;
        border: none;
        box-shadow: none;
        border-radius: 0;
        margin: 0 -20px;
    }

    .category-header {
        display: none;
    }

    #category-list {
        display: flex;
        padding: 0 20px 10px 20px;
    }

    .partner-list-section {
        border-top: none;
    }

    .partner-grid {
        /* 모바일에서 2열로 변경 */
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        padding: 10px 0;
    }

    .partner-item {
        height: 100px;
        padding: 10px;
    }

    .partner-item img {
        max-height: 60px;
    }
}