/* 
 * headline.css
 * 헤드라인 영역 전용 스타일
 */

/* 헤드라인 영역 스타일 */
.headline-section {
    margin-bottom: var(--spacing-500);
}

/* 헤드라인 간격 통일 */
.headline-secondary {
    margin-bottom: 0 !important;
}

/* 작은 헤드라인 행 간격 */
.headline-section .row {
    margin-bottom: var(--spacing-400);
}

.headline-section .row:last-child {
    margin-bottom: 0;
}

/* 첫 번째 헤드라인 (메인) */
.headline-primary {
    position: relative;
    overflow: hidden;
    border-radius: var(--size-radius-500);
    box-shadow: var(--shadow-300);
    transition: all var(--transition-slow);
    margin-bottom: var(--spacing-400) !important;
}

.headline-primary:hover {
    box-shadow: var(--shadow-500);
    transform: translateY(-4px);
}

.headline-link {
    text-decoration: none !important;
    color: inherit;
    display: block;
}

.headline-link:hover {
    text-decoration: none !important;
}

.headline-image-wrapper {
    position: relative;
    width: 100%;
    height: 300px;
    overflow: hidden;
}

.headline-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    z-index: 0;
    transition: transform 0.3s ease;
}

.headline-primary:hover .headline-image {
    transform: scale(1.05);
}

.headline-no-image {
    background: var(--palette-primary); /* royalblue 단색 배경 */
}

.headline-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.3);
    z-index: 1;
    transition: background-color 0.3s ease;
}

.headline-primary:hover .headline-overlay {
    background-color: rgba(0, 0, 0, 0.1);
}

.headline-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: var(--spacing-500);
    z-index: 2;
    color: var(--palette-white);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-200);
}

.headline-title {
    font-size: var(--size-font-500);
    font-weight: var(--font-weight-bold);
    color: var(--palette-white);
    margin-bottom: 0;
    line-height: var(--line-height-tight);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    text-decoration: none !important;
    display: block;
    text-align: center;
}

.headline-excerpt {
    font-size: var(--size-font-300);
    color: rgba(255, 255, 255, 0.9);
    line-height: var(--line-height-base);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 두 번째 이후 헤드라인 */
.headline-secondary {
    position: relative;
    overflow: hidden;
    border-radius: var(--size-radius-400);
    box-shadow: var(--shadow-200);
    transition: all var(--transition-slow);
}

.headline-secondary:hover {
    box-shadow: var(--shadow-400);
    transform: translateY(-2px);
}

.headline-image-wrapper-small {
    position: relative;
    width: 100%;
    height: 150px;
    overflow: hidden;
}

.headline-image-small {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    z-index: 0;
    transition: transform 0.3s ease;
}

.headline-secondary:hover .headline-image-small {
    transform: scale(1.05);
}

.headline-no-image-small {
    background: var(--palette-primary); /* royalblue 단색 배경 */
}

.headline-overlay-small {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.3);
    z-index: 1;
    transition: background-color 0.3s ease;
}

.headline-secondary:hover .headline-overlay-small {
    background-color: rgba(0, 0, 0, 0.1);
}

.headline-content-small {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: var(--spacing-300);
    z-index: 2;
    color: var(--palette-white);
    text-align: right;
}

.headline-title-small {
    font-size: var(--size-font-400);
    font-weight: var(--font-weight-semibold);
    color: var(--palette-white);
    margin-bottom: 0;
    margin-left: auto;
    line-height: 1.4;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    text-decoration: none !important;
    text-align: right;
    width: fit-content;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 반응형 헤드라인 */
@media (max-width: 768px) {
    .headline-image-wrapper {
        height: 250px;
    }
    
    .headline-title {
        font-size: var(--size-font-400);
    }
    
    .headline-excerpt {
        font-size: var(--size-font-200);
        -webkit-line-clamp: 1;
        line-clamp: 1;
    }
    
    .headline-content {
        padding: var(--spacing-400);
    }
    
    .headline-title-small {
        font-size: var(--size-font-300);
    }
    
    .headline-image-wrapper-small {
        height: 125px;
    }
}

/* 태블릿 크기 */
@media (min-width: 769px) and (max-width: 1024px) {
    .headline-image-wrapper {
        height: 280px;
    }
    
    .headline-image-wrapper-small {
        height: 140px;
    }
}

/* 날짜 스타일 - 제목과 동일한 스타일 적용 */
.headline-content .text-white-50.small,
.headline-content-small .text-white-50.small {
    color: white !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    font-weight: 400;
}

/* 다크모드 헤드라인 개선 */
[data-bs-theme="dark"] .headline-primary {
    box-shadow: var(--shadow-300);
}

[data-bs-theme="dark"] .headline-primary:hover {
    box-shadow: var(--shadow-500);
}

[data-bs-theme="dark"] .headline-secondary {
    box-shadow: var(--shadow-200);
}

[data-bs-theme="dark"] .headline-secondary:hover {
    box-shadow: var(--shadow-400);
}

/* 다크모드 헤드라인 제목 - 일반 페이지에서 사용될 때 */
[data-bs-theme="dark"] .headline-title:not(.headline-content .headline-title) {
    color: var(--text-primary);
    text-shadow: none;
}

