/* ===========================
   FINANCIAL PROFESSIONAL THEME
   MarketPrime - Market Intelligence
   ===========================*/

/* ===========================
   RESET & BASE
   ===========================*/
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #f8f9fa;
    color: #212529;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===========================
   TYPOGRAPHY
   ===========================*/
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    color: #1a2332;
}

p {
    margin-bottom: 1rem;
    line-height: 1.6;
}

a {
    color: #2c5aa0;
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: #4a9eff;
}

/* ===========================
   HEADER
   ===========================*/
.main-header {
    background: #1a2332;
    border-bottom: 3px solid #2c5aa0;
    padding: 0;
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-logo h1 {
    margin: 0;
    font-size: 26px;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: 0.5px;
}

.header-tagline {
    margin: 4px 0 0 0;
    font-size: 12px;
    color: #8a93a3;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.header-nav {
    display: flex;
    gap: 40px;
}

.header-nav a {
    color: #8a93a3;
    font-weight: 500;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-decoration: none;
    transition: color 0.2s ease;
}

.header-nav a:hover,
.header-nav a.active {
    color: #4a9eff;
}

.header-nav a.active {
    font-weight: 700;
    border-bottom: 2px solid #4a9eff;
    padding-bottom: 4px;
}

/* ===========================
   BREADCRUMB
   ===========================*/
.breadcrumb-bar {
    background: #2c3e50;
    border-bottom: 1px solid #34495e;
    padding: 16px 0;
}

.breadcrumb-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
}

.breadcrumb {
    margin: 0;
    font-size: 13px;
    color: #95a5a6;
}

.breadcrumb a {
    color: #95a5a6;
    text-decoration: none;
}

.breadcrumb a:hover {
    color: #ecf0f1;
}

.breadcrumb-separator {
    color: #7f8c8d;
    margin: 0 8px;
}

.breadcrumb-current {
    color: #ecf0f1;
    font-weight: 600;
}

/* ===========================
   CONTAINER
   ===========================*/
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 48px 40px;
}

/* ===========================
   BACK LINK
   ===========================*/
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #2c5aa0;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 24px;
    transition: color 0.2s ease;
}

.back-link:hover {
    color: #4a9eff;
}

/* ===========================
   CARDS & SECTIONS
   ===========================*/
.card {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 32px;
    margin-bottom: 24px;
}

.section {
    margin-bottom: 48px;
}

.section-header {
    font-size: 24px;
    font-weight: 800;
    color: #1a2332;
    margin: 0 0 32px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 3px solid #2c5aa0;
    padding-bottom: 12px;
}

/* ===========================
   STATS
   ===========================*/
.stats-bar {
    display: flex;
    gap: 32px;
    padding: 20px 0;
    border-top: 2px solid #dee2e6;
    border-bottom: 2px solid #dee2e6;
    margin-bottom: 32px;
}

.stat-item {
    text-align: left;
}

.stat-value {
    font-size: 28px;
    font-weight: 800;
    color: #2c5aa0;
    margin-bottom: 4px;
    display: block;
}

.stat-label {
    font-size: 12px;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ===========================
   TABLES
   ===========================*/
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border: 1px solid #dee2e6;
}

.data-table thead {
    background: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
}

.data-table th {
    padding: 16px 24px;
    text-align: left;
    font-size: 12px;
    color: #6c757d;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-table td {
    padding: 20px 24px;
    color: #495057;
    border-bottom: 1px solid #e9ecef;
}

