/* 전체 스타일 */
body {
    font-family: 'Noto Sans KR', sans-serif;
    line-height: 1.6;
}

/* 히어로 섹션 */
.hero-section {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 50%, #1a252f 100%);
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.1"/><circle cx="50" cy="10" r="0.5" fill="white" opacity="0.1"/><circle cx="10" cy="60" r="0.5" fill="white" opacity="0.1"/><circle cx="90" cy="40" r="0.5" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    pointer-events: none;
}

.min-vh-75 {
    min-height: 75vh;
}

/* 통계 카드 */
.hero-stats {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.stat-card {
    text-align: center;
    color: white;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* 검색 폼 */
.search-form {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(44, 62, 80, 0.15);
    border: 1px solid rgba(44, 62, 80, 0.1);
}

/* 판례 카드 */
.precedent-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    box-shadow: 0 5px 15px rgba(44, 62, 80, 0.1);
    border: 1px solid rgba(44, 62, 80, 0.05);
}

.precedent-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(44, 62, 80, 0.2);
    border-color: rgba(44, 62, 80, 0.1);
}

.precedent-card .card-body {
    padding: 1.5rem;
}

/* 검색 결과 */
.search-result-item {
    background: white;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 3px 10px rgba(44, 62, 80, 0.08);
    border: 1px solid rgba(44, 62, 80, 0.05);
    transition: box-shadow 0.3s ease;
}

.search-result-item:hover {
    box-shadow: 0 5px 20px rgba(44, 62, 80, 0.15);
    border-color: rgba(44, 62, 80, 0.1);
}

/* 네비게이션 */
.navbar-brand {
    font-weight: bold;
    font-size: 1.3rem;
}

.navbar-dark.bg-primary {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%) !important;
}

/* 버튼 스타일 */
.btn {
    border-radius: 8px;
    font-weight: 500;
    padding: 0.75rem 1.5rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.btn-primary {
    background-color: #2c3e50 !important;
    border-color: #2c3e50 !important;
}

.btn-primary:hover {
    background-color: #34495e !important;
    border-color: #34495e !important;
}

.btn-outline-primary {
    color: #2c3e50 !important;
    border-color: #2c3e50 !important;
}

.btn-outline-primary:hover {
    background-color: #2c3e50 !important;
    border-color: #2c3e50 !important;
}

.btn-warning {
    background-color: #f39c12 !important;
    border-color: #f39c12 !important;
}

.btn-warning:hover {
    background-color: #e67e22 !important;
    border-color: #e67e22 !important;
}

/* 폼 스타일 */
.form-control, .form-select {
    border-radius: 8px;
    border: 2px solid #e9ecef;
    transition: border-color 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: #2c3e50;
    box-shadow: 0 0 0 0.2rem rgba(44, 62, 80, 0.25);
}

/* 배지 스타일 */
.badge {
    font-size: 0.8rem;
    padding: 0.5rem 0.8rem;
    border-radius: 6px;
}

.badge.bg-primary {
    background-color: #2c3e50 !important;
}

.badge.bg-success {
    background-color: #27ae60 !important;
}

.badge.bg-warning {
    background-color: #f39c12 !important;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .hero-section {
        padding: 60px 0;
    }
    
    .min-vh-75 {
        min-height: 60vh;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .search-form {
        padding: 20px;
    }
    
    .display-4 {
        font-size: 2.5rem;
    }
}

/* 로딩 애니메이션 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 스크롤 애니메이션 */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* 상세페이지 스타일 */
.content-text {
    line-height: 2;
    font-size: 1.1rem;
    font-weight: 400;
    color: #2c3e50;
    letter-spacing: 0.3px;
}

.content-text p {
    margin-bottom: 1.5rem;
    text-align: justify;
}

.content-text br {
    margin-bottom: 0.8rem;
}

.card-header h2, .card-header h4, .card-header h5 {
    margin: 0;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.card-header h2 {
    font-size: 1.4rem;
    font-weight: 700;
}

/* 상세페이지 카드 스타일 */
.detail-card {
    border: none;
    box-shadow: 0 4px 20px rgba(44, 62, 80, 0.1);
    border-radius: 12px;
    margin-bottom: 2rem;
}

.detail-card .card-header {
    border-radius: 12px 12px 0 0 !important;
    padding: 1.5rem;
    font-size: 1.2rem;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%) !important;
}

.detail-card .card-body {
    padding: 2rem;
    font-size: 1.1rem;
}

/* 상세페이지 제목 스타일 */
.detail-title {
    font-size: 2.2rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 1.5rem;
    line-height: 1.3;
}

/* 상세페이지 기본정보 스타일 */
.detail-info {
    font-size: 1.05rem;
    line-height: 1.8;
}

.detail-info strong {
    color: #34495e;
    font-weight: 600;
}

/* 페이징 스타일 */
.pagination {
    margin-bottom: 0;
}

.pagination .page-link {
    color: #2c3e50;
    border-color: rgba(44, 62, 80, 0.1);
    background-color: white;
    transition: all 0.3s ease;
}

.pagination .page-link:hover {
    color: white;
    background-color: #2c3e50;
    border-color: #2c3e50;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(44, 62, 80, 0.2);
}

.pagination .page-item.active .page-link {
    background-color: #2c3e50;
    border-color: #2c3e50;
    color: white;
    font-weight: 600;
}

.pagination .page-item.disabled .page-link {
    color: #6c757d;
    background-color: #f8f9fa;
    border-color: rgba(44, 62, 80, 0.1);
}

.pagination .page-link:focus {
    box-shadow: 0 0 0 0.2rem rgba(44, 62, 80, 0.25);
    border-color: #2c3e50;
}

/* 페이징 컨테이너 스타일 */
.pagination-container {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 20px;
    border: 1px solid rgba(44, 62, 80, 0.1);
    box-shadow: 0 4px 15px rgba(44, 62, 80, 0.08);
}

/* 페이지 정보 스타일 */
.page-info {
    background: rgba(44, 62, 80, 0.05);
    border-radius: 10px;
    padding: 10px 15px;
    border: 1px solid rgba(44, 62, 80, 0.1);
}

/* 상세페이지 배지 스타일 */
.detail-badge {
    font-size: 0.9rem;
    padding: 0.6rem 1rem;
    border-radius: 8px;
    font-weight: 500;
}

/* 상세페이지 h3 태그 스타일 */
.content-text h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: #2c3e50;
    margin: 2rem 0 1rem 0;
    padding: 0.5rem 0;
    border-bottom: 2px solid #3498db;
    display: inline-block;
}

