/**
 * FundStat Layout
 * Header, navigation, and grid systems
 */

/* ============================================================================
   Header
   ========================================================================= */

.header {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--purple-200);
    padding: 1.5rem 3rem;
    position: sticky;
    top: 0;
    z-index: var(--z-sticky);
}

/* Fallback for browsers without backdrop-filter support */
@supports not (backdrop-filter: blur(20px)) {
    .header {
        background: rgba(255, 255, 255, 0.95);
    }
}

.header-content {
    max-width: var(--container-xl);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ============================================================================
   Logo
   ========================================================================= */

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.logo-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: var(--weight-bold);
    color: var(--purple-800);
}

/* ============================================================================
   Navigation
   ========================================================================= */

.nav {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    color: var(--purple-600);
    text-decoration: none;
    font-size: var(--text-md);
    font-weight: var(--weight-medium);
    transition: color var(--transition-base);
    position: relative;
}

.nav-link:hover {
    color: var(--purple-800);
}

.nav-link.active {
    color: var(--purple-800);
    font-weight: var(--weight-semibold);
}

/* Navigation with dropdown */
.nav-item {
    position: relative;
    list-style: none;
}

.nav-item.has-dropdown {
    position: relative;
}

.nav-item.has-dropdown > .nav-link::after,
.nav-item.has-dropdown > .nav-current::after {
    content: '▾';
    margin-left: 0.375rem;
    font-size: 0.75rem;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    min-width: 200px;
    padding: 0.5rem;
    z-index: var(--z-dropdown);
    animation: slideDown 0.2s ease-out;
}

/* Keep dropdown visible when hovering over parent or dropdown itself */
.nav-item.has-dropdown:hover .dropdown-menu,
.dropdown-menu:hover {
    display: block;
}

/* Extend hover area to bridge the gap */
.nav-item.has-dropdown::before {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 0.5rem;
}

.dropdown-menu li {
    list-style: none;
}

.dropdown-menu .nav-link,
.dropdown-menu .nav-current {
    display: block;
    padding: 0.625rem 1rem;
    border-radius: var(--radius-sm);
    color: var(--purple-700);
    font-size: var(--text-base);
    transition: background var(--transition-base);
}

.dropdown-menu .nav-link:hover {
    background: var(--purple-50);
    color: var(--purple-900);
}

.dropdown-menu .nav-current {
    background: var(--purple-100);
    color: var(--purple-900);
    font-weight: var(--weight-semibold);
}

.nav-current {
    color: var(--purple-800);
    font-size: var(--text-md);
    font-weight: var(--weight-semibold);
    cursor: default;
}

/* ============================================================================
   Header Date
   ========================================================================= */

.header-date {
    font-family: var(--font-mono);
    font-size: var(--text-base);
    color: var(--purple-600);
    font-weight: var(--weight-medium);
}

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

/* ============================================================================
   Hamburger Button (Mobile Only)
   ========================================================================= */

.hamburger {
    display: none; /* Hidden on desktop */
    width: 28px;
    height: 28px;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    position: relative;
    z-index: 102;
}

.hamburger span {
    width: 100%;
    height: 2.5px;
    background: var(--purple-700);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Telegram Link (Mobile Only) */
.telegram-link-mobile {
    display: none; /* Hidden on desktop */
    color: var(--purple-700);
    transition: color 0.2s ease;
    padding: 4px;
    margin-left: auto;
    margin-right: 0.75rem;
}

.telegram-link-mobile:hover {
    color: var(--purple-900);
}

.telegram-link-mobile svg {
    display: block;
}

/* ============================================================================
   Mobile Menu (Slide-in from right)
   ========================================================================= */

.mobile-menu {
    position: fixed;
    top: 0;
    right: 0;
    width: 75%;
    max-width: 300px;
    height: 100vh;
    background: white;
    box-shadow: -4px 0 24px rgba(107, 69, 154, 0.15);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 101;
    padding-top: 5rem;
    overflow-y: auto;
}

.mobile-menu.active {
    transform: translateX(0);
}

/* Menu overlay */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(42, 26, 61, 0.4);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 100;
}

.menu-overlay.active {
    opacity: 1;
    pointer-events: all;
}

/* Mobile menu links */
.menu-links {
    display: flex;
    flex-direction: column;
}

