/* ===== VARIABLES & RESET ===== */
:root {
    --primary: #E31B21;
    /* VnBusiness Red */
    --primary-dark: #b0151a;
    --secondary: #0b2b4e;
    --accent: #0aa1dd;
    --bg-light: #f8fafc;
    --text-main: #1f2937;
    --text-muted: #64748b;
    --white: #ffffff;
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --radius: 12px;
    --font-main: 'Encode Sans', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-main);
    background: var(--bg-light);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    border-radius: var(--radius);
}

/* ===== TYPOGRAPHY ===== */
h1,
h2,
h3,
h4 {
    font-weight: 700;
    color: var(--secondary);
    line-height: 1.2;
}

h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
}

h2 {
    font-size: clamp(1.5rem, 3vw, 2.25rem);
}

p {
    color: var(--text-muted);
    font-size: 1rem;
    margin-bottom: 1rem;
}

.text-center {
    text-align: center;
}

/* Section Headers */
.section-header {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

.section-header h2 {
    margin-bottom: 0.5rem;
}

.section-icon {
    width: 48px;
    height: 48px;
    background: rgba(227, 27, 33, 0.1);
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.section-icon svg {
    width: 24px;
    height: 24px;
}

/* ===== SECTION ===== */
section {
    padding: 4rem 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

.bg-gradient-fade {
    background: linear-gradient(180deg, #fff 0%, #f1f5f9 100%);
}

/* ===== HERO ===== */
.hero {
    min-height: 70vh;
    background: linear-gradient(135deg, var(--secondary) 0%, #1e3a8a 100%);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    position: relative;
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 20px 20px;
    opacity: 0.5;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    animation: fadeInUp 1s ease-out;
}

.hero h1 {
    color: var(--white);
    margin-bottom: 1.5rem;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.hero p {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== CARDS & LISTS ===== */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.card-glass {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    height: 100%;
    border-top: 5px solid var(--primary);
}

.card-glass h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.icon-sm {
    font-size: 1.5rem;
}

.icon-list {
    list-style: none;
}

.icon-list li {
    position: relative;
    padding: 16px 16px 16px 50px;
    margin-bottom: 12px;
    background: #f8fafc;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.3s;
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-main);
}

.icon-list li:hover {
    background: #fee2e2;
    transform: translateX(5px);
}

.list-icon {
    position: absolute;
    left: 12px;
    top: 14px;
    width: 24px;
    height: 24px;
    fill: var(--primary);
}

.accent-item .list-icon {
    fill: var(--accent);
}

.card-glass[style*="accent"] .icon-list li:hover {
    background: #e0f2fe;
}

/* ===== METRICS EXPANDED ===== */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.metric-card {
    background: var(--white);
    padding: 1.5rem;
    border-radius: var(--radius);
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: 0.3s;
}

.metric-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.metric-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.metric-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--secondary);
    line-height: 1;
    margin-bottom: 0.5rem;
}

/* Subsection Titles */
.subsection-title {
    text-align: center;
    margin: 2rem 0;
    font-size: 1.5rem;
    color: var(--primary);
}

/* Chart Cards */
.grid-chart-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.chart-card {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
}

.chart-card h4 {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
    color: var(--secondary);
    text-transform: uppercase;
    font-size: 1rem;
    letter-spacing: 1px;
}

.chart-card .card-icon {
    width: 32px;
    height: 32px;
    background: rgba(227, 27, 33, 0.1);
    color: var(--primary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chart-card .card-icon svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* Horizontal Bar Chart */
.bar-chart {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.bar-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.9rem;
}

.bar-label {
    width: 50px;
    font-weight: bold;
}

.bar-track {
    flex: 1;
    height: 24px;
    background: #f1f5f9;
    border-radius: 99px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 99px;
}

.bar-val {
    width: 60px;
    text-align: right;
    font-weight: bold;
}

/* Stat List */
.stat-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px dashed #e2e8f0;
    padding-bottom: 0.5rem;
}

.stat-item .val {
    font-weight: 800;
    color: var(--secondary);
}

.stat-item .val.high {
    color: var(--primary);
}

/* Vertical Bar Chart */
.bar-chart.vertical {
    flex-direction: row;
    height: 150px;
    align-items: flex-end;
    justify-content: space-around;
}

.v-bar-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    width: 60px;
}

.v-bar-track {
    flex: 1;
    width: 45px;
    background: #f1f5f9;
    border-radius: 8px 8px 0 0;
    position: relative;
    display: flex;
    align-items: flex-end;
}

.v-bar-fill {
    width: 100%;
    background: linear-gradient(to top, var(--accent), #60a5fa);
    border-radius: 4px 4px 0 0;
    position: relative;
}

.v-bar-label {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    font-weight: bold;
}

.v-bar-val {
    font-size: 0.9rem;
    font-weight: 800;
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    width: 150%;
    text-align: center;
    color: var(--primary);
}

/* ===== RESTRUCTURING ===== */
#restructure {
    background: #fffbeeb0;
}

.restructure-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin-bottom: 3rem;
}

.res-card {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    text-align: center;
    border: 2px solid var(--primary);
}

.source .big-number {
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary);
}

.res-arrow svg {
    width: 40px;
    height: 40px;
    animation: moveRight 1.5s infinite;
}

@keyframes moveRight {

    0%,
    100% {
        transform: translateX(0);
    }

    50% {
        transform: translateX(10px);
    }
}

.destinations {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    text-align: center;
}

.tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 1rem;
}

.tag {
    background: #ecfdf5;
    color: #047857;
    padding: 0.5rem 1rem;
    border-radius: 99px;
    font-weight: 600;
    border: 1px solid #a7f3d0;
}

.finance-box {
    background: var(--secondary);
    color: var(--white);
    padding: 2rem;
    border-radius: var(--radius);
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.f-row {
    margin-bottom: 2rem;
    font-size: 1.25rem;
}

.money {
    color: #fbbf24;
    font-size: 2rem;
    display: block;
    margin-top: 0.5rem;
}

.timeline {
    display: flex;
    justify-content: space-around;
    align-items: center;
    position: relative;
}

.t-phase {
    z-index: 2;
    background: var(--secondary);
    padding: 0 10px;
}

.t-phase strong {
    display: block;
    font-size: 1.2rem;
    color: #fbbf24;
}

.t-line {
    position: absolute;
    width: 80%;
    height: 2px;
    background: rgba(255, 255, 255, 0.2);
    top: 50%;
    z-index: 1;
}

/* ===== RED SECTION (9 POLES MAP) ===== */
.red-section {
    background: linear-gradient(135deg, #b0151a 0%, #E31B21 100%);
    color: #fff;
    position: relative;
    overflow: hidden;
    padding-bottom: 6rem;
}

.red-section .section-header h2,
.red-section .section-header p {
    color: #fff;
}

.red-section .section-icon.white-icon {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.scheme-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    align-items: center;
}

/* On mobile, stack them */
@media (max-width: 768px) {
    .scheme-container {
        grid-template-columns: 1fr;
    }

    .info-card-floating {
        order: -1;
        margin-bottom: 1rem;
    }

    /* Show info first on mobile interact? or below */
}

#pole-scheme {
    width: 100%;
    height: 500px;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    border-radius: var(--radius);
    position: relative;
}

.info-card-floating {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 2rem;
    border-radius: var(--radius);
    color: #fff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transition: opacity 0.3s;
}

.info-card-floating h3 {
    color: #feebc8;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    padding-bottom: 0.5rem;
}

.info-card-floating p {
    color: rgba(255, 255, 255, 0.9);
}

/* SVG Visualization Styles */
.pole-node {
    cursor: pointer;
    transition: 0.3s;
}

.pole-node:hover {
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.8));
}

