/* ===================================
   HOMEPAGE STYLES
   =================================== */

/* Central Bank Overview Section */
.cb-overview {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    padding: 3rem 0;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.cb-card {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.10);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06), 0 1px 4px rgba(0, 0, 0, 0.04);
    position: relative;
    overflow: hidden;
    min-height: 580px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.cb-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.10), 0 8px 16px rgba(0, 0, 0, 0.06);
    border-color: rgba(0, 0, 0, 0.14);
}

.clickable-card {
    cursor: pointer;
}

.clickable-card:hover {
    border-top-width: 4px;
}

.cb-card.fed { border-top: 3px solid var(--success); }
.cb-card.ecb { border-top: 3px solid var(--info); }
.cb-card.boe { border-top: 3px solid #7c3aed; }
.cb-card.rba { border-top: 3px solid #007C4A; }
.cb-card.global { border-top: 3px solid var(--warning); }
.cb-card.boj { border-top: 3px solid #BC002D; }
.cb-card.rbi { border-top: 3px solid #FF9933; }
.cb-card.boc { border-top: 3px solid #FF0000; }

/* Simplified cards (without probability displays) */
.cb-card.simplified {
    min-height: 320px;
}

.cb-card .cb-icon {
    font-size: 4rem !important;
    margin-bottom: 1rem !important;
    display: block !important;
    line-height: 1 !important;
    text-align: center !important;
    width: 100% !important;
}

/* Preserve native flag-icon proportions at the card icon size */
.cb-card .cb-icon .fi {
    font-size: inherit !important;
    line-height: 1 !important;
    vertical-align: middle !important;
    display: inline-block !important;
    transform: scale(1.1);
    transform-origin: center center;
}

.cb-card.global .cb-icon {
    font-size: 2.5rem;
}

.cb-title {
    font-family: 'Roboto Slab', serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--navy);
    margin: 0 0 1rem 0;
    min-height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cb-meeting-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0.5rem 0 0.25rem 0;
    font-weight: 500;
}

.cb-meeting-date {
    font-family: 'Roboto Slab', serif;
    font-size: 1rem;
    font-weight: 600;
    color: var(--navy);
    margin: 0 0 1rem 0;
}

/* Countdown */
.countdown {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 1rem 0;
}

.countdown-box {
    background: linear-gradient(135deg, var(--navy) 0%, #334155 100%);
    color: var(--white);
    border-radius: 10px;
    padding: 0.875rem 0.625rem;
    min-width: 55px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.countdown-number {
    font-family: 'Roboto Slab', serif;
    font-size: 1.5rem;
    font-weight: 700;
    display: block;
    line-height: 1;
}

.countdown-label {
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    opacity: 0.8;
    margin-top: 0.25rem;
}

/* Current Rate Display */
.current-rate {
    font-family: 'Roboto Slab', serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--navy);
    margin: 1rem 0 0.5rem 0;
    padding: 0.625rem;
    background: rgba(37, 99, 235, 0.04);
    border-radius: 8px;
    border: 1px solid rgba(37, 99, 235, 0.1);
}

/* Theoretical Rate Display */
.theoretical-rate {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin: 0.25rem 0 0.5rem 0;
    line-height: 1.3;
}

.theoretical-rate .rate-value {
    font-weight: 600;
    color: var(--navy);
}

.theoretical-rate .stance {
    font-weight: 600;
}

.theoretical-rate .stance.dovish {
    color: var(--success);
}

.theoretical-rate .stance.hawkish {
    color: var(--danger);
}

.theoretical-rate .stance.neutral {
    color: var(--warning);
}

.theoretical-rate a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.theoretical-rate a:hover {
    text-decoration: underline;
}

/* Probability Display */
.prob-section-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin: 1rem 0 0.5rem 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.prob-display {
    background: rgba(37, 99, 235, 0.05);
    border-radius: 6px;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    border: 1px solid rgba(37, 99, 235, 0.15);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.prob-item {
    font-size: 0.75rem;
    color: var(--text-secondary);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.4rem 0.75rem;
    background: var(--white);
    border-radius: 4px;
    border: 1px solid var(--border);
    transition: all 0.2s ease;
}

.prob-item:hover {
    background: rgba(37, 99, 235, 0.02);
    border-color: rgba(37, 99, 235, 0.2);
}

.prob-item strong {
    color: var(--navy);
    font-weight: 700;
}

.prob-direction {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

.prob-arrow {
    font-size: 1rem;
    font-weight: 700;
}

.prob-arrow.hike {
    color: var(--danger);
}

.prob-arrow.hold {
    color: var(--warning);
}

.prob-arrow.cut {
    color: var(--success);
}

.prob-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 400;
}

/* CME FedWatch Styles */
.cme-fedwatch-link {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0 0.5rem 0;
    text-align: center;
}

.cme-fedwatch-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.cme-fedwatch-brand {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--navy);
    display: block;
    margin-bottom: 0.5rem;
}

.cme-fedwatch-description {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.cme-fedwatch-button {
    display: inline-block;
    background: var(--primary);
    color: var(--white);
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.cme-fedwatch-button:hover {
    background: var(--primary-dark);
    color: var(--white);
    transform: translateY(-2px);
}

.cme-fedwatch-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px solid #dee2e6;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    margin: 2rem 0;
}

.cme-logo-placeholder {
    font-size: 4rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.cme-fedwatch-card h4 {
    font-family: 'Roboto Slab', serif;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 0.5rem;
}

.cme-fedwatch-card .subtitle {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.cme-fedwatch-card p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

/* Global Policy Display */
.global-policy-display {
    background: rgba(37, 99, 235, 0.05);
    border-radius: 6px;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    border: 1px solid rgba(37, 99, 235, 0.15);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.policy-trend-item {
    font-size: 0.75rem;
    color: var(--text-secondary);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.4rem 0.75rem;
    background: var(--white);
    border-radius: 4px;
    border: 1px solid var(--border);
}

.policy-trend-direction {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

.policy-trend-icon {
    font-size: 1rem;
}

.policy-trend-icon.tightening {
    color: var(--danger);
}

.policy-trend-icon.neutral {
    color: var(--warning);
}

.policy-trend-icon.easing {
    color: var(--success);
}

.prob-footnote {
    font-size: 0.65rem;
    color: var(--text-muted);
    margin: 0.5rem 0 0 0;
    line-height: 1.3;
}

.prob-footnote a {
    color: var(--primary);
    text-decoration: none;
}

.prob-footnote a:hover {
    text-decoration: underline;
}

/* Global Stats */
.global-stats {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 1rem 0;
}

.global-stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: linear-gradient(135deg, var(--navy) 0%, #334155 100%);
    color: var(--white);
    border-radius: 10px;
    padding: 0.875rem 0.625rem;
    min-width: 60px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.stat-number {
    font-family: 'Roboto Slab', serif;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
}

.stat-label {
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    opacity: 0.8;
    margin-top: 0.25rem;
    text-align: center;
}

/* News Summary Section */
.news-summary-section {
    background: var(--white);
    padding: 3rem 0;
    border-bottom: 1px solid var(--border);
}

.news-summary-card {
    background: var(--white);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 14px;
    padding: 1.75rem;
    height: 100%;
    box-shadow: var(--shadow);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.news-summary-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-3px);
}

.news-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border);
}

.news-card-header h5 {
    font-family: 'Roboto Slab', serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--navy);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.bank-flag {
    font-size: 1.5rem;
    line-height: 1;
}

.news-count {
    background: var(--navy);
    color: var(--white);
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 600;
}

.news-items-preview {
    min-height: 120px;
    margin-bottom: 1rem;
}

.news-loading-mini {
    text-align: center;
    padding: 2rem 0;
    color: var(--text-muted);
}

.news-item-mini {
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.news-item-mini:last-child {
    border-bottom: none;
}

.news-item-mini .news-time {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 500;
}

.news-card-footer {
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
}

.news-view-all {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.news-view-all:hover {
    color: var(--primary-light);
    text-decoration: underline;
}

/* Research Section */
.research-section {
    background: var(--white);
    padding: 3rem 0;
    border-bottom: 1px solid var(--border);
}

.section-header {
    background: linear-gradient(160deg, var(--navy) 0%, var(--primary) 100%);
    color: var(--white);
    padding: 1.75rem 2.25rem;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
    margin-bottom: 2rem;
}

.section-header::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="grid2" width="20" height="20" patternUnits="userSpaceOnUse"><path d="M 20 0 L 0 0 0 20" fill="none" stroke="%23ffffff" stroke-width="0.5" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid2)"/></svg>');
    pointer-events: none;
}

.section-header:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

.section-header-content {
    flex: 1;
    position: relative;
    z-index: 2;
}

.section-title {
    font-family: 'Roboto Slab', serif;
    font-weight: 700;
    color: var(--white);
    margin: 0 0 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.section-subtitle {
    opacity: 0.9;
    margin: 0;
}

.section-toggle {
    font-size: 1.5rem;
    transition: transform 0.3s ease;
    position: relative;
    z-index: 2;
}

.section-header[aria-expanded="false"] .section-toggle {
    transform: rotate(180deg);
}

.info-card {
    background: var(--white);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 14px;
    padding: 2rem;
    height: 100%;
    box-shadow: var(--shadow);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.clickable-info-card {
    cursor: pointer;
}

.clickable-info-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    border-color: rgba(0, 0, 0, 0.1);
}

.info-card h5 {
    font-family: 'Roboto Slab', serif;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--navy);
    margin: 0 0 1rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.info-card p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.info-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.info-card ul li {
    padding: 0.5rem 0;
    color: var(--text-secondary);
    line-height: 1.5;
}

.info-card ul li strong {
    color: var(--navy);
}

/* Main Content Wrapper */
.main-wrapper {
    background: var(--white);
    margin: 2.5rem auto;
    max-width: 1280px;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

/* Tab Navigation */
.nav-tabs {
    background: linear-gradient(135deg, var(--light) 0%, var(--lighter) 100%);
    border-bottom: 2px solid var(--border);
    margin: 0;
    padding: 0;
    display: flex;
}

.nav-tabs .nav-item {
    flex: 1;
    position: relative;
}

.nav-tabs .nav-item:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 20%;
    bottom: 20%;
    width: 1px;
    background: var(--border);
}

.nav-tabs .nav-link {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
    padding: 1.5rem 1rem;
    border: none;
    border-bottom: 3px solid transparent;
    background: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    border-radius: 0;
    width: 100%;
}

.nav-tabs .nav-link:hover {
    color: var(--primary);
    background: rgba(37, 99, 235, 0.05);
    border-bottom-color: var(--primary);
}

.nav-tabs .nav-link.active {
    color: var(--white);
    background: var(--navy);
    border-bottom-color: var(--primary);
    border-top: 2px solid var(--primary);
    border-left: 2px solid var(--primary);
    border-right: 2px solid var(--primary);
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Tab Content */
.tab-content {
    padding: 2.5rem;
    background: var(--white);
    min-height: 600px;
}

.tab-header {
    margin-bottom: 2.5rem;
    padding-bottom: 1.25rem;
    border-bottom: 2px solid var(--border);
}

.tab-header h3 {
    font-family: 'Roboto Slab', serif;
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--navy);
    margin: 0 0 0.75rem 0;
}

.tab-header p {
    color: var(--text-secondary);
    margin: 0;
}

.analysis-card {
    background: var(--light);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 12px;
    padding: 1.75rem;
    transition: box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.analysis-card:hover {
    box-shadow: var(--shadow);
}

.analysis-card h6 {
    font-family: 'Roboto Slab', serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--navy);
    margin: 0 0 1rem 0;
}

.analysis-card ul {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem 0;
}

.analysis-card ul li {
    padding: 0.5rem 0;
    color: var(--text-secondary);
    line-height: 1.5;
    border-bottom: 1px solid var(--border);
}

.analysis-card ul li:last-child {
    border-bottom: none;
}

/* Coming Soon Styles */
.coming-soon-card {
    background: linear-gradient(135deg, var(--light) 0%, var(--lighter) 100%);
    border: 2px dashed var(--border);
    border-radius: 16px;
    padding: 2.5rem;
    text-align: center;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 300px;
}

.coming-soon-card h4 {
    font-family: 'Roboto Slab', serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--navy);
    margin: 0 0 1rem 0;
}

.coming-soon h4 {
    font-family: 'Roboto Slab', serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--navy);
    margin: 0 0 1rem 0;
}