.menu-link {
    padding: 1.125rem 1.75rem;
    color: var(--purple-700);
    text-decoration: none;
    font-size: 1rem;
    font-weight: var(--weight-medium);
    border-bottom: 1px solid var(--purple-100);
    transition: all 0.2s;
}

.menu-link.active {
    background: var(--purple-50);
    color: var(--purple-900);
    font-weight: var(--weight-semibold);
}

.menu-link:active {
    background: var(--purple-100);
}

/* Mobile menu section labels */
.menu-section-label {
    padding: 1rem 1.75rem 0.5rem;
    font-size: 0.6875rem;
    font-weight: var(--weight-bold);
    color: var(--purple-600);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ============================================================================
   Mobile Navigation Styles
   ========================================================================= */

@media (max-width: 768px) {
    /* Show hamburger button on mobile */
    .hamburger {
        display: flex;
    }

    /* Show telegram link on mobile */
    .telegram-link-mobile {
        display: flex;
        align-items: center;
    }

    /* Hide desktop navigation on mobile */
    .nav {
        display: none;
    }

    /* Hide dropdown arrows on mobile */
    .nav-item.has-dropdown > .nav-link::after,
    .nav-item.has-dropdown > .nav-current::after {
        display: none;
    }

    /* Hide date on mobile */
    .header-date {
        display: none;
    }

    .header {
        padding: 1rem 1.25rem;
    }

    .logo-icon {
        width: 28px;
        height: 28px;
    }

    .logo-text {
        font-size: 1.25rem;
    }

    .container {
        padding: 1.25rem;
    }
}

@media (min-width: 769px) {
    /* Hide mobile menu on desktop */
    .mobile-menu,
    .menu-overlay {
        display: none !important;
    }
}

/* ============================================================================
   Grid Layouts
   ========================================================================= */

/* Calculator Grid */
.calc-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 2rem;
}