.pole-node:hover .main-dot {
    fill: #fbbf24;
    r: 10;
}

.pole-node text {
    font-family: var(--font-main);
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    pointer-events: none;
    font-size: 14px;
}

.connection-line {
    stroke-dasharray: 4;
    animation: dash 30s linear infinite;
    opacity: 0.5;
}

@keyframes dash {
    to {
        stroke-dashoffset: -100;
    }
}

/* ===== HUBS WHEEL ===== */
.hub-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
    align-items: start;
}

@media (max-width: 992px) {
    .hub-container {
        grid-template-columns: 1fr;
    }
}

.hub-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    max-height: none;
    overflow-y: visible;
}

.hub-btn {
    background: var(--white);
    border: 1px solid #e2e8f0;
    padding: 1.25rem;
    text-align: center;
    border-radius: 16px;
    cursor: pointer;
    font-weight: 700;
    color: var(--secondary);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    position: relative;
    overflow: hidden;
}

.hub-btn .btn-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: #f1f5f9;
    color: var(--text-muted);
    transition: 0.3s;
}

.hub-btn .btn-icon svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.hub-btn:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.hub-btn:hover .btn-icon {
    background: rgba(227, 27, 33, 0.1);
    color: var(--primary);
}

.hub-btn.active {
    background: var(--white);
    border: 2px solid var(--primary);
    color: var(--primary);
    box-shadow: 0 10px 20px rgba(227, 27, 33, 0.15);
}

