/* =================== 메모 목록 페이지 스타일 =================== */

/* 건강/AI 테마 색상 변수 오버라이드 */
:root {
    --primary-color: #10b981;
    --primary-dark: #059669;
    --primary-light: #d1fae5;
    --secondary-color: #3b82f6;
    --secondary-dark: #2563eb;
    --accent-purple: #8b5cf6;
    --text-color: #1e293b;
    --text-light: #64748b;
    --border-color: #e2e8f0;
    --light-bg: #f8fafc;
    --gradient-primary: linear-gradient(135deg, #10b981 0%, #3b82f6 100%);
    --gradient-card: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
}

.memo-list-page {
    padding: 40px 0;
    background: linear-gradient(135deg, #f8fafc 0%, #e0f2fe 100%);
    min-height: 100vh;
}

.page-header {
    text-align: center;
    margin-bottom: 40px;
}

.page-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--text-color);
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-header p {
    font-size: 1.1rem;
    color: var(--text-light);
    max-width: 700px;
    margin: 0 auto;
}

/* 검색 섹션 */
.search-section {
    margin-bottom: 40px;
}

.search-section .search-form {
    max-width: 600px;
    margin: 0 auto;
}

.search-section .input-group {
    border-radius: 50px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.1);
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.search-section .input-group:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 4px 30px rgba(16, 185, 129, 0.2);
}

.search-section .form-control {
    border: none;
    padding: 16px 24px;
    font-size: 1rem;
    background-color: #ffffff;
}

.search-section .form-control:focus {
    box-shadow: none;
}

.search-section .input-group .btn {
    padding: 12px 24px;
    background: var(--gradient-primary);
    border: none;
    color: white;
    font-weight: 600;
    transition: all 0.3s ease;
}

.search-section .input-group .btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

/* 광고 배너 */
.ad-banner {
    margin-bottom: 40px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* 메모 목록 */
.memo-list {
    margin-bottom: 40px;
}

.memo-card {
    background: var(--gradient-card);
    border-radius: 16px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.06);
    padding: 24px;
    margin-bottom: 30px;
    height: 100%;
    transition: all 0.3s ease;
    border: 1px solid rgba(16, 185, 129, 0.1);
    position: relative;
    overflow: hidden;
}

.memo-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.memo-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(16, 185, 129, 0.15);
    border-color: var(--primary-color);
}

.memo-card:hover::before {
    opacity: 1;
}

.memo-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.memo-date {
    font-size: 0.9rem;
    color: var(--text-light);
    font-weight: 500;
}

.memo-actions {
    display: flex;
}

.memo-action {
    color: var(--text-light);
    margin-left: 15px;
    transition: all 0.3s ease;
    padding: 6px;
    border-radius: 50%;
}

.memo-action:hover {
    color: var(--primary-color);
    background-color: var(--primary-light);
}

.memo-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.memo-title a {
    color: var(--text-color);
    transition: all 0.3s ease;
}

.memo-title a:hover {
    color: var(--primary-color);
    text-decoration: none;
}

/* 메모 카드 이미지 스타일 */
.memo-card-image-container {
    width: 100%;
    height: 200px;
    margin-bottom: 16px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.memo-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.memo-card-image:hover {
    transform: scale(1.08);
}

.memo-issue {
    font-size: 1.1rem;
    color: var(--text-color);
    margin-bottom: 16px;
    line-height: 1.6;
}

.memo-preview {
    color: var(--text-light);
    margin-bottom: 16px;
    line-height: 1.7;
}

.memo-examples-preview {
    margin-bottom: 16px;
}

.badge {
    font-weight: 500;
    padding: 6px 14px;
    border-radius: 50px;
    background: var(--gradient-primary);
    color: white;
    border: none;
}

.memo-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 2px solid var(--border-color);
}

.memo-user {
    display: flex;
    align-items: center;
}

.user-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 15px;
    border: 2px solid var(--primary-light);
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-info {
    flex: 1;
}

.user-name {
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text-color);
    font-size: 1rem;
}

.user-details {
    display: flex;
    font-size: 0.85rem;
    color: var(--text-light);
}

.user-details span {
    margin-right: 12px;
}

.memo-stats {
    display: flex;
}

.memo-stat {
    display: flex;
    align-items: center;
    margin-left: 16px;
    color: var(--text-light);
    font-weight: 500;
    transition: all 0.3s ease;
}

.memo-stat:hover {
    color: var(--primary-color);
}

.memo-stat i {
    margin-right: 6px;
    font-size: 1.1rem;
}

/* 페이지네이션 */
.pagination-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 50px;
}

.pagination {
    margin-bottom: 16px;
}

.page-link {
    color: var(--text-color);
    border: 2px solid var(--border-color);
    padding: 10px 16px;
    margin: 0 6px;
    border-radius: 12px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.page-link:hover {
    background: var(--gradient-primary);
    color: white;
    border-color: transparent;
    transform: translateY(-2px);
}

.page-item.active .page-link {
    background: var(--gradient-primary);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.page-item.disabled .page-link {
    color: var(--text-light);
    opacity: 0.5;
    border-color: var(--border-color);
}

.page-item.disabled .page-link:hover {
    background-color: transparent;
    color: var(--text-light);
    transform: none;
}

.pagination-info {
    color: var(--text-light);
    font-size: 0.95rem;
    font-weight: 500;
}

/* 검색 결과 없음 */
.no-results {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.no-results i {
    color: var(--text-light);
    margin-bottom: 24px;
    opacity: 0.6;
}

.no-results h3 {
    font-size: 1.6rem;
    margin-bottom: 12px;
    color: var(--text-color);
    font-weight: 600;
}

.no-results p {
    color: var(--text-light);
    margin-bottom: 24px;
    font-size: 1.05rem;
}

.no-results .btn {
    background: var(--gradient-primary);
    border: none;
    color: white;
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.no-results .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.3);
}

/* 반응형 디자인 */
@media (max-width: 992px) {
    .page-header h1 {
        font-size: 2rem;
    }

    .memo-card {
        padding: 20px;
    }
}

@media (max-width: 768px) {
    .memo-list-page {
        padding: 30px 0;
    }

    .page-header h1 {
        font-size: 1.8rem;
    }

    .memo-card {
        padding: 18px;
    }

    .memo-title {
        font-size: 1.3rem;
    }

    .memo-card-image-container {
        height: 180px;
    }

    .memo-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .memo-user {
        width: 100%;
    }

    .memo-stats {
        width: 100%;
        justify-content: flex-end;
        margin-left: 0;
    }

    .memo-stat {
        margin-left: 12px;
    }
}

@media (max-width: 576px) {
    .search-section .input-group .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    .page-link {
        padding: 8px 12px;
        font-size: 0.9rem;
    }
}