@media (max-width: 1024px) {
    .calc-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

/* News Grid */
.news-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

@media (max-width: 1024px) {
    .news-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* Results Panel */
.results-panel {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.results-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* ============================================================================
   Panels
   ========================================================================= */

.calc-panel {
    background: white;
    border-radius: var(--radius-xl);
    padding: 2rem;
    box-shadow: var(--shadow-md);
}

@media (max-width: 768px) {
    .calc-panel {
        padding: 1.5rem;
        border-radius: var(--radius-lg);
    }
}

.panel-title {
    font-size: var(--text-xl);
    font-weight: var(--weight-bold);
    color: var(--purple-900);
    margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
    .panel-title {
        font-size: var(--text-lg);
        margin-bottom: 1.25rem;
    }
}

/* ============================================================================
   Sidebar
   ========================================================================= */

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.sidebar-widget {
    background: white;
    border-radius: var(--radius-xl);
    padding: 1.75rem;
    box-shadow: var(--shadow-md);
}

.widget-title {
    font-size: var(--text-lg);
    font-weight: var(--weight-bold);
    color: var(--purple-900);
    margin-bottom: 1.25rem;
}

/* ============================================================================
   Responsive Container
   ========================================================================= */

@media (max-width: 1600px) {
    .header-content {
        max-width: var(--container-2xl);
    }
}

@media (max-width: 1400px) {
    .header-content {
        max-width: 100%;
    }

    .nav {
        gap: 1.5rem;
    }
}

/* ============================================================================
   Main Column Layouts
   ========================================================================= */

.main-column {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* ============================================================================
   Stat Cards
   ========================================================================= */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    text-align: center;
}

.stat-label {
    font-size: var(--text-sm);
    color: var(--purple-600);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: var(--weight-semibold);
}

.stat-value {
    font-family: var(--font-mono);
    font-size: var(--text-3xl);
    font-weight: var(--weight-bold);
    color: var(--purple-800);
}

.stat-value.positive {
    color: var(--color-positive);
}

.stat-value.negative {
    color: var(--color-negative);
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .stat-card {
        padding: 1.25rem;
    }

    .stat-value {
        font-size: var(--text-2xl);
    }
}

/* ============================================================================
   Mobile Homepage Styles
   ========================================================================= */

/* Show/Hide Content Based on Device */
@media (min-width: 769px) {
    .mobile-content {
        display: none !important;
    }
}

/* ============================================================================
   Desktop Page Header (Title + Index Card)
   ========================================================================= */

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 3rem;
    margin-bottom: 2.5rem;
}

.page-header-text {
    flex: 1;
    min-width: 0; /* Allow text to shrink if needed */
}

/* ============================================================================
   Desktop Index Card
   ========================================================================= */

.desktop-index-card {
    background: linear-gradient(135deg, var(--purple-600), var(--purple-800));
    border-radius: 16px;
    padding: 2rem 2.5rem;
    color: white;
    box-shadow: 0 4px 20px rgba(107, 69, 154, 0.25);
    flex-shrink: 0; /* Prevent card from shrinking */
    min-width: 400px; /* Ensure card has minimum width */
}

.desktop-index-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.desktop-index-title {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0.9;
    margin: 0;
    font-weight: var(--weight-semibold);
}

.desktop-index-date {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    opacity: 0.75;
}

.desktop-index-body {
    display: flex;
    align-items: baseline;
    gap: 2rem;
}

.desktop-index-value {
    font-family: var(--font-mono);
    font-size: 3rem;
    font-weight: var(--weight-bold);
    line-height: 1;
}

.desktop-index-change {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-mono);
    font-size: 1.25rem;
    font-weight: var(--weight-semibold);
}

.desktop-index-arrow {
    font-size: 1.5rem;
}

.desktop-index-change.positive {
    color: #4ade80; /* Bright green for positive changes */
}

.desktop-index-change.negative {
    color: #f87171; /* Bright red for negative changes */
}

@media (max-width: 768px) {
    /* Prevent horizontal scroll on mobile */
    html, body {
        overflow-x: hidden;
        width: 100%;
        max-width: 100vw;
    }

    .desktop-content {
        display: none !important;
    }

    .page-header {
        display: none; /* Hide desktop page header on mobile */
    }

    .container {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
        width: 100%;
        max-width: 100%;
    }

    /* Index Widget */
    .index-widget {
        background: linear-gradient(135deg, var(--purple-600), var(--purple-800));
        border-radius: 16px;
        padding: 1.75rem 1.5rem;
        margin-bottom: 1.5rem;
        color: white;
        box-shadow: 0 4px 16px rgba(107, 69, 154, 0.25);
    }

    .index-label {
        font-size: 0.75rem;
        text-transform: uppercase;
        letter-spacing: 0.1em;
        opacity: 0.8;
        margin-bottom: 0.5rem;
    }

    .index-value {
        font-family: var(--font-mono);
        font-size: 2.5rem;
        font-weight: var(--weight-bold);
        margin-bottom: 0.75rem;
        line-height: 1;
    }

    .index-change {
        display: inline-flex;
        align-items: center;
        gap: 0.375rem;
        font-family: var(--font-mono);
        font-size: 1rem;
        font-weight: var(--weight-semibold);
    }

    .index-change.positive {
        color: #7FFF9D;
    }

    .index-change.negative {
        color: #FF6B93;
    }

    .index-date {
        font-size: 0.75rem;
        opacity: 0.7;
        margin-top: 0.5rem;
    }

    /* Sort Controls */
    .sort-controls {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0.625rem;
        margin-bottom: 1.5rem;
    }

    .sort-btn {
        background: white;
        padding: 0.875rem 1rem;
        border-radius: 10px;
        border: 2px solid var(--purple-100);
        font-size: 0.875rem;
        font-weight: var(--weight-semibold);
        color: var(--purple-700);
        cursor: pointer;
        transition: all 0.2s ease;
        box-shadow: 0 2px 6px rgba(107, 69, 154, 0.06);
    }

    .sort-btn:active {
        transform: translateY(1px);
    }

    .sort-btn.active {
        background: linear-gradient(135deg, var(--purple-600), var(--purple-700));
        color: white;
        border-color: var(--purple-700);
        box-shadow: 0 4px 12px rgba(107, 69, 154, 0.25);
    }

    /* Section Header */
    .section-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 1rem;
    }

    .section-title {
        font-size: 1.25rem;
        font-weight: var(--weight-bold);
        color: var(--purple-900);
    }

    /* Stock Cards */
    .stock-cards {
        display: flex;
        flex-direction: column;
        gap: 0.875rem;
        margin-bottom: 1.5rem;
    }

    .stock-card {
        background: white;
        border-radius: 12px;
        padding: 1.25rem;
        box-shadow: 0 2px 8px rgba(107, 69, 154, 0.08), 0 0 0 1px var(--purple-100);
        animation: slideIn 0.4s ease-out backwards;
    }

    /* Staggered animations for first 10 cards */
    .stock-card:nth-child(1) { animation-delay: 0.05s; }
    .stock-card:nth-child(2) { animation-delay: 0.1s; }
    .stock-card:nth-child(3) { animation-delay: 0.15s; }
    .stock-card:nth-child(4) { animation-delay: 0.2s; }
    .stock-card:nth-child(5) { animation-delay: 0.25s; }
    .stock-card:nth-child(6) { animation-delay: 0.3s; }
    .stock-card:nth-child(7) { animation-delay: 0.35s; }
    .stock-card:nth-child(8) { animation-delay: 0.4s; }
    .stock-card:nth-child(9) { animation-delay: 0.45s; }
    .stock-card:nth-child(10) { animation-delay: 0.5s; }
    /* Cards after 10th have no delay */

    .stock-header {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        margin-bottom: 0.875rem;
    }

    .stock-info {
        flex: 1;
    }

    .stock-ticker {
        font-family: var(--font-mono);
        font-weight: var(--weight-bold);
        color: var(--purple-700);
        font-size: 0.875rem;
        margin-bottom: 0.25rem;
    }

    .stock-name {
        font-size: 0.8125rem;
        color: var(--purple-900);
        font-weight: var(--weight-medium);
    }

    .stock-weight {
        padding: 0.25rem 0.625rem;
        background: var(--purple-100);
        border-radius: 5px;
        font-family: var(--font-mono);
        font-size: 0.75rem;
        color: var(--purple-700);
        font-weight: var(--weight-semibold);
    }

    .stock-main {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 0.875rem;
    }

    .stock-price {
        font-family: var(--font-mono);
        font-weight: var(--weight-bold);
        font-size: 1.375rem;
        color: var(--purple-900);
    }

    .stock-change {
        font-family: var(--font-mono);
        font-weight: var(--weight-semibold);
        font-size: 1rem;
    }

    .stock-change.positive {
        color: var(--color-positive);
    }

    .stock-change.negative {
        color: var(--color-negative);
    }

    .stock-periods {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 0.625rem;
    }

    .period-item {
        background: var(--purple-50);
        padding: 0.625rem;
        border-radius: 6px;
        text-align: center;
    }

    .period-label {
        font-size: 0.625rem;
        color: var(--purple-600);
        margin-bottom: 0.25rem;
        text-transform: uppercase;
        letter-spacing: 0.05em;
    }

    .period-value {
        font-family: var(--font-mono);
        font-size: 0.8125rem;
        font-weight: var(--weight-semibold);
    }

    .period-value.positive {
        color: var(--color-positive);
    }

    .period-value.negative {
        color: var(--color-negative);
    }

    /* Composition Cards (for index composition pages) */
    .composition-cards {
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
        margin-bottom: 1.5rem;
    }

    .composition-card {
        background: white;
        border-radius: 12px;
        padding: 1.25rem;
        box-shadow: 0 2px 8px rgba(107, 69, 154, 0.08), 0 0 0 1px var(--purple-100);
        animation: slideIn 0.4s ease-out backwards;
    }

    /* Staggered animations for first 10 cards */
    .composition-card:nth-child(1) { animation-delay: 0.05s; }
    .composition-card:nth-child(2) { animation-delay: 0.1s; }
    .composition-card:nth-child(3) { animation-delay: 0.15s; }
    .composition-card:nth-child(4) { animation-delay: 0.2s; }
    .composition-card:nth-child(5) { animation-delay: 0.25s; }
    .composition-card:nth-child(6) { animation-delay: 0.3s; }
    .composition-card:nth-child(7) { animation-delay: 0.35s; }
    .composition-card:nth-child(8) { animation-delay: 0.4s; }
    .composition-card:nth-child(9) { animation-delay: 0.45s; }
    .composition-card:nth-child(10) { animation-delay: 0.5s; }
    /* Cards after 10th have no delay */

    .composition-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 1rem;
    }

    .composition-info {
        flex: 1;
        min-width: 0; /* Allow text truncation */
    }

    .composition-ticker {
        font-family: var(--font-mono);
        font-weight: var(--weight-bold);
        color: var(--purple-700);
        font-size: 0.9375rem;
        margin-bottom: 0.375rem;
    }

    .composition-name {
        font-size: 0.875rem;
        color: var(--purple-900);
        font-weight: var(--weight-medium);
        line-height: 1.4;
    }

    .composition-weight {
        padding: 0.375rem 0.875rem;
        background: var(--purple-100);
        border-radius: 8px;
        font-family: var(--font-mono);
        font-size: 0.9375rem;
        font-weight: var(--weight-bold);
        color: var(--purple-800);
        white-space: nowrap;
        flex-shrink: 0;
    }

    .composition-diff {
        background: var(--purple-50);
        border-radius: 12px;
        padding: 1rem;
        margin-bottom: 1.5rem;
        font-size: 0.875rem;
        color: var(--purple-700);
        line-height: 1.5;
    }

    /* OFZ Bond Cards (for OFZ bonds page) */
    .bond-cards {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        margin-bottom: 1.5rem;
    }

    .bond-card {
        background: white;
        border-radius: 12px;
        padding: 1.25rem;
        box-shadow: 0 2px 8px rgba(107, 69, 154, 0.08), 0 0 0 1px var(--purple-100);
        animation: slideIn 0.4s ease-out backwards;
        transition: all 0.2s ease;
    }

    .bond-card:hover {
        box-shadow: 0 4px 16px rgba(107, 69, 154, 0.15), 0 0 0 1px var(--purple-200);
        transform: translateY(-2px);
    }

    /* Staggered animations for first 10 cards */
    .bond-card:nth-child(1) { animation-delay: 0.05s; }
    .bond-card:nth-child(2) { animation-delay: 0.1s; }
    .bond-card:nth-child(3) { animation-delay: 0.15s; }
    .bond-card:nth-child(4) { animation-delay: 0.2s; }
    .bond-card:nth-child(5) { animation-delay: 0.25s; }
    .bond-card:nth-child(6) { animation-delay: 0.3s; }
    .bond-card:nth-child(7) { animation-delay: 0.35s; }
    .bond-card:nth-child(8) { animation-delay: 0.4s; }
    .bond-card:nth-child(9) { animation-delay: 0.45s; }
    .bond-card:nth-child(10) { animation-delay: 0.5s; }
    /* Cards after 10th have no delay */

    .bond-header {
        margin-bottom: 1rem;
        padding-bottom: 1rem;
        border-bottom: 1px solid var(--purple-100);
    }

    .bond-info {
        display: flex;
        flex-direction: column;
        gap: 0.375rem;
    }

    .bond-ticker {
        font-family: var(--font-mono);
        font-weight: var(--weight-bold);
        color: var(--purple-700);
        font-size: 0.9375rem;
    }

    .bond-name {
        font-size: 0.875rem;
        color: var(--purple-900);
        font-weight: var(--weight-medium);
        line-height: 1.4;
    }

    .bond-metrics {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 0.75rem;
        margin-bottom: 1rem;
    }

    .bond-metric {
        display: flex;
        flex-direction: column;
        gap: 0.375rem;
        background: var(--purple-50);
        padding: 0.75rem;
        border-radius: 8px;
        text-align: center;
    }

    .metric-label {
        font-size: 0.6875rem;
        color: var(--purple-600);
        text-transform: uppercase;
        letter-spacing: 0.05em;
        font-weight: var(--weight-semibold);
    }

    .metric-value {
        font-family: var(--font-mono);
        font-size: 1rem;
        font-weight: var(--weight-bold);
        color: var(--purple-900);
    }

    .metric-value.primary {
        color: var(--purple-700);
        font-size: 1.125rem;
    }

    .bond-details {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        padding-top: 1rem;
        border-top: 1px solid var(--purple-100);
    }

    .bond-detail-item {
        display: flex;
        justify-content: space-between;
        align-items: center;
        font-size: 0.875rem;
    }

    .detail-label {
        color: var(--purple-600);
        font-weight: var(--weight-medium);
    }

    .detail-value {
        font-family: var(--font-mono);
        color: var(--purple-900);
        font-weight: var(--weight-semibold);
    }

    /* Responsive adjustments for small mobile screens */
    @media (max-width: 480px) {
        .bond-card {
            padding: 1rem;
        }

        .bond-metrics {
            grid-template-columns: 1fr 1fr;
            gap: 0.5rem;
        }

        .bond-metric {
            padding: 0.5rem;
        }

        .bond-metric:last-child {
            grid-column: 1 / -1;
        }

        .metric-label {
            font-size: 0.625rem;
        }

        .metric-value {
            font-size: 0.875rem;
        }

        .metric-value.primary {
            font-size: 1rem;
        }

        .bond-ticker {
            font-size: 0.875rem;
        }

        .bond-name {
            font-size: 0.8125rem;
        }
    }

    /* Portfolio Cards (for calculator results) */
    .portfolio-cards {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        margin-bottom: 1.5rem;
    }

    .portfolio-card,
    .portfolio-bond-card {
        background: white;
        border-radius: 12px;
        padding: 1.25rem;
        box-shadow: 0 2px 8px rgba(107, 69, 154, 0.08), 0 0 0 1px var(--purple-100);
        animation: slideIn 0.4s ease-out backwards;
    }

    /* Staggered animation for first 10 cards */
    .portfolio-card:nth-child(1),
    .portfolio-bond-card:nth-child(1) { animation-delay: 0.05s; }
    .portfolio-card:nth-child(2),
    .portfolio-bond-card:nth-child(2) { animation-delay: 0.10s; }
    .portfolio-card:nth-child(3),
    .portfolio-bond-card:nth-child(3) { animation-delay: 0.15s; }
    .portfolio-card:nth-child(4),
    .portfolio-bond-card:nth-child(4) { animation-delay: 0.20s; }
    .portfolio-card:nth-child(5),
    .portfolio-bond-card:nth-child(5) { animation-delay: 0.25s; }
    .portfolio-card:nth-child(6),
    .portfolio-bond-card:nth-child(6) { animation-delay: 0.30s; }
    .portfolio-card:nth-child(7),
    .portfolio-bond-card:nth-child(7) { animation-delay: 0.35s; }
    .portfolio-card:nth-child(8),
    .portfolio-bond-card:nth-child(8) { animation-delay: 0.40s; }
    .portfolio-card:nth-child(9),
    .portfolio-bond-card:nth-child(9) { animation-delay: 0.45s; }
    .portfolio-card:nth-child(10),
    .portfolio-bond-card:nth-child(10) { animation-delay: 0.50s; }

    .portfolio-header {
        margin-bottom: 1rem;
    }

    .portfolio-info {
        display: flex;
        flex-direction: column;
        gap: 0.25rem;
    }

    .portfolio-ticker {
        font-family: var(--font-mono);
        font-weight: var(--weight-bold);
        color: var(--purple-700);
        font-size: 0.9375rem;
    }

    .portfolio-name {
        font-size: 0.875rem;
        color: var(--purple-600);
        line-height: 1.3;
    }

    .portfolio-metrics {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
        margin-bottom: 1rem;
    }

    .portfolio-metric {
        display: flex;
        flex-direction: column;
        gap: 0.375rem;
        background: var(--purple-50);
        padding: 0.75rem;
        border-radius: 8px;
        text-align: center;
    }

    .portfolio-metric .metric-label {
        font-size: 0.75rem;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        color: var(--purple-600);
        font-weight: var(--weight-semibold);
    }

    .portfolio-metric .metric-value {
        font-family: var(--font-mono);
        font-size: 0.9375rem;
        font-weight: var(--weight-bold);
        color: var(--purple-800);
    }

    .portfolio-metric .metric-value.primary {
        color: var(--purple-700);
        font-size: 1.125rem;
    }

    .portfolio-details {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        padding-top: 1rem;
        border-top: 1px solid var(--purple-100);
    }

    .portfolio-detail-item {
        display: flex;
        justify-content: space-between;
        align-items: center;
        font-size: 0.875rem;
    }

    .portfolio-detail-item .detail-label {
        color: var(--purple-600);
        font-weight: var(--weight-medium);
    }

    .portfolio-detail-item .detail-value {
        font-family: var(--font-mono);
        color: var(--purple-900);
        font-weight: var(--weight-semibold);
    }

    /* Animation */
    @keyframes slideIn {
        from {
            opacity: 0;
            transform: translateX(-10px);
        }
        to {
            opacity: 1;
            transform: translateX(0);
        }
    }
}
