/* 승소사례 페이지 전용 스타일 */

.main-content {
    padding-top: 88px;
    min-height: calc(100vh - 88px);
    background-color: #f8f9fa;
}

/* Page Header */
.page-header {
    text-align: center;
    padding: 60px 0 40px;
    background: white;
    margin-bottom: 0;
}

.page-header h1 {
    font-size: 40px;
    font-weight: bold;
    color: #000;
    letter-spacing: -2px;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.title-icon {
    width: 50px;
    height: 50px;
}

.page-subtitle {
    font-size: 25px;
    color: #000;
    letter-spacing: -2px;
    line-height: 40px;
    padding-top: 30px;
}

.privacy-note {
    font-size: 18px;
    color: #525252;
    letter-spacing: -1px;
    line-height: 40px;
}

/* Search Section */
.search-section {
    background: white;
    padding: 20px 0;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 30px;
}

.search-form {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    max-width: 600px;
    margin: 0 auto;
}

.search-field {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background: white;
    min-width: 100px;
}

.search-text {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    max-width: 300px;
}

.search-btn {
    padding: 8px 20px;
    background: #3a7bdd;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.search-btn:hover {
    background: #2c5aa0;
}

/* Cases Grid */
.cases-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    padding: 0 20px;
    margin-bottom: 50px;
}

.case-item {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.case-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.case-image {
    width: 100%;
    height: 220px;
    overflow: hidden;
    position: relative;
}

.case-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.case-item:hover .case-image img {
    transform: scale(1.05);
}

.case-placeholder {
    width: 100%;
    height: 100%;
    background: #f0f0f0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 16px;
    font-weight: bold;
    text-align: center;
}

.case-placeholder small {
    font-size: 12px;
    font-weight: normal;
    margin-top: 5px;
    color: #999;
}

.case-content {
    padding: 20px;
}

.case-title {
    font-size: 16px;
    font-weight: 500;
    color: #333;
    line-height: 1.4;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 60px;
}

.case-meta {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
}

.case-date {
    color: #666;
}

.case-views {
    color: #666;
    margin-left: 5px;
}

.case-author {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #333;
    font-weight: 500;
}

.level-icon {
    width: 16px;
    height: 16px;
    margin-left: 5px;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    margin: 40px 0;
}

.page-btn {
    padding: 8px 12px;
    border: 1px solid #ddd;
    background: white;
    color: #333;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
    min-width: 40px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-btn:hover:not(:disabled) {
    background: #f0f0f0;
    border-color: #ccc;
}

.page-btn.active {
    background: #3a7bdd;
    color: white;
    border-color: #3a7bdd;
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-btn img {
    width: 15px;
    height: 15px;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .cases-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
}

@media (max-width: 768px) {
    .main-content {
        padding-top: 70px;
    }

    .page-header {
        padding: 40px 20px 30px;
    }

    .page-header h1 {
        font-size: 28px;
        flex-direction: column;
        gap: 15px;
    }

    .title-icon {
        width: 40px;
        height: 40px;
    }

    .page-subtitle {
        font-size: 18px;
        line-height: 28px;
        padding-top: 20px;
    }

    .privacy-note {
        font-size: 14px;
        line-height: 24px;
    }

    .search-form {
        flex-direction: column;
        gap: 15px;
        padding: 0 20px;
    }

    .search-text {
        max-width: 100%;
        width: 100%;
    }

    .cases-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 0 15px;
    }

    .case-image {
        height: 200px;
    }

    .case-content {
        padding: 15px;
    }

    .case-title {
        font-size: 15px;
        min-height: 54px;
    }

    .pagination {
        flex-wrap: wrap;
        gap: 3px;
        margin: 30px 0;
        padding: 0 20px;
    }

    .page-btn {
        padding: 6px 10px;
        min-width: 36px;
        height: 32px;
        font-size: 13px;
    }

    .page-btn img {
        width: 12px;
        height: 12px;
    }
}

@media (max-width: 480px) {
    .page-header h1 {
        font-size: 24px;
    }

    .page-subtitle {
        font-size: 16px;
        line-height: 24px;
    }

    .privacy-note {
        font-size: 13px;
        line-height: 20px;
    }

    .case-image {
        height: 180px;
    }

    .case-title {
        font-size: 14px;
        min-height: 48px;
    }

    .pagination {
        justify-content: space-between;
    }

    .page-btn {
        padding: 5px 8px;
        min-width: 32px;
        height: 28px;
        font-size: 12px;
    }
}

/* Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.case-item {
    animation: fadeInUp 0.6s ease-out;
}

.case-item:nth-child(1) { animation-delay: 0.1s; }
.case-item:nth-child(2) { animation-delay: 0.2s; }
.case-item:nth-child(3) { animation-delay: 0.3s; }
.case-item:nth-child(4) { animation-delay: 0.4s; }
.case-item:nth-child(5) { animation-delay: 0.5s; }
.case-item:nth-child(6) { animation-delay: 0.6s; }
.case-item:nth-child(7) { animation-delay: 0.7s; }
.case-item:nth-child(8) { animation-delay: 0.8s; }
.case-item:nth-child(9) { animation-delay: 0.9s; }

/* Loading state */
.cases-grid.loading .case-item {
    opacity: 0.5;
    pointer-events: none;
}

/* Search results */
.no-results {
    text-align: center;
    padding: 60px 20px;
    color: #666;
    font-size: 18px;
}

.no-results-icon {
    font-size: 48px;
    color: #ddd;
    margin-bottom: 20px;
}

/* Hover effects */
.case-item {
    position: relative;
    overflow: hidden;
}

.case-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
    z-index: 1;
}

.case-item:hover::before {
    left: 100%;
}

/* Focus states for accessibility */
.case-item:focus,
.page-btn:focus,
.search-btn:focus,
.search-text:focus,
.search-field:focus {
    outline: 2px solid #3a7bdd;
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .search-section,
    .pagination {
        display: none;
    }
    
    .cases-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .case-item {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
}