/* ============================================
   금융 뉴스 페이지 - 최신 디자인
   Modern Financial News Design
   ============================================ */

/* === Hero Section (market.html 스타일) === */
.hero-section.start {
    background: radial-gradient(circle at 40% 70%, #0b2242 0%, #15161b 100%);
    color: var(--color-text-light);
    height: auto;
    min-height: 60vh;
    max-height: 70vh;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    position: relative;
    padding: 3rem 0 2rem 0;
    text-align: left;
    z-index: 1;
    overflow: hidden;
    margin-top: calc(-1 * var(--navbar-height));
    padding-top: calc(var(--navbar-height) + 1.5rem);
}

.cc-svg-overlay {
    position: absolute;
    top: calc(-1 * var(--navbar-height));
    left: 0;
    width: 100%;
    height: calc(100% + var(--navbar-height));
    max-height: 70vh;
    z-index: 10;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cc-svg-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.6;
    filter: brightness(1.0);
}

.hero-section .container {
    position: relative;
    z-index: 50 !important;
    margin-left: 8.75rem !important;
    text-align: left !important;
}

.hero-section .headline-big {
    font-family: var(--font-primary);
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--color-text-light);
    margin-bottom: 1.5rem !important;
    margin-top: 0 !important;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.8), 0 0 10px rgba(0,0,0,0.5);
    position: relative;
    z-index: 50 !important;
    line-height: 1.2;
}

.hero-section .small_words h4 {
    font-family: var(--font-korean);
    font-size: 1.25rem;
    font-weight: 300;
    color: var(--color-text-light);
    opacity: 0.85;
    line-height: 1.6;
    margin-bottom: 0;
    margin-top: 0;
    text-shadow: 1px 1px 4px rgba(0,0,0,0.6), 0 0 6px rgba(0,0,0,0.3);
    position: relative;
    z-index: 50 !important;
}

.hero-meta-info {
    margin-top: 1.5rem;
    position: relative;
    z-index: 50 !important;
    display: flex;
    justify-content: flex-start;
    align-items: center;
}

.hero-date-badge {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: inline-flex;
    align-items: center;
    transition: all 0.3s ease;
}

.hero-date-badge:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

.btn-hero-update {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-hero-update:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    color: white;
}

.fade-in-delay {
    animation: fadeInUp 0.8s ease-out forwards;
    opacity: 0;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === Main Content === */
.main-content {
    background: linear-gradient(to bottom, #f8f9fa 0%, #ffffff 100%);
    min-height: 100vh;
}

/* === News Grid Container === */
.news-grid-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin: 3rem 0;
}

/* === Modern News Card === */
.news-card-modern {
    background: #ffffff;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.05);
    animation: slideInUp 0.6s ease-out forwards;
    opacity: 0;
    cursor: pointer;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.news-card-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, #0A2342, #1a4d5c);
    transform: scaleY(0);
    transform-origin: top;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.news-card-modern:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(10, 35, 66, 0.15);
    border-color: rgba(10, 35, 66, 0.1);
}

.news-card-modern:hover::before {
    transform: scaleY(1);
}

/* === News Card Header === */
.news-card-header-modern {
    margin-bottom: 1.5rem;
}

.news-header-top {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.news-category-badge {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    color: #0A2342;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(10, 35, 66, 0.1);
    transition: all 0.3s ease;
}

.news-category-badge:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(10, 35, 66, 0.15);
}

.news-importance-badge {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
    animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
    }
    50% {
        box-shadow: 0 4px 16px rgba(255, 107, 107, 0.5);
    }
}

.news-title-modern {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0A2342;
    line-height: 1.4;
    margin: 0;
    transition: color 0.3s ease;
}

.news-card-modern:hover .news-title-modern {
    color: #1a4d5c;
}

