/* RBP Blended Index - Production-matching Stylesheet */

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    /* Two-tone background gradient - split point raised for better readability */
    background: linear-gradient(to bottom,
        #1a2a4a 0%,
        #2a3a5a 10%,
        #3a4a6a 20%,
        #5a6a8a 30%,
        #7a8aaa 40%,
        #9aaaba 50%,
        #b0c0d0 60%,
        #c5d5e5 100%);
    background-attachment: fixed;
    min-height: 100vh;
}

/* App Container - creates the floating panel effect */
.app-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 80px 20px 80px 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Main panel wrapper with reflection */
.panel-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
}


/* Header */
.header {
    background: #fff;
    padding: 15px 20px;
    text-align: left;
    border-radius: 4px 4px 0 0;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
}

.logo img {
    max-width: 200px;
    height: auto;
}

/* Navigation */
.nav {
    background: linear-gradient(to bottom, #3d4a5c 0%, #2a3545 100%);
    padding: 0;
    margin-bottom: 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.nav-menu {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 0;
}

.nav-menu li {
    position: relative;
}

.nav-link {
    display: block;
    padding: 12px 20px;
    color: #e0e0e0;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    border-right: 1px solid rgba(255,255,255,0.1);
    position: relative;
    overflow: hidden;
}

/* Nav link hover animation */
.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.5s ease;
}

.nav-link:hover::before {
    left: 100%;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.nav-link.active {
    background: #1a2535;
    color: #fff;
    box-shadow: inset 0 -2px 0 #4a9eff;
}

/* Submenu */
.has-submenu:hover .submenu {
    display: block;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.submenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #2a3545;
    min-width: 180px;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.submenu li {
    list-style: none;
}

.submenu li a {
    display: block;
    padding: 10px 15px;
    color: #e0e0e0;
    text-decoration: none;
    font-size: 13px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    transition: all 0.2s ease;
}

.submenu li a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    padding-left: 20px;
}

/* Main Content */
.main-content {
    background: #fff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    position: relative;
    border-radius: 0 0 4px 4px;
}


/* Sections with slide animation */
.section {
    display: none;
    opacity: 0;
}

.section.active {
    display: block;
    animation: slideIn 0.4s ease forwards;
}

.section.slide-out {
    animation: slideOut 0.3s ease forwards;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(-30px);
    }
}

/* Content Box */
.content-box {
    padding: 30px 40px;
}

.content-box h2 {
    color: #1a202c;
    font-size: 1.5rem;
    font-weight: normal;
    margin-bottom: 20px;
}

.content-box p {
    margin-bottom: 15px;
    color: #333;
    font-size: 15px;
    line-height: 1.7;
}

.content-box.scrollable {
    max-height: clamp(400px, 55vh, 800px);
    overflow-y: auto;
}

/* Intro Section */
.intro-content {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.intro-image {
    flex-shrink: 0;
    width: 220px;
}

.intro-image img {
    max-width: 100%;
    height: auto;
}

.intro-text {
    flex: 1;
}

/* Contact Grid */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
}

.contact-col h2 {
    margin-bottom: 15px;
}

.contact-col a {
    color: #5e8ab4;
    text-decoration: none;
    transition: color 0.2s;
}

.contact-col a:hover {
    color: #3a6a94;
    text-decoration: underline;
}

/* Document List */
.doc-list {
    list-style: none;
}

.doc-list li {
    padding: 8px 0;
}

.doc-list a {
    color: #5e8ab4;
    text-decoration: none;
    transition: color 0.2s;
}

.doc-list a:hover {
    color: #3a6a94;
    text-decoration: underline;
}

/* Loading */
.loading {
    text-align: center;
    padding: 50px;
}

.loading img {
    width: 50px;
    height: 50px;
}

/* Performance Data Table */
#performance-data {
    overflow-x: auto;
}

.perf-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.perf-table th,
.perf-table td {
    padding: 8px 10px;
    text-align: right;
    border-bottom: 1px solid #ddd;
}

.perf-table th {
    background: #2a3545;
    font-weight: 600;
    color: #fff;
    text-align: center;
}

.perf-table td:first-child,
.perf-table th:first-child {
    text-align: left;
}

.perf-table .index-name {
    font-weight: 600;
}

.perf-table .benchmark {
    background: #fafafa;
}

.perf-table .spread {
    background: #f0f8ff;
    font-style: italic;
}

.positive { color: #228b22; }
.negative { color: #dc143c; }

/* Chart Section */
.chart-container {
    background: #323232;
    padding: 20px;
}

.chart-legend {
    color: #ccc;
    font-size: 11px;
    min-height: 40px;
    padding: 10px;
}

.chart-frame-wrapper {
    background: #323232;
    height: clamp(400px, 50vh, 700px);
}

.chart-frame-wrapper iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.chart-buttons {
    display: flex;
    justify-content: center;
    gap: 2px;
    padding: 15px 0;
}

.chart-btn {
    padding: 6px 12px;
    background: #2980b9;
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
}

.chart-btn:hover {
    background: #3498db;
    transform: translateY(-1px);
}

.chart-btn.active {
    background: #fff;
    color: #333;
}

.chart-disclaimer {
    color: #999;
    font-size: 11px;
    line-height: 1.4;
    padding: 10px;
}

/* Footer */
.footer {
    background: rgba(255, 255, 255, 0.6);
    margin-top: 0;
    padding: 15px 20px;
    text-align: center;
    color: #1a1a2a;
    font-size: 11px;
    border-radius: 4px;
    backdrop-filter: blur(2px);
}

.footer-address {
    margin-bottom: 8px;
    font-weight: 500;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    padding-top: 10px;
    margin-top: 5px;
}

.footer-links a {
    color: #333;
    text-decoration: none;
    transition: all 0.2s;
    padding: 5px 15px;
    background: rgba(255,255,255,0.7);
    border: 1px solid #ccc;
    border-radius: 3px;
}

.footer-links a:hover {
    background: rgba(255,255,255,0.9);
    text-decoration: none;
}

/* Angular App Container */
#angular-app {
    min-height: 400px;
}

/* Responsive */
@media (max-width: 768px) {
    .intro-content {
        flex-direction: column;
    }

    .intro-image {
        width: 100%;
        text-align: center;
    }

    .nav-menu {
        flex-direction: column;
    }

    .submenu {
        position: static;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .chart-buttons {
        flex-wrap: wrap;
    }

    .app-container {
        padding: 10px 10px 60px 10px;
    }
}