.content-text h3:first-child {
    margin-top: 0;
}

.content-text p {
    margin-bottom: 1.5rem;
    text-align: justify;
    line-height: 1.8;
}

/* 대표 이미지 스타일 */
.precedent-image {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(44, 62, 80, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: block; /* 기본적으로 표시 */
}

.precedent-image:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 30px rgba(44, 62, 80, 0.25);
}

/* 이미지 로딩 최적화 */
.precedent-image[loading="lazy"] {
    opacity: 1;
    transition: opacity 0.3s ease;
}

.precedent-image.loaded {
    opacity: 1;
}

/* 판례 제목 섹션 스타일 */
.precedent-main-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: white;
    line-height: 1.4;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.precedent-main-title i {
    font-size: 1.6rem;
    opacity: 0.9;
}

.precedent-number {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.3rem 0.8rem;
    border-radius: 6px;
    font-weight: 600;
    backdrop-filter: blur(5px);
}

.precedent-type {
    background: rgba(52, 152, 219, 0.3);
    padding: 0.3rem 0.8rem;
    border-radius: 6px;
    font-weight: 600;
    backdrop-filter: blur(5px);
}

.precedent-court {
    background: rgba(46, 204, 113, 0.3);
    padding: 0.3rem 0.8rem;
    border-radius: 6px;
    font-weight: 600;
    backdrop-filter: blur(5px);
}

.precedent-date {
    background: rgba(155, 89, 182, 0.3);
    padding: 0.3rem 0.8rem;
    border-radius: 6px;
    font-weight: 600;
    backdrop-filter: blur(5px);
}

.precedent-case-name {
    font-size: 2.2rem;
    font-weight: 700;
    color: #2c3e50;
    margin: 0;
    line-height: 1.3;
    text-align: center;
    padding: 1rem 0;
    border-bottom: 3px solid #3498db;
    position: relative;
}

.precedent-case-name::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #3498db, #2c3e50);
    border-radius: 2px;
}

/* 판례 요약 정보 스타일 */
.precedent-summary {
    font-size: 1.1rem;
    color: #6c757d;
    margin: 1rem 0 0 0;
    padding: 1rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 10px;
    border-left: 4px solid #3498db;
    line-height: 1.6;
}

.precedent-summary i {
    color: #3498db;
}

.precedent-summary strong {
    color: #2c3e50;
    font-weight: 600;
}

.precedent-summary .badge {
    font-size: 0.85rem;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-weight: 500;
}

.precedent-summary .badge.bg-primary {
    background-color: #3498db !important;
}

.precedent-summary .badge.bg-secondary {
    background-color: #6c757d !important;
}

/* 반응형 디자인 - 제목 섹션 */
@media (max-width: 768px) {
    .precedent-main-title {
        font-size: 1.4rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.3rem;
    }
    
    .precedent-main-title i {
        font-size: 1.3rem;
    }
    
    .precedent-number,
    .precedent-type,
    .precedent-court,
    .precedent-date {
        padding: 0.2rem 0.6rem;
        font-size: 0.9rem;
    }
    
    .precedent-case-name {
        font-size: 1.8rem;
        text-align: left;
    }
    
    .precedent-summary {
        font-size: 1rem;
        padding: 0.75rem;
        line-height: 1.5;
    }
    
    .precedent-summary .badge {
        font-size: 0.8rem;
        padding: 0.3rem 0.6rem;
    }
} 