.hub-btn.active .btn-icon {
    background: var(--primary);
    color: var(--white);
}

/* Individual Colors for Vividness */
.hub-btn[data-hub="1"] {
    border-bottom: 4px solid #ef4444;
}

.hub-btn[data-hub="2"] {
    border-bottom: 4px solid #3b82f6;
}

.hub-btn[data-hub="3"] {
    border-bottom: 4px solid #10b981;
}

.hub-btn[data-hub="4"] {
    border-bottom: 4px solid #f59e0b;
}

.hub-btn[data-hub="5"] {
    border-bottom: 4px solid #8b5cf6;
}

.hub-btn[data-hub="6"] {
    border-bottom: 4px solid #ec4899;
}

.hub-btn[data-hub="7"] {
    border-bottom: 4px solid #06b6d4;
}

.hub-btn[data-hub="8"] {
    border-bottom: 4px solid #84cc16;
}

.hub-btn[data-hub="9"] {
    border-bottom: 4px solid #6366f1;
}

.hub-display {
    background: var(--white);
    min-height: 250px;
    padding: 2.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    border-left: 8px solid var(--primary);
    background-image: radial-gradient(circle at top right, rgba(227, 27, 33, 0.05), transparent);
}

.hub-info-card h3 {
    color: var(--primary);
    font-size: 2rem;
    margin-bottom: 1rem;
}

.hub-info-card p {
    font-size: 1.2rem;
    color: var(--secondary);
}

.fade-in {
    animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* ===== CITIES GRID ===== */
.city-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
}

.city-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: 0.3s;
    display: flex;
    flex-direction: column;
    flex: 0 1 calc(33.333% - 1.5rem);
    min-width: 300px;
}

.city-card:hover {
    transform: translateY(-5px);
}

.city-header {
    background: var(--secondary);
    color: var(--white);
    padding: 1rem;
}

.city-header h3 {
    color: var(--white);
    margin: 0;
    font-size: 1.1rem;
}

.city-body {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.city-body .desc {
    font-style: italic;
    margin-bottom: 1rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.stats {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.stats div {
    display: flex;
    flex-direction: column;
}

.stats span {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #94a3b8;
}

.stats strong {
    color: var(--primary);
    font-size: 1rem;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .hub-container {
        grid-template-columns: 1fr;
    }

    .hub-list {
        flex-direction: row;
        overflow-x: auto;
        padding-bottom: 1rem;
    }

    .hub-btn {
        white-space: nowrap;
    }

    .restructure-container {
        flex-direction: column;
    }

    .res-arrow svg {
        transform: rotate(90deg);
        animation: moveDown 1.5s infinite;
    }

    @keyframes moveDown {

        0%,
        100% {
            transform: translateY(0) rotate(90deg);
        }

        50% {
            transform: translateY(10px) rotate(90deg);
        }
    }
}

footer {
    text-align: center;
    padding: 2rem;
    margin-top: 4rem;
    border-top: 1px solid #e2e8f0;
    color: #94a3b8;
}