/* 보험사 약관 - 통합 디자인 시스템 */

/* ===== CSS 변수 ===== */
:root {
    /* 메인 색상 - 약관 테마 (모던 블루 계열) */
    --primary-color: #3b82f6;
    --primary-dark: #1e40af;
    --primary-light: #60a5fa;
    --accent-color: #1d4ed8;
    
    /* 그라디언트 */
    --document-gradient: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
    --life-gradient: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --glass-gradient: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(30, 64, 175, 0.1) 100%);
    
    /* 배경 */
    --bg-primary: #f8fafc;
    --bg-glass: rgba(255, 255, 255, 0.95);
    --bg-card: rgba(255, 255, 255, 0.95);
    
    /* 텍스트 */
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    
    /* 그림자 */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
    --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
    
    /* 레이아웃 */
    --sidebar-width: 380px;
    --border-radius: 16px;
    --spacing-sm: 12px;
    --spacing-md: 20px;
    --spacing-lg: 32px;
}

/* ===== 기본 리셋 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body.unified-search-page {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, 'Helvetica Neue', 'Segoe UI', 'Apple SD Gothic Neo', 'Noto Sans KR', 'Malgun Gothic', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    font-weight: 400;
}

/* ===== 글래스모피즘 배경 ===== */
.glass-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    overflow: hidden;
}

.glass-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(40px);
    opacity: 0.7;
    animation: float 6s ease-in-out infinite;
}

.blob-1 {
    width: 300px;
    height: 300px;
    background: linear-gradient(45deg, #3b82f6, #1e40af);
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.blob-2 {
    width: 200px;
    height: 200px;
    background: linear-gradient(45deg, #60a5fa, #3b82f6);
    top: 60%;
    right: 20%;
    animation-delay: 2s;
}

.blob-3 {
    width: 150px;
    height: 150px;
    background: linear-gradient(45deg, #1e40af, #1e3a8a);
    bottom: 20%;
    left: 60%;
    animation-delay: 4s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    33% { transform: translateY(-20px) rotate(120deg); }
    66% { transform: translateY(-10px) rotate(240deg); }
}

/* ===== 메인 래퍼 ===== */
.main-wrapper {
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

/* ===== 히어로 섹션 ===== */
.hero-section {
    text-align: center;
    padding: 10px 0px 20px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-content {
    max-width: 600px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--document-gradient);
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
}

.hero-title {
    font-size: 2.2rem;
    font-weight: 700;
    color: white;
    margin-bottom: 12px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    line-height: 1.2;
}

.gradient-text {
    background: var(--document-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.5;
    margin: 0;
}

/* ===== 메인 컨텐츠 ===== */
.main-content {
    padding: 35px 0 20px 0;
    margin-top: 34px; /*헤더공간맞추려고 요소보고 강제로 맞춤 */
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.pc-search-interface {
    display: grid;
    grid-template-columns: var(--sidebar-width) 1fr;
    gap: var(--spacing-lg);
    min-height: 600px;
}

/* ===== 검색 사이드바 ===== */
.search-sidebar {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    height: fit-content;
    max-height: 80vh;
    overflow-y: auto;
    position: sticky;
    top: var(--spacing-md);
}

.search-sidebar-header {
    margin-bottom: var(--spacing-lg);
    padding-bottom: var(--spacing-md);
    border-bottom: 1px solid rgba(59, 130, 246, 0.1);
}

.header-with-back {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.back-btn {
    background: var(--document-gradient);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    min-width: 40px;
    height: 40px;
    box-shadow: var(--shadow-sm);
}

.back-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.header-text h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.header-text p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin: 0;
}

/* ===== 검색 폼 ===== */
.search-form-container {
    margin-bottom: var(--spacing-lg);
}

.form-group {
    margin-bottom: var(--spacing-md);
}

.form-group label, .form-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.form-label i {
    color: var(--primary-color);
    font-size: 0.9rem;
}

.form-control {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background: white;
    box-shadow: var(--shadow-sm);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-hint {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.form-hint i {
    color: var(--primary-color);
    font-size: 0.8rem;
}

/* ===== 필터 버튼 ===== */
.filter-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    background: white;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    box-shadow: var(--shadow-sm);
}

.filter-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: rgba(59, 130, 246, 0.05);
    transform: translateY(-1px);
}

.filter-btn.active {
    background: var(--document-gradient);
    color: white;
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
}

.filter-btn i {
    font-size: 0.85rem;
}

/* ===== 검색 버튼 ===== */
.search-btn-primary {
    width: 100%;
    padding: 14px 20px;
    background: var(--document-gradient);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: var(--spacing-md);
    box-shadow: var(--shadow-md);
}

.search-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* ===== 정보 섹션 ===== */
.info-section {
    margin-top: var(--spacing-lg);
    padding-top: var(--spacing-md);
    border-top: 1px solid rgba(59, 130, 246, 0.1);
}

.info-card {
    background: rgba(59, 130, 246, 0.03);
    border: 1px solid rgba(59, 130, 246, 0.1);
    border-radius: 12px;
    padding: var(--spacing-md);
    transition: all 0.3s ease;
}

.info-card:hover {
    background: rgba(59, 130, 246, 0.05);
    border-color: rgba(59, 130, 246, 0.2);
    transform: translateY(-1px);
}

.info-icon {
    text-align: center;
    margin-bottom: var(--spacing-sm);
}

.info-icon i {
    font-size: 1.8rem;
}

.info-content h5 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
    text-align: center;
}

.info-content p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 10px;
    text-align: center;
}

.info-content ul {
    list-style: none;
    padding: 0;
}

.info-content li {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 6px;
    padding-left: 18px;
    position: relative;
}

.info-content li::before {
    content: "•";
    color: var(--primary-color);
    font-weight: bold;
    position: absolute;
    left: 0;
}

.info-content strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* ===== 검색 결과 영역 ===== */
.search-results-area {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    min-height: 600px;
    overflow-y: auto;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-lg);
    padding-bottom: var(--spacing-md);
    border-bottom: 1px solid rgba(59, 130, 246, 0.1);
}

.results-title-section {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.results-title-section h3 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.results-title-section h3 i {
    color: var(--primary-color);
    font-size: 1.2rem;
}

/* 모바일 백버튼 */
.mobile-back-btn {
    display: none;
}

.result-count {
    font-size: 0.95rem;
    color: var(--text-secondary);
    background: rgba(59, 130, 246, 0.1);
    padding: 6px 12px;
    border-radius: 8px;
    font-weight: 500;
}

/* ===== 보험 섹션 ===== */
.insurance-section {
    margin-bottom: var(--spacing-lg);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-md);
    padding: var(--spacing-md) var(--spacing-lg);
    background: var(--document-gradient);
    color: white;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
}

.section-header h4 {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-count {
    font-size: 0.9rem;
    background: rgba(255, 255, 255, 0.25);
    padding: 4px 12px;
    border-radius: 16px;
    font-weight: 600;
}

/* ===== 보험 카드 그리드 ===== */
.insurance-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 14px;
    margin-top: var(--spacing-md);
}

.insurance-card {
    background: white;
    border: 1px solid #f1f5f9;
    border-radius: var(--border-radius);
    padding: 12px;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-card);
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
}

.insurance-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.insurance-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--document-gradient);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.insurance-card:hover::before {
    transform: scaleX(1);
}

/* ===== 카드 헤더 ===== */
.card-header {
    display: flow-root;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0;
    padding-bottom: 0;
}

.company-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.company-logo {
    width: 150px;
    height: 60px;
    border-radius: 12px;
    object-fit: contain;
    padding: 6px;
    flex-shrink: 0;
    background: white;
}

.company-name {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    letter-spacing: -0.01em;
}

.company-type {
    display: none;
}

/* ===== 다운로드 버튼 (헤더 우측) ===== */
.download-btn {
    padding: 8px 14px;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    min-width: 85px;
}

/* 손해보험 버튼 (파란색) */
.damage-btn {
    background: var(--document-gradient);
}

.damage-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    text-decoration: none;
    color: white;
}

/* 생명보험 버튼 (초록색) */
.life-btn {
    background: var(--life-gradient);
}

.life-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    text-decoration: none;
    color: white;
}