.data-table tbody tr:hover {
    background: #f8f9fa;
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

/* ===========================
   BADGES
   ===========================*/
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.badge-high {
    background: #f8d7da;
    color: #721c24;
}

.badge-medium {
    background: #fff3cd;
    color: #856404;
}

.badge-low {
    background: #d4edda;
    color: #155724;
}

.badge-info {
    background: #d1ecf1;
    color: #0c5460;
}

/* ===========================
   BUTTONS
   ===========================*/
.btn {
    display: inline-block;
    padding: 14px 32px;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.btn-primary {
    background: #2c5aa0;
    color: white;
}

.btn-primary:hover {
    background: #4a9eff;
    color: white;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
    color: white;
}

/* ===========================
   FORMS
   ===========================*/
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #ced4da;
    background: white;
    color: #495057;
    font-size: 15px;
    font-family: inherit;
    transition: border-color 0.2s ease;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: #2c5aa0;
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

/* ===========================
   GRID SYSTEMS
   ===========================*/
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.grid-auto {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

/* ===========================
   FEATURE BOXES
   ===========================*/
.feature-box {
    background: white;
    border: 1px solid #dee2e6;
    padding: 32px;
}

.feature-icon {
    color: #2c5aa0;
    font-size: 32px;
    margin-bottom: 16px;
    display: block;
}

.feature-title {
    font-size: 16px;
    font-weight: 700;
    color: #1a2332;
    margin: 0 0 8px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.feature-description {
    font-size: 14px;
    color: #495057;
    margin: 0;
    line-height: 1.6;
}

/* ===========================
   CTA SECTIONS
   ===========================*/
.cta-section {
    background: #1a2332;
    border-left: 4px solid #2c5aa0;
    padding: 48px;
    text-align: center;
    margin: 48px 0;
}

.cta-title {
    font-size: 28px;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 16px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cta-description {
    font-size: 16px;
    color: #8a93a3;
    margin: 0 0 32px 0;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.cta-form {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    gap: 12px;
}

.cta-form input {
    flex: 1;
    padding: 16px 20px;
    border: 1px solid #34495e;
    background: #2c3e50;
    color: white;
    font-size: 14px;
    font-family: inherit;
}

.cta-form input::placeholder {
    color: #8a93a3;
}

.cta-form button {
    background: #2c5aa0;
    color: white;
    border: none;
    padding: 16px 32px;
    font-weight: 700;
    cursor: pointer;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cta-form button:hover {
    background: #4a9eff;
}

/* ===========================
   FOOTER
   ===========================*/
.main-footer {
    background: #1a2332;
    border-top: 1px solid #2c3e50;
    padding: 24px 0;
    margin-top: 64px;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    text-align: center;
}

.footer-text {
    margin: 0;
    font-size: 12px;
    color: #8a93a3;
}

/* ===========================
   IFRAME CONTAINERS
   ===========================*/
.tool-container {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 48px;
}

.tool-header {
    background: #f8f9fa;
    padding: 20px 24px;
    border-bottom: 2px solid #dee2e6;
}

.tool-header h3 {
    color: #1a2332;
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tool-iframe {
    width: 100%;
    height: 75vh;
    min-height: 600px;
    border: none;
    display: block;
    background: white;
}

/* ===========================
   LOADING & ERROR STATES
   ===========================*/
.loading-message {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
    font-size: 16px;
}

.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #e9ecef;
    border-radius: 50%;
    border-top-color: #2c5aa0;
    animation: spin 1s ease-in-out infinite;
    margin-right: 10px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.error-message {
    text-align: center;
    padding: 40px;
    color: #721c24;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    margin: 20px;
}

/* ===========================
   RESPONSIVE DESIGN
   ===========================*/
@media (max-width: 1024px) {
    .header-container,
    .breadcrumb-container,
    .container,
    .footer-container {
        padding-left: 24px;
        padding-right: 24px;
    }
    
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .header-nav {
        gap: 20px;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .stats-bar {
        flex-direction: column;
        gap: 16px;
    }
    
    .cta-form {
        flex-direction: column;
    }
    
    .data-table {
        font-size: 13px;
    }
    
    .data-table th,
    .data-table td {
        padding: 12px 16px;
    }
    
    .tool-iframe {
        height: 70vh;
        min-height: 500px;
    }
}

/* ===========================
   UTILITY CLASSES
   ===========================*/
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }
.mb-5 { margin-bottom: 48px; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mt-5 { margin-top: 48px; }