/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Encode+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary-color: #D32F2F;
    /* Red inspired by VnBusiness/news style */
    --primary-gradient: linear-gradient(135deg, #FF5252 0%, #D32F2F 100%);
    --secondary-color: #263238;
    --accent-color: #FFC107;
    --bg-color: #F7F9FC;
    --card-bg: #FFFFFF;
    --text-main: #37474F;
    --text-muted: #78909C;
    --border-radius: 12px;
    --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 8px 15px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Encode Sans', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    /* Prevent horizontal scroll */
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background-color: #F8F9FA;
    background-image:
        linear-gradient(120deg, #FDFBFB 0%, #EBEDEE 100%),
        radial-gradient(circle at 15% 50%, rgba(211, 47, 47, 0.03) 0%, transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(33, 150, 243, 0.03) 0%, transparent 25%);
    background-size: cover;
}

/* Subtle Grid Pattern Overlay */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background-image:
        linear-gradient(rgba(200, 200, 200, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(200, 200, 200, 0.1) 1px, transparent 1px);
    background-size: 40px 40px;
    opacity: 0.5;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background: transparent;
    /* Removed card background */
    box-shadow: none;
    /* Removed shadow */
    min-height: 100vh;
    padding-bottom: 60px;
}

/* Typography */
h1,
h2,
h3,
h4 {
    color: var(--secondary-color);
    font-weight: 700;
    line-height: 1.3;
}

.hero {
    position: relative;
    padding: 60px 0 40px;
    /* Removed side padding, centering handled by alignment */
    background: transparent;
    /* Removed white bg */
    overflow: visible;
    /* Allow circle to overflow if needed */
    text-align: center;
}

.hero::before {
    display: none;
    /* Hide top bar */
}

.hero-tag {
    display: inline-block;
    padding: 6px 12px;
    background: rgba(211, 47, 47, 0.1);
    color: var(--primary-color);
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 25px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hero h1 {
    font-size: 2.2rem;
    margin-bottom: 25px;
    color: var(--secondary-color);
    line-height: 1.2;
}

.big-highlight {
    display: block;
    font-size: 4.5rem;
    font-weight: 800;
    color: var(--secondary-color);
    position: relative;
    z-index: 1;
    margin-bottom: 10px;
    display: inline-block;
    /* To wrap dimensions around text */
}

.big-highlight::after {
    content: '';
    position: absolute;
    width: 120px;
    height: 120px;
    background: #FF5252;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: -1;
    opacity: 0.2;
}

.sapo {
    font-size: 1.15rem;
    color: #546E7A;
    font-weight: 500;
    margin-bottom: 30px;
    max-width: 90%;
    margin-left: auto;
    margin-right: auto;
    /* Removed border-left for centered look */
    border-left: none;
    padding-left: 0;
}

/* Highlights */
.highlights-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    padding: 0 0 30px 0;
    /* Adjusted padding */
}

.stat-card {
    background: white;
    padding: 20px 15px;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    /* Enhanced shadow for standalone card */
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: rgba(211, 47, 47, 0.2);
}

.stat-number {
    display: block;
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--primary-color);
    line-height: 1;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-muted);

    font-weight: 500;
}

/* Modules */
/* Modules */
.module {
    margin: 40px 0;
    /* Removed horizontal margin */
    padding: 0;
    /* Removed padding */
    background: transparent;
    /* Removed white bg */
    border-radius: 0;
    box-shadow: none;
    /* Removed shadow */
    border: none;
}

.module-title {
    font-size: 1.4rem;
    padding-bottom: 15px;
    margin-bottom: 20px;
    border-bottom: 2px solid #E0E0E0;
    /* Thicker, more visible divider on transparent bg */
    display: flex;
    align-items: center;
    gap: 10px;
    color: #263238;
}

.module-title::before {
    content: '';
    display: block;
    width: 6px;
    height: 24px;
    background: var(--primary-color);
    border-radius: 3px;
}

/* Chart */
.chart-container {
    width: 100%;
    overflow-x: auto;
}

.chart-svg {
    width: 100%;
    min-width: 300px;
    height: auto;
}

/* Path Animation */
.chart-line {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: dash 2s ease-out forwards;
}

@keyframes dash {
    to {
        stroke-dashoffset: 0;
    }
}

.chart-point {
    opacity: 0;
    animation: fadeIn 0.5s ease-out forwards;
    animation-delay: 1.5s;
    transform-origin: center;
    transition: transform 0.2s;
}

.chart-point:hover {
    transform: scale(1.5);
    cursor: pointer;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

/* Table / Filter */
.filter-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.bank-checkbox {
    display: none;
}

.bank-label {
    padding: 8px 16px;
    background: #f0f4f8;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid transparent;
}

.bank-checkbox:checked+.bank-label {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 4px 10px rgba(211, 47, 47, 0.3);
}

.comparison-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 8px;
}

