.ticker-wrap { background-color: #0f172a; color: #fff; padding: 12px 0; overflow: hidden; display: flex; align-items: center; }
.ticker-title { background-color: #e11d48; color: #fff; font-weight: 800; padding: 4px 12px; border-radius: 4px; font-size: 0.85rem; margin-left: 20px; margin-right: 15px; white-space: nowrap; z-index: 2; box-shadow: 0 2px 10px rgba(225,29,72,0.3); }

/* ★ 새로 추가하는 마스크 영역 (버튼 앞쪽에서 텍스트를 숨김) */
.ticker-mask {
    flex: 1; /* 타이틀을 제외한 나머지 가로 영역을 모두 차지 */
    overflow: hidden; /* 이 영역을 벗어나는 텍스트는 보이지 않게 숨김 처리 */
    margin-left: 10px; /* 버튼에서 10px 정도 더 앞쪽에서 사라지도록 여백 확보 */
    display: flex;

    /* (선택) 버튼에 닿기 전에 부드럽게 스르륵 사라지게 하는 그라데이션 마스크 효과 */
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 20px);
    mask-image: linear-gradient(to right, transparent 0%, black 20px);
}

.ticker-move { display: flex; white-space: nowrap; animation: ticker 30s linear infinite; }
.ticker-move:hover { animation-play-state: paused; }
.ticker-list { display: flex; align-items: center; }
.ticker-item { color: #94a3b8; text-decoration: none; margin-right: 30px; font-weight: 600; font-size: 0.95rem; transition: color 0.2s; }
.ticker-item:hover { color: #fff; text-decoration: underline; }
@keyframes ticker { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

.container { max-width: 1280px; margin: 40px auto; padding: 0 24px; }

.toolbar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 15px; margin-bottom: 40px; }
.categories { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 5px; }
.category-btn { padding: 8px 18px; border-radius: 20px; background: #fff; border: 1px solid #e2e8f0; color: #64748b; font-weight: 600; text-decoration: none; transition: 0.2s; }
.category-btn.active, .category-btn:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

/* 검색 및 정렬 폼 컨테이너 */
.search-and-sort { display: flex; gap: 10px; align-items: center; }

/* 정렬 셀렉트 박스 스타일 (브라우저 강제 스타일 초기화 및 커스텀 화살표 적용) */
.sort-select {
    padding: 8px 35px 8px 15px !important; /* 오른쪽 화살표 공간 35px, 왼쪽 여백 15px 고정 */
    border-radius: 20px;
    border: 1px solid #e2e8f0;
    font-family: inherit;
    font-weight: 600;
    color: #475569;
    outline: none;
    cursor: pointer;
    background-color: #fff;

    /* 브라우저 기본 화살표와 정렬 강제 초기화 */
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    text-align: left !important;

    /* SVG 커스텀 화살표 삽입 (정확한 위치 제어) */
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center; /* 화살표 위치 고정 */
    background-size: 16px; /* 화살표 크기 */

    min-width: 115px; /* 글씨가 밀리지 않도록 최소 너비 고정 */
}
.sort-select:hover { border-color: var(--primary); }

.search-box { display: flex; background: #fff; border: 1px solid #e2e8f0; border-radius: 20px; overflow: hidden; padding: 2px; }
.search-box input { border: none; padding: 8px 15px; outline: none; width: 200px; font-family: inherit; }
.search-box button { background: #f1f5f9; border: none; padding: 8px 15px; border-radius: 16px; cursor: pointer; font-weight: 600; color: #475569; }

.featured-card { display: flex; background: #fff; border-radius: 24px; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,0.04); margin-bottom: 50px; cursor: pointer; border: 1px solid #f1f5f9; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); }
.featured-card:hover { transform: translateY(-5px); box-shadow: 0 20px 40px rgba(0,0,0,0.08); border-color: #e2e8f0; }
.featured-image { width: 55%; position: relative; background: #f1f5f9; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.featured-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.featured-card:hover .featured-image img { transform: scale(1.05); }
.featured-content { width: 45%; padding: 50px 40px; display: flex; flex-direction: column; justify-content: center; }
.featured-badge { display: inline-flex; align-items: center; background: #e11d48; color: #fff; font-size: 0.85rem; font-weight: 800; padding: 6px 14px; border-radius: 20px; align-self: flex-start; margin-bottom: 20px; }
.featured-title { font-size: 2.2rem; font-weight: 800; color: var(--text-main); margin: 0 0 12px 0; line-height: 1.35; word-break: keep-all; }
.featured-subtitle { font-size: 1.15rem; color: var(--text-muted); margin: 0 0 24px 0; }
.featured-preview { font-size: 1.1rem; color: #475569; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 30px; }
.featured-preview * {
    display: inline !important;
    margin: 0 6px 0 0 !important; /* 오른쪽 마진 6px을 주어 띄어쓰기 강제 생성 */
    font-size: 1.1rem !important;
    font-weight: 400 !important;
    color: #475569 !important;
    pointer-events: none !important;
}
.featured-action { font-weight: 800; color: var(--primary); font-size: 1.1rem; display: flex; align-items: center; gap: 8px; }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 30px; align-items: stretch; }
.card { background: var(--card-bg); border-radius: 20px; box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04); transition: all 0.3s; display: flex; flex-direction: column; height: 100%; border: 1px solid #f1f5f9; cursor: pointer; overflow: hidden; }
.card:hover { transform: translateY(-8px); box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1); border-color: #e2e8f0; }
.card-image-wrapper { width: 100%; height: 220px; background: #f1f5f9; overflow: hidden; position: relative; border-bottom: 1px solid #f1f5f9; display: flex; align-items: center; justify-content: center; }
.card-image-wrapper img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.card:hover .card-image-wrapper img { transform: scale(1.05); }
.card-image-fallback { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #eff6ff, #dbeafe); color: #2563eb; font-weight: 800; font-size: 1.4rem; padding: 20px; text-align: center; word-break: keep-all; }
.card-header { padding: 20px 24px 10px; }
.keyword-tag { display: inline-flex; align-items: center; background-color: #eff6ff; color: var(--primary); font-size: 0.85rem; font-weight: 700; padding: 6px 14px; border-radius: 30px; margin-bottom: 12px; text-decoration: none; transition: 0.2s; }
.keyword-tag:hover { background-color: var(--primary); color: #fff; }
.card-title { margin: 0; font-size: 1.25rem; font-weight: 700; color: var(--text-main); word-break: keep-all; line-height: 1.4; }
.card-subtitle { font-size: 0.875rem; color: var(--text-muted); margin-top: 8px; }
.card-body { padding: 0 24px 24px; flex-grow: 1; display: flex; flex-direction: column; }
.content-preview { font-size: 0.95rem; color: #475569; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; max-height: 4.5em; margin-top: auto; }
.content-preview * {
    display: inline !important;
    margin: 0 6px 0 0 !important; /* 오른쪽 마진을 6px 주어 제목과 본문 사이 띄어쓰기 강제 유발 */
    font-size: 0.95rem !important;
    font-weight: 400 !important;
    color: #475569 !important;
    pointer-events: none !important;
}

.card-meta { display: flex; align-items: center; justify-content: space-between; margin-top: 15px; padding-top: 15px; border-top: 1px dashed #f1f5f9; }
.card-author { display: flex; align-items: center; gap: 8px; }
.card-author img { width: 24px; height: 24px; border-radius: 50%; background: #f8fafc; border: 1px solid #e2e8f0; }
.card-author-name { font-size: 0.85rem; font-weight: 700; color: #475569; }
.card-date { font-size: 0.8rem; color: #94a3b8; font-weight: 500; }

.empty-state { grid-column: 1 / -1; text-align: center; padding: 80px 20px; color: var(--text-muted); background: #fff; border-radius: 20px; border: 1px dashed #cbd5e1; }
.load-more-container { text-align: center; margin-top: 50px; padding-bottom: 40px; }
.load-more-btn { padding: 14px 40px; border-radius: 30px; background: #fff; border: 2px solid #e2e8f0; color: #475569; font-weight: 700; cursor: pointer; transition: 0.2s; }
.load-more-btn:hover { border-color: var(--primary); color: var(--primary); }
.load-more-btn:disabled { opacity: 0.5; cursor: not-allowed; }

@media (max-width: 800px) {
    .featured-card { flex-direction: column; } .featured-image, .featured-content { width: 100%; } .featured-image { height: 280px; } .featured-content { padding: 30px 20px; } .featured-title { font-size: 1.8rem; }
}
@media (max-width: 640px) {
    .toolbar { flex-direction: column; align-items: stretch; }
    .search-and-sort { flex-direction: column; width: 100%; }
    .sort-select { width: 100%; }
    .search-box { width: 100%; }
    .search-box input { width: 100%; }
    .card-image-wrapper { height: 180px; }
    .ticker-title { display: none; }
}