.download-btn i {
    font-size: 0.75rem;
}

/* ===== 애니메이션 ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.insurance-card:nth-child(1) { animation-delay: 0.1s; }
.insurance-card:nth-child(2) { animation-delay: 0.2s; }
.insurance-card:nth-child(3) { animation-delay: 0.3s; }
.insurance-card:nth-child(4) { animation-delay: 0.4s; }
.insurance-card:nth-child(5) { animation-delay: 0.5s; }
.insurance-card:nth-child(6) { animation-delay: 0.6s; }

/* ===== 검색 결과 없음 ===== */
.no-results, .empty-state {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-secondary);
}

.no-results i, .empty-state i {
    font-size: 3.5rem;
    color: var(--text-muted);
    margin-bottom: var(--spacing-md);
}

.no-results h4, .empty-state h4 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.no-results p, .empty-state p {
    font-size: 1rem;
    margin: 0;
}

/* ===== 반응형 디자인 ===== */
@media (max-width: 1024px) {
    .pc-search-interface {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    .search-sidebar {
        order: 2;
        position: static;
        max-height: none;
    }
    
    .search-results-area {
        order: 1;
    }
    
    .insurance-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 12px;
    }
}

@media (max-width: 768px) {
    /* 모바일에서 사이드바 완전히 숨김 */
    .search-sidebar {
        display: none !important;
    }

    .pc-search-interface {
        display: block;
    }

    .container {
        margin: 0 auto;
        padding: 0 0px !important;
    }

    .main-content {
        padding: 20px 0;
    }
    
    .hero-title {
        font-size: 1.8rem;
    }
    
    .insurance-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .insurance-card {
        padding: 10px;
    }
    
    .company-logo {
        width: 120px;
        height: 50px;
    }
    
    .company-name {
        font-size: 1.05rem;
    }
    
    .download-btn {
        padding: 6px 12px;
        font-size: 0.75rem;
        min-width: 75px;
    }

    /* 결과 헤더 모바일 최적화 */
    .results-header {
        padding: 12px 0;
        margin-bottom: 12px;
        flex-direction: row !important;
        align-items: center !important;
    }
    
    .results-title-section {
        width: 100%;
        display: flex;
        align-items: center;
        gap: 12px;
    }

    .mobile-back-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        background: var(--document-gradient);
        border: none;
        border-radius: 8px;
        color: white;
        cursor: pointer;
        transition: all 0.3s ease;
        flex-shrink: 0;
    }

    .mobile-back-btn:hover {
        transform: translateY(-2px);
        box-shadow: var(--shadow-md);
    }
    
    .results-title-section h3 {
        font-size: 20px;
        margin-bottom: 0;
        flex: 1;
    }
    
    .result-count {
        font-size: 14px;
        padding: 6px 12px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.5rem;
    }
    
    .card-header {
        display: flex;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .results-header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--spacing-sm);
    }
    
    .section-header {
        flex-direction: row;
        align-items: flex-start;
        gap: 6px;
    }
    
    .filter-buttons {
        flex-direction: column;
    }
    
    .filter-btn {
        justify-content: center;
    }
    
    .company-logo {
        width: 100px;
        height: 45px;
    }
    
    .company-name {
        font-size: 0.95rem;
        margin-bottom: 0px !important;
    }
    
    .download-btn {
        padding: 5px 10px;
        font-size: 0.7rem;
        min-width: 65px;
    }
    
    .insurance-card {
        padding: 8px;
    }
    
    .company-info {
        gap: 8px;
    }
} 