/* === News Meta Info === */
.news-meta-modern {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

.news-source-modern,
.news-time-modern {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #64748b;
    font-weight: 500;
}

.news-source-modern i,
.news-time-modern i {
    color: #94a3b8;
    font-size: 0.85rem;
}

.news-source-modern {
    color: #3b82f6;
    font-weight: 600;
}

/* === News Summary === */
.news-summary-modern {
    color: #475569;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.news-summary-modern p {
    margin: 0;
}

/* === News Card Footer === */
.news-card-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.news-footer-wrapper {
    position: relative;
    display: inline-block;
}

/* === Modern News Link Button === */
.news-link-btn-modern {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: linear-gradient(135deg, #0A2342 0%, #1a4d5c 100%);
    color: white;
    text-decoration: none;
    padding: 0.875rem 1.75rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(10, 35, 66, 0.2);
    position: relative;
    overflow: visible;
}

.news-link-btn-modern::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 ease;
}

.news-link-btn-modern:hover::before {
    left: 100%;
}

.news-link-btn-modern:hover {
    background: linear-gradient(135deg, #1a4d5c 0%, #0A2342 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(10, 35, 66, 0.3);
    color: white;
    text-decoration: none;
}

.news-link-btn-modern:active {
    transform: translateY(0);
}

.btn-text {
    display: flex;
    align-items: center;
    position: relative;
    z-index: 1;
}

/* === Reward Badge === */
.reward-badge-modern {
    position: absolute;
    top: -12px;
    right: -8px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border-radius: 8px;
    padding: 0.4rem 0.75rem;
    font-size: 0.7rem;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
    border: 1.5px solid rgba(255, 255, 255, 0.9);
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    letter-spacing: 0.3px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    white-space: nowrap;
    z-index: 10;
    animation: float-badge 3s ease-in-out infinite;
}

@keyframes float-badge {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

.reward-badge-modern:hover {
    transform: translateY(-8px) scale(1.05);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
    animation: none;
}

.reward-badge-modern i {
    font-size: 0.65rem;
}

.reward-claimed-modern {
    position: absolute;
    top: -12px;
    right: -8px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border-radius: 8px;
    padding: 0.4rem 0.75rem;
    font-size: 0.7rem;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
    border: 1.5px solid rgba(255, 255, 255, 0.9);
    display: none;
    align-items: center;
    gap: 0.25rem;
    letter-spacing: 0.3px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    white-space: nowrap;
    z-index: 10;
    animation: checkmark-appear 0.5s ease-out;
}

.reward-claimed-modern.show {
    display: inline-flex;
}

.reward-claimed-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.reward-claimed-modern i {
    font-size: 0.65rem;
}

@keyframes checkmark-appear {
    0% {
        opacity: 0;
        transform: scale(0.5) rotate(-180deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

/* === Alert Styles === */
.news-alert {
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* === Empty State === */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 20px;
    border: 2px dashed #cbd5e1;
}

.empty-state i {
    font-size: 4rem;
    color: #94a3b8;
    margin-bottom: 1.5rem;
    opacity: 0.6;
}

.empty-state h3 {
    color: #475569;
    font-size: 1.75rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.empty-state p {
    color: #64748b;
    font-size: 1.1rem;
    margin: 0;
    line-height: 1.6;
}

/* === Yesterday Section === */
.yesterday-section-modern {
    margin: 4rem 0;
    padding: 0;
    background: transparent;
}

.yesterday-header-modern {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
    padding: 2rem;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(10, 35, 66, 0.08);
    border: 1px solid rgba(10, 35, 66, 0.08);
    transition: all 0.3s ease;
}

.yesterday-header-modern:hover {
    box-shadow: 0 8px 30px rgba(10, 35, 66, 0.12);
    transform: translateY(-2px);
}

.yesterday-header-left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.yesterday-icon-modern {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #0A2342 0%, #1a4d5c 100%);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    box-shadow: 0 4px 12px rgba(10, 35, 66, 0.2);
    flex-shrink: 0;
}

.yesterday-title-modern {
    font-size: 1.75rem;
    font-weight: 700;
    color: #0A2342;
    margin: 0 0 0.5rem 0;
    line-height: 1.2;
}

.yesterday-subtitle-modern {
    font-size: 0.95rem;
    color: #64748b;
    margin: 0;
    font-weight: 400;
}

.btn-load-yesterday-modern {
    background: linear-gradient(135deg, #0A2342 0%, #1a4d5c 100%);
    color: white;
    border: none;
    padding: 0.875rem 1.75rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(10, 35, 66, 0.2);
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
}

.btn-load-yesterday-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(10, 35, 66, 0.3);
    color: white;
    background: linear-gradient(135deg, #1a4d5c 0%, #0A2342 100%);
}

.btn-load-yesterday-modern:active {
    transform: translateY(0);
}

.btn-load-yesterday-modern:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Yesterday Loading State */
.yesterday-loading-modern {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.loading-spinner-modern {
    display: inline-flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.spinner-ring {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0A2342 0%, #1a4d5c 100%);
    animation: spinner-bounce 1.4s ease-in-out infinite both;
}

.spinner-ring:nth-child(1) {
    animation-delay: -0.32s;
}

.spinner-ring:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes spinner-bounce {
    0%, 80%, 100% {
        transform: scale(0);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

.loading-text-modern {
    color: #64748b;
    font-size: 1rem;
    font-weight: 500;
    margin: 0;
}

/* Yesterday Empty State */
.yesterday-empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    border-radius: 16px;
    border: 2px dashed rgba(10, 35, 66, 0.1);
}

.empty-icon-wrapper {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, #e2e8f0 0%, #f1f5f9 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: #94a3b8;
}

.empty-title-modern {
    font-size: 1.5rem;
    font-weight: 600;
    color: #475569;
    margin: 0 0 0.75rem 0;
}

.empty-text-modern {
    font-size: 1rem;
    color: #64748b;
    margin: 0;
    line-height: 1.6;
}

/* Yesterday Content */
.yesterday-content-modern {
    margin-top: 0;
}

/* Yesterday Error State */
.yesterday-error-modern {
    padding: 2rem;
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border-radius: 16px;
    border: 1px solid rgba(239, 68, 68, 0.2);
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
}

.error-icon-wrapper {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.2);
}

.error-content {
    flex: 1;
}

.error-title-modern {
    font-size: 1.1rem;
    font-weight: 600;
    color: #991b1b;
    margin: 0 0 0.5rem 0;
}

.error-text-modern {
    font-size: 0.95rem;
    color: #7f1d1d;
    margin: 0;
    line-height: 1.5;
}

/* === Info Section === */
.info-section-modern {
    margin: 4rem 0;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.info-card-modern {
    background: white;
    padding: 2.5rem;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.info-card-modern:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(10, 35, 66, 0.15);
}

.info-icon-modern {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, #0A2342 0%, #1a4d5c 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    box-shadow: 0 4px 12px rgba(10, 35, 66, 0.2);
    transition: all 0.3s ease;
}

.info-card-modern:hover .info-icon-modern {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 6px 20px rgba(10, 35, 66, 0.3);
}

.info-title-modern {
    font-size: 1.25rem;
    font-weight: 700;
    color: #0A2342;
    margin-bottom: 1rem;
}

.info-text-modern {
    color: #64748b;
    line-height: 1.6;
    margin: 0;
    font-size: 0.95rem;
}

/* === Reward Notification === */
.reward-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 1.25rem 1.75rem;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.4);
    z-index: 1000;
    animation: slideInRight 0.4s ease-out;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* === Responsive Design === */
@media (max-width: 768px) {
    .hero-section.start {
        min-height: 45vh;
        max-height: 55vh;
        padding: 1.5rem 0 1rem 0;
        padding-top: calc(var(--navbar-height) + 0.75rem);
    }
    
    .hero-section .container {
        margin-left: 1rem !important;
        padding: 0 1rem;
    }
    
    .hero-section .headline-big {
        font-size: 2rem;
        margin-bottom: 0.75rem !important;
    }
    
    .hero-section .small_words h4 {
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
    }
    
    .hero-meta-info {
        margin-top: 0.75rem;
    }
    
    .news-card-modern {
        padding: 1.25rem;
        margin-bottom: 0;
    }
    
    .news-title-modern {
        font-size: 1.1rem;
    }
    
    .news-grid-container {
        gap: 1rem;
        margin: 2rem 0;
    }
    
    .main-content,
    #news-main-content {
        padding-top: 0 !important;
        padding-bottom: 1.5rem;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .section-header-modern {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .yesterday-header-modern {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
        padding: 1.5rem;
    }
    
    .yesterday-header-left {
        width: 100%;
    }
    
    .btn-load-yesterday-modern {
        width: 100%;
        justify-content: center;
    }
    
    .yesterday-section-modern {
        margin: 3rem 0;
    }
}

@media (max-width: 480px) {
    .hero-section.start {
        min-height: 40vh;
        max-height: 50vh;
        padding: 1rem 0 0.75rem 0;
        padding-top: calc(var(--navbar-height) + 0.5rem);
    }
    
    .hero-section .headline-big {
        font-size: 1.75rem;
        margin-bottom: 0.5rem !important;
    }
    
    .hero-section .small_words h4 {
        font-size: 0.85rem;
    }
    
    .hero-meta-info {
        margin-top: 0.5rem;
    }
    
    .news-card-modern {
        padding: 1rem;
    }
    
    .news-title-modern {
        font-size: 1rem;
    }
    
    .news-grid-container {
        gap: 0.75rem;
        margin: 1.5rem 0;
    }
    
    .news-link-btn-modern {
        padding: 0.75rem 1.25rem;
        font-size: 0.85rem;
    }
    
    .main-content,
    #news-main-content {
        padding-top: 0 !important;
        padding-bottom: 1rem;
    }
}

/* === Loading Animation === */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #0A2342;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* === Scroll Animation === */
@media (prefers-reduced-motion: no-preference) {
    .news-card-modern {
        animation: slideInUp 0.6s ease-out forwards;
    }
}

@media (prefers-reduced-motion: reduce) {
    .news-card-modern,
    .fade-in-delay {
        animation: none;
        opacity: 1;
    }
}