/* Responsive Table */
.comparison-table th {
    text-align: left;
    padding: 12px;
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.comparison-table tr.bank-row {
    background: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.comparison-table tr.bank-row:hover {
    transform: scale(1.01);
}

.comparison-table td {
    padding: 15px;
    border-top: 1px solid #f0f0f0;
    border-bottom: 1px solid #f0f0f0;
}

.comparison-table td:first-child {
    border-left: 1px solid #f0f0f0;
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
    font-weight: 700;
    color: var(--primary-color);
}

.comparison-table td:last-child {
    border-right: 1px solid #f0f0f0;
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
    font-weight: 600;
}

/* Accordion */
.accordion-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.accordion-item {
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    transition: var(--transition);
}

.accordion-item.active {
    box-shadow: var(--shadow-md);
    border-color: rgba(211, 47, 47, 0.1);
}

.accordion-header {
    padding: 18px 20px;
    background: white;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 700;
    color: var(--secondary-color);
}

.accordion-icon {
    width: 24px;
    height: 24px;
    background: #f5f5f5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.accordion-item.active .accordion-icon {
    transform: rotate(180deg);
    background: var(--primary-color);
    color: white;
}

.accordion-content {
    height: 0;
    overflow: hidden;
    transition: height 0.3s ease;
    background: #fafafa;
}

.accordion-inner {
    padding: 20px;
    color: #555;
    font-size: 0.95rem;
}

/* Expand / Read More */
.read-more-wrapper {
    margin-top: 15px;
    text-align: left;
}

.read-more-btn {
    background: none;
    border: none;
    color: var(--primary-color);
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 0;
    font-size: 0.9rem;
    transition: var(--transition);
}

.read-more-btn:hover {
    gap: 8px;
    text-decoration: underline;
}

.hidden-content {
    display: none;
    margin-top: 15px;
    padding: 20px;
    background: white;
    border-left: 3px solid var(--primary-color);
    border-radius: 0 8px 8px 0;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
}

.hidden-content p {
    margin-bottom: 15px;
}

.source-note {
    text-align: right;
    font-size: 0.8rem;
    color: #999;
    margin-top: 20px;
    padding-right: 20px;
    font-style: italic;
}

/* Mobile Responsive */
@media (max-width: 600px) {
    .highlights-grid {
        grid-template-columns: 1fr;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .comparison-table {
        display: block;
        width: 100%;
    }

    .comparison-table thead {
        display: none;
        /* Hide headers on very small screens, convert to block view */
    }

    .comparison-table tr.bank-row {
        display: block;
        margin-bottom: 15px;
        border: 1px solid #eee;
        border-radius: 8px;
    }

    .comparison-table td {
        display: flex;
        justify-content: space-between;
        border: none;
        border-bottom: 1px dashed #eee;
        padding: 10px 15px;
    }

    .comparison-table td::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--text-muted);
        font-size: 0.85rem;
    }
}

/* Bank Card Grid System */
.bank-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.bank-card {
    background: white;
    border-radius: 12px;
    padding: 0;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    border: 1px solid #eee;
    transition: all 0.3s ease;
    overflow: hidden;
    position: relative;
    cursor: pointer;
}

.bank-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* Card Header & Color Levels */
.card-header {
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #f0f0f0;
}

.bank-name {
    font-weight: 800;
    font-size: 1.1rem;
    color: #333;
}

.rate-badge {
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

/* Level Colors */
.level-red {
    border-top: 4px solid #D32F2F;
}

.level-red .rate-badge {
    background: #FFEBEE;
    color: #D32F2F;
}

.level-yellow {
    border-top: 4px solid #FFC107;
}

.level-yellow .rate-badge {
    background: #FFF8E1;
    color: #F57F17;
}

.level-green {
    border-top: 4px solid #388E3C;
}

.level-green .rate-badge {
    background: #E8F5E9;
    color: #2E7D32;
}


/* Card Body */
.card-body {
    padding: 20px;
}

.card-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 0.95rem;
}

.card-row .label {
    color: #777;
}

.card-row .value {
    font-weight: 600;
    color: #333;
}

.highlight-row .value {
    color: var(--primary-color);
    font-size: 1.1rem;
    font-weight: 800;
}

.arrow {
    color: #999;
    margin: 0 5px;
    font-weight: normal;
}

/* Hidden Details & Toggle */
.card-details-toggle {
    text-align: center;
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px dashed #eee;
    color: #555;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    transition: color 0.3s;
}

.bank-card:hover .card-details-toggle {
    color: var(--primary-color);
}

.toggle-icon {
    font-size: 0.7rem;
    transition: transform 0.3s;
}

.bank-card.expanded .toggle-icon {
    transform: rotate(180deg);
}

.card-hidden-details {
    height: 0;
    overflow: hidden;
    transition: height 0.3s ease;
    opacity: 0;
}

.bank-card.expanded .card-hidden-details {
    height: auto;
    /* Fallback for smooth animation needing max-height */
    padding-top: 15px;
    opacity: 1;
}

.warning-box,
.info-box {
    background: #FFF3E0;
    color: #E65100;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.info-box {
    background: #E3F2FD;
    color: #0277BD;
}

.detail-note {
    font-size: 0.85rem;
    color: #666;
    line-height: 1.4;
    font-style: italic;
}

/* Timeline Storytelling */
.timeline-container {
    position: relative;
    padding: 20px 0;
    margin: 0 10px;
}

/* Vertical Line */
.timeline-line {
    position: absolute;
    left: 20px;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(to bottom, #FFC107 0%, #FF9800 50%, #D32F2F 100%);
    border-radius: 2px;
    z-index: 1;
}

.timeline-card {
    position: relative;
    margin-left: 50px;
    /* Space for line */
    margin-bottom: 40px;
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    opacity: 0;
    /* Hidden initially */
    transform: translateY(30px);
    transition: all 0.6s cubic-bezier(0.22, 1, 0.36, 1);
    border-left: 5px solid #ccc;
}

.timeline-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.timeline-dot {
    position: absolute;
    left: -38px;
    /* On the timeline line */
    top: 25px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: white;
    border: 4px solid #ccc;
    z-index: 2;
    transition: all 0.4s ease;
}

.timeline-card.visible .timeline-dot {
    transform: scale(1.2);
}

/* Specific Card Styles */
.card-yellow {
    border-left-color: #FBC02D;
}

.card-yellow .timeline-dot {
    border-color: #FBC02D;
    box-shadow: 0 0 0 4px rgba(251, 192, 45, 0.2);
}

.card-yellow .timeline-rate {
    color: #FBC02D;
}

.card-orange {
    border-left-color: #F57C00;
}

.card-orange .timeline-dot {
    border-color: #F57C00;
    box-shadow: 0 0 0 4px rgba(245, 124, 0, 0.2);
}

.card-orange .timeline-rate {
    color: #F57C00;
}

.card-red {
    border-left-color: #D32F2F;
    background: #FFF5F5;
    /* Subtle red bg for impact */
}

.card-red .timeline-dot {
    border-color: #D32F2F;
    box-shadow: 0 0 0 4px rgba(211, 47, 47, 0.3);
}

.card-red .timeline-rate {
    color: #D32F2F;
}

/* Content Styles */
.timeline-year {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #777;
    margin-bottom: 5px;
    font-weight: 700;
}

.timeline-rate {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 15px;
}

.timeline-desc strong {
    display: block;
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: #333;
}

.timeline-desc p {
    font-size: 0.95rem;
    color: #555;
    margin: 0;
}

.shock-text {
    font-weight: 600;
    color: #D32F2F !important;
}

/* Mobile Adjustments */
@media (max-width: 600px) {
    .timeline-container {
        margin: 0;
    }

    .timeline-line {
        left: 15px;
    }

    .timeline-card {
        margin-left: 40px;
        padding: 15px;
        margin-bottom: 30px;
    }

    .timeline-dot {
        left: -33px;
        width: 16px;
        height: 16px;
        top: 20px;
    }

    .timeline-rate {
        font-size: 2.5rem;
    }
}

/* Policy Module */
.policy-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: center;
}

.policy-visual {
    background: #FAFAFA;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}

.policy-svg {
    width: 100%;
    max-width: 300px;
    height: auto;
    margin-bottom: 15px;
}

.flow-line {
    animation: flowDash 2s linear infinite;
}

@keyframes flowDash {
    to {
        stroke-dashoffset: -10;
    }
}

.caption {
    font-size: 0.9rem;
    color: #666;
    margin-top: 10px;
    line-height: 1.4;
    text-align: center;
}

.policy-card {
    background: #FFF8E1;
    border-left: 5px solid #FFC107;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.policy-header {
    font-size: 1.1rem;
    color: #F57C00;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.room-list h4 {
    margin-bottom: 15px;
    font-size: 1rem;
    color: #333;
}

.room-item {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    font-size: 0.9rem;
}

.room-item .bank {
    width: 100px;
    flex-shrink: 0;
    font-weight: 600;
}

.bar-container {
    flex-grow: 1;
    height: 10px;
    background: #eee;
    border-radius: 5px;
    margin: 0 10px;
    overflow: hidden;
}

.bar {
    height: 100%;
    border-radius: 5px;
    animation: growWidth 1.5s ease-out forwards;
    transform-origin: left;
    transform: scaleX(0);
}


.room-item .pct {
    width: 45px;
    text-align: right;
    font-weight: 700;
    color: #555;
    font-size: 0.85rem;
}

@keyframes growWidth {
    to {
        transform: scaleX(1);
    }
}

/* Responsive Policy */
@media (max-width: 650px) {
    .policy-grid {
        grid-template-columns: 1fr;
    }
}