/* ===== 모바일 검색 인터페이스 ===== */
@media (max-width: 768px) {
    /* 플로팅 트리거 버튼 */
    .mobile-search-trigger {
        position: fixed;
        bottom: 20px;
        right: 20px;
        width: 60px;
        height: 60px;
        background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
        border: none;
        border-radius: 50%;
        color: white;
        font-size: 24px;
        cursor: pointer;
        z-index: 1000;
        box-shadow: 0 4px 20px rgba(59, 130, 246, 0.4);
        transition: all 0.3s ease;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .mobile-search-trigger:hover {
        transform: scale(1.1);
        box-shadow: 0 6px 25px rgba(59, 130, 246, 0.5);
    }
    
    /* 모바일 검색 인터페이스 */
    .mobile-search-interface {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(20px);
        border-top: 1px solid rgba(59, 130, 246, 0.1);
        border-radius: 20px 20px 0 0;
        padding: 20px;
        transform: translateY(100%);
        transition: all 0.3s ease;
        z-index: 1001;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
    }
    
    .mobile-search-interface.active {
        transform: translateY(0);
    }
    
    .mobile-search-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 20px;
    }
    
    .mobile-search-title {
        font-size: 18px;
        font-weight: 700;
        color: var(--text-primary);
        margin: 0;
    }
    
    .mobile-close-btn {
        width: 36px;
        height: 36px;
        background: rgba(59, 130, 246, 0.1);
        border: none;
        border-radius: 50%;
        color: var(--primary-color);
        font-size: 18px;
        cursor: pointer;
        transition: all 0.3s ease;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .mobile-close-btn:hover {
        background: rgba(59, 130, 246, 0.2);
    }
    
    .mobile-search-form {
        display: flex;
        flex-direction: column;
        gap: 15px;
    }
    
    .mobile-form-group {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }
    
    .mobile-form-label {
        font-size: 14px;
        font-weight: 600;
        color: var(--text-secondary);
        display: flex;
        align-items: center;
        gap: 6px;
    }
    
    .mobile-search-input {
        width: 100%;
        padding: 14px 16px;
        border: 2px solid rgba(59, 130, 246, 0.1);
        border-radius: 10px;
        font-size: 16px;
        background: rgba(255, 255, 255, 0.9);
        transition: all 0.3s ease;
    }
    
    .mobile-search-input:focus {
        outline: none;
        border-color: var(--primary-color);
        box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    }
    
    .mobile-filter-buttons {
        display: flex;
        gap: 8px;
        flex-wrap: wrap;
    }
    
    .mobile-filter-btn {
        flex: 1;
        min-width: 80px;
        padding: 12px 16px;
        border: 2px solid rgba(59, 130, 246, 0.1);
        background: rgba(255, 255, 255, 0.9);
        border-radius: 8px;
        font-size: 14px;
        font-weight: 600;
        color: var(--text-primary);
        cursor: pointer;
        transition: all 0.3s ease;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
    }
    
    .mobile-filter-btn:hover,
    .mobile-filter-btn.active {
        background: var(--primary-color);
        color: white;
        border-color: var(--primary-color);
        transform: translateY(-1px);
    }
    
    /* body 패딩 조정 */
    body.unified-search-page {
        padding-bottom: 80px;
    }
}

/* ===== 데스크톱에서 모바일 요소 숨김 ===== */
@media (min-width: 769px) {
    .mobile-search-trigger,
    .mobile-search-interface {
        display: none !important;
    }
} 