/* Base Styles */
:root {
    --primary-color: #003355;
    --secondary-color: #004d80;
    --accent-color: #e4007c;
    --text-color: #333;
    --light-text: #666;
    --background-light: #f8f9fa;
    --white: #ffffff;
    --border-color: #e0e0e0;
    --box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
    --portal-gradient: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    --portal-hover: linear-gradient(135deg, #2a5298 0%, #1e3c72 100%);
    --csc-blue: #002e5d;
    --csc-light-blue: #0056b3;
    --csc-accent: #00a0df;
    --csc-gray: #f5f7fa;
    --csc-dark-gray: #6c757d;
    --csc-border: #e0e0e0;
    --csc-green: #28a745;
    --csc-orange: #fd7e14;
    --csc-red: #dc3545;
    --csc-purple: #6f42c1;
    --sim-green: #2ecc71;
    --sim-green-hover: #27ae60;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Open Sans", sans-serif !important;
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: normal;
    font-variation-settings: "wdth" 100;
    color: var(--text-color);
    line-height: 1.6;
    background-color: #EDEDED;
}

/* Focus styles for accessibility */
:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
.main-header {
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    position: relative;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--text-color);
    z-index: 1002;
}

.logo img {
    height: 40px;
    margin-right: 10px;
}

.logo span {
    font-size: 1.0rem;
    font-weight: bold;
    color: var(--primary-color);
    font-family: sans-serif;
}

/* Right side header actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
    z-index: 1002;
}

/* Hamburger Menu Button - Smaller on all devices */
.mobile-menu-toggle {
    display: block;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1002;
    position: relative;
    order: 1;
}

.hamburger {
    display: block;
    width: 18px;
    height: 2px;
    background-color: var(--primary-color);
    margin: 4px 0;
    transition: var(--transition);
    border-radius: 2px;
}

/* Hamburger Animation when Active */
.mobile-menu-toggle.active .hamburger:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

.mobile-menu-toggle.active .hamburger:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active .hamburger:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

/* Client Portal Button */
.client-portal-button {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--portal-gradient);
    color: white;
    padding: 10px 20px;
    border-radius: 50px;
    font-weight: 600;
    letter-spacing: 0.3px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    font-size: 16px;
    white-space: nowrap;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    text-decoration: none;
    order: 2;
}

.client-portal-button:hover {
    background: var(--portal-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
    color: white;
}

.client-portal-button .lock-icon {
    font-size: 16px;
    filter: drop-shadow(0 2px 2px rgba(0,0,0,0.2));
}

/* Main Navigation - Compact Dropdown from Button */
.main-nav {
    display: none;
    position: absolute;
    top: 70px;
    right: 0;
    width: auto;
    min-width: 180px;
    max-width: 250px;
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    padding: 8px 0;
    z-index: 1001;
    border: 1px solid var(--border-color);
}

.main-nav.active {
    display: block;
}

.main-nav ul {
    display: flex;
    flex-direction: column;
    list-style: none;
    align-items: flex-end;
}

.main-nav li {
    margin: 0;
    width: 100%;
    text-align: right;
}

.main-nav a {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding: 10px 25px;
    text-decoration: none;
    color: var(--text-color);
    font-weight: 400;
    font-size: 0.9rem;
    transition: var(--transition);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    text-align: right;
    white-space: nowrap;
}

.main-nav a:hover {
    background-color: #f5f8ff;
    color: var(--primary-color);
    padding-right: 30px;
}

/* Menu Icons */
.menu-icon {
    font-size: 1rem;
    opacity: 0.7;
    transition: var(--transition);
}

.main-nav a:hover .menu-icon {
    opacity: 1;
    transform: scale(1.1);
    color: var(--accent-color);
}

/* Hero Section */
/* ===== UNIVERSAL HERO STYLES - FORCE CONSISTENCY ON ALL PAGES ===== */
.hero {
    background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url('/header.jpg');
    background-size: cover !important;
    background-repeat: no-repeat !important;
    background-position: bottom !important;
    color: white;
    padding: 100px 0 !important;  /* Force exact padding */
    text-align: center;
    opacity: 0;
    transition: opacity 0.8s ease;
    position: relative;
    overflow: hidden;
    min-height: auto; /* Remove any min-height that might interfere */
}

.hero.loaded {
    opacity: 1;
    /* background-image is added by JS, but we keep the fallback */
}

.hero-content {
    max-width: 800px !important;
    min-height: 400px !important;  /* Force exact min-height */
    margin: 0 auto !important;
    padding: 0 20px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
}

/* Text styles */
.hero h1 {
    font-size: 2.5rem !important;
    margin-bottom: 20px !important;
    color: white !important;
    font-weight: 700 !important;
    opacity: 0;
    transform: translateY(-100px);
}

.hero p {
    font-size: 1.2rem !important;
    margin-bottom: 30px !important;
    color: white !important;
    opacity: 0;
    transform: translateY(-100px);
}

.hero .cta-button {
    display: inline-block !important;
    background-color: #e4007c !important;
    color: white !important;
    padding: 12px 30px !important;
    border-radius: 4px !important;
    text-decoration: none !important;
    font-weight: 600 !important;
    transition: all 0.3s ease !important;
    align-self: center !important;
    opacity: 0;
    transform: translateY(-100px);
}

.hero .cta-button:hover {
    background-color: #003355 !important;
    transform: translateY(-2px) !important;
}

/* Animation classes */
.hero h1.animate {
    animation: fallBounce 1.2s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

.hero p.animate {
    animation: fallBounce 1.2s cubic-bezier(0.68, -0.55, 0.265, 1.55) 0.2s forwards;
}

.hero .cta-button.animate {
    animation: fallBounce 1.2s cubic-bezier(0.68, -0.55, 0.265, 1.55) 0.4s forwards;
}

@keyframes fallBounce {
    0% {
        transform: translateY(-100px);
        opacity: 0;
    }
    60% {
        transform: translateY(15px);
        opacity: 1;
    }
    75% {
        transform: translateY(-8px);
        opacity: 1;
    }
    90% {
        transform: translateY(5px);
        opacity: 1;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hero {
        padding: 60px 0 !important;
    }
    
    .hero h1 {
        font-size: 2rem !important;
    }
    
    .hero p {
        font-size: 1rem !important;
    }
    
    .hero-content {
        min-height: 300px !important;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 40px 0 !important;
    }
    
    .hero-content {
        min-height: 250px !important;
    }
}
.cta-button {
    display: inline-block;
    background-color: var(--accent-color);
    color: var(--white);
    padding: 12px 30px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
    transition: var(--transition);
    align-self: center;
}

.cta-button:hover {
    background-color: var(--primary-color);
    transform: translateY(-2px);
}

/* Services Section */
.services-section {
    padding: 80px 0;
    background-color: var(--background-light);
}

.services-section h2 {
    text-align: center;
    margin-bottom: 50px;
    font-size: 2rem;
    color: var(--primary-color);
}

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

.service-card {
    background-color: var(--white);
    padding: 30px;
    border-radius: 8px;
    box-shadow: var(--box-shadow);
    text-align: center;
    transition: var(--transition);
}

.service-card:hover {
    transform: translateY(-10px);
}

.service-icon {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.service-card h3 {
    margin-bottom: 15px;
    color: var(--primary-color);
}

/* About Section */
.about-section {
    padding: 80px 0;
}

.about-content {
    display: flex;
    align-items: center;
    gap: 50px;
}

.about-text {
    flex: 1;
}

.about-text h2 {
    margin-bottom: 20px;
    color: var(--primary-color);
}

.about-text p {
    margin-bottom: 20px;
}

.learn-more {
    display: inline-block;
    color: var(--accent-color);
    text-decoration: none;
    font-weight: bold;
    transition: var(--transition);
}

.learn-more:hover {
    color: var(--primary-color);
}

.about-image {
    flex: 1;
}

.about-image img {
    width: 100%;
    border-radius: 8px;
    box-shadow: var(--box-shadow);
}

/* Solutions Section */
.solutions-section {
    padding: 80px 0;
    background-color: var(--background-light);
}

.solutions-section h2 {
    text-align: center;
    margin-bottom: 50px;
    color: var(--primary-color);
}

.solutions-tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
    gap: 10px;
}

.tab-button {
    padding: 10px 20px;
    background-color: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
}

.tab-button:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

.tab-button.active {
    background-color: var(--primary-color);
    color: var(--white);
}

.tab-content {
    display: none;
    background-color: var(--white);
    padding: 30px;
    border-radius: 8px;
    box-shadow: var(--box-shadow);
}

.tab-content.active {
    display: block;
}

.tab-content h3 {
    margin-bottom: 15px;
    color: var(--primary-color);
}

/* Insights Section */
.insights-section {
    padding: 80px 0;
}

.insights-section h2 {
    text-align: center;
    margin-bottom: 50px;
    color: var(--primary-color);
}

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

.insight-card {
    background-color: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.insight-card:hover {
    transform: translateY(-5px);
}

.insight-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.insight-content {
    padding: 20px;
}

.insight-content h3 {
    margin-bottom: 10px;
    color: var(--primary-color);
}

.read-more {
    display: inline-block;
    color: var(--accent-color);
    text-decoration: none;
    font-weight: bold;
    margin-top: 15px;
    transition: var(--transition);
}

.read-more:hover {
    color: var(--primary-color);
}

/* Contact Section */
.contact-section {
    padding: 80px 0;
    background-color: var(--background-light);
}

.contact-content {
    display: flex;
    gap: 50px;
}

.contact-info {
    flex: 1;
}

.contact-info h2 {
    margin-bottom: 20px;
    color: var(--primary-color);
}

.contact-details {
    margin-top: 30px;
}

.contact-details p {
    margin-bottom: 15px;
}

.contact-form {
    flex: 1;
    background-color: var(--white);
    padding: 30px;
    border-radius: 8px;
    box-shadow: var(--box-shadow);
}

.form-group {
    margin-bottom: 20px;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: inherit;
}

.form-group textarea {
    resize: vertical;
}

.submit-button {
    background-color: var(--accent-color);
    color: var(--white);
    padding: 12px 30px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: var(--transition);
}

.submit-button:hover {
    background-color: var(--primary-color);
}

/* Footer */
.main-footer {
    background-color: var(--primary-color);
    background-image: url('/rainbow-dot-map.svg');
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center;
    color: var(--white);
    padding: 60px 0 20px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
}

.footer-logo {
    margin-bottom: 20px;
}

.footer-logo img {
    height: 40px;
    margin-right: 10px;
}

.footer-logo span {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--white);
}

.footer-links {
    display: flex;
    gap: 50px;
}

.links-column h4 {
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.links-column ul {
    list-style: none;
}

.links-column li {
    margin-bottom: 10px;
}

.links-column a {
    color: var(--white);
    text-decoration: none;
    transition: var(--transition);
    font-weight: 400;
    text-shadow: 2px 2px 4px #000000;
}

.links-column a:hover {
    color: var(--accent-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
}

/* Form Validation Styles */
input:invalid + span::after {
    position: absolute;
    content: "✖";
    padding-left: 5px;
    color: darkred;
}

input:valid + span::after {
    position: absolute;
    content: "✓";
    padding-left: 5px;
    color: #009000;
}

input::placeholder {
    color: grey;
}

/* ===== BOND PAGE SPECIFIC STYLES ===== */

/* Bond Summary Cards */
.bond-summary-section {
    padding: 4rem 0 2rem;
    background-color: white;
}

.section-title {
    color: var(--csc-blue);
    font-weight: 700;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 3px solid var(--csc-accent);
    display: inline-block;
}

.bond-card {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    border: 1px solid var(--csc-border);
    margin-bottom: 2rem;
    transition: transform 0.3s, box-shadow 0.3s;
    background-color: white;
    cursor: pointer;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.bond-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.bond-card.active {
    border: 2px solid var(--csc-accent);
    box-shadow: 0 0 0 3px rgba(0,160,223,0.2);
}

.bond-header {
    background: linear-gradient(to right, var(--csc-blue), var(--csc-light-blue));
    color: white;
    padding: 1.5rem;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}

.bond-header h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
    line-height: 1.3;
    padding-right: 70px; /* Increased from 20px to make room for logo */
}

.bond-header .isin {
    font-size: 0.9rem;
    opacity: 0.8;
    font-family: monospace;
    margin-top: auto;
}

.bond-body {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.bond-logo img {
    width: 80px;
    height: 80px;
    background-color: var(--csc-gray);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    font-size: 2rem;
    color: var(--csc-blue);
    border: 1px solid var(--csc-border);
    object-fit: contain;
}

.bond-details {
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px dashed var(--csc-border);
}

.detail-label {
    color: var(--csc-dark-gray);
}

.detail-value {
    font-weight: 600;
    color: var(--csc-blue);
}

.roi-value {
    color: var(--csc-green);
    font-weight: 700;
}

.maturity-value {
    color: var(--csc-purple);
    font-weight: 600;
}

.min-amount {
    color: var(--csc-orange);
}

.price-change-positive {
    color: var(--csc-green);
    font-weight: 600;
}

.price-change-negative {
    color: var(--csc-red);
    font-weight: 600;
}

.bond-footer {
    padding: 1.5rem;
    background-color: var(--csc-gray);
    border-top: 1px solid var(--csc-border);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Bond button row - side by side layout */
.bond-button-row {
    display: flex;
    gap: 8px;
    width: 100%;
}

.bond-button-row .simulate-button,
.bond-button-row .market-link {
    flex: 1;
    min-width: 0;
    padding: 8px 12px;
    font-size: 0.85rem;
    white-space: nowrap;
}

.bond-button-row .simulate-button i,
.bond-button-row .market-link i {
    margin-right: 4px;
}

/* Green Simulate Button */
.simulate-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background-color: var(--sim-green);
    color: white;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    width: 100%;
    text-align: center;
    box-shadow: 0 2px 8px rgba(46, 204, 113, 0.2);
}

.simulate-button:hover {
    background-color: var(--sim-green-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(46, 204, 113, 0.3);
    color: white;
}

.simulate-button i {
    font-size: 1rem;
}

/* Market Link */
.market-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--csc-accent);
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 4px;
    background-color: rgba(0, 160, 223, 0.1);
    transition: all 0.3s;
    width: 100%;
}

.market-link:hover {
    background-color: rgba(0, 160, 223, 0.2);
    color: var(--csc-light-blue);
    text-decoration: none;
}

.market-link i {
    font-size: 0.9rem;
}

/* CSC Buy Back Guarantee Notice */
.buyback-guarantee-notice {
    background: linear-gradient(135deg, rgba(0, 160, 223, 0.08) 0%, rgba(46, 204, 113, 0.08) 100%);
    border-left: 6px solid var(--csc-accent);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    animation: fadeIn 0.8s ease;
}

.buyback-guarantee-notice h5 {
    color: var(--csc-blue);
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.buyback-guarantee-notice p {
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.buyback-guarantee-notice .guarantee-highlight {
    background-color: rgba(0, 160, 223, 0.1);
    border-radius: 20px;
    padding: 0.25rem 1rem;
    display: inline-block;
    margin-top: 0.5rem;
}

/* Bond Price Display */
.bond-price-display {
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bond-price-display .loading {
    text-align: center;
    color: var(--csc-dark-gray);
}

.bond-price-display .price-value {
    font-size: 1.1rem;
    font-weight: 600;
}

.bond-price-display .price-change {
    font-size: 0.9rem;
}

.bond-price-display .price-meta {
    font-size: 0.8rem;
    color: var(--csc-dark-gray);
    margin-top: 0.25rem;
}

.bond-price-display .source-badge {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
    font-size: 0.7rem;
    margin-top: 0.25rem;
}

.source-live {
    background-color: rgba(40, 167, 69, 0.1);
    color: var(--csc-green);
    border: 1px solid rgba(40, 167, 69, 0.3);
}

.source-estimated {
    background-color: rgba(23, 162, 184, 0.1);
    color: #17a2b8;
    border: 1px solid rgba(23, 162, 184, 0.3);
}

.source-closed {
    background-color: rgba(108, 117, 125, 0.1);
    color: var(--csc-dark-gray);
    border: 1px solid rgba(108, 117, 125, 0.3);
}

/* Market Status */
.market-status {
    font-size: 0.75rem;
    padding: 2px 6px;
    border-radius: 3px;
    display: inline-block;
}

.market-open {
    background-color: rgba(40, 167, 69, 0.1);
    color: var(--csc-green);
    border: 1px solid rgba(40, 167, 69, 0.3);
}

.market-closed {
    background-color: rgba(108, 117, 125, 0.1);
    color: var(--csc-dark-gray);
    border: 1px solid rgba(108, 117, 125, 0.3);
}

.global-market-info {
    background-color: rgba(0, 160, 223, 0.05);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--csc-accent);
}

/* Data Source Info */
.data-source-info {
    background-color: rgba(0, 160, 223, 0.05);
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
    border-left: 3px solid var(--csc-accent);
}

.data-source-info h6 {
    color: var(--csc-blue);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.data-source-info p {
    font-size: 0.9rem;
    color: var(--csc-dark-gray);
    margin-bottom: 0.5rem;
}

.data-source-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
}

.data-source-deutsche {
    background-color: rgba(0, 46, 93, 0.1);
    color: var(--csc-blue);
    border: 1px solid rgba(0, 46, 93, 0.2);
}

.data-source-estimated {
    background-color: rgba(23, 162, 184, 0.1);
    color: #17a2b8;
    border: 1px solid rgba(23, 162, 184, 0.2);
}

.data-source-closed {
    background-color: rgba(108, 117, 125, 0.1);
    color: var(--csc-dark-gray);
    border: 1px solid rgba(108, 117, 125, 0.2);
}

/* Simulation Section */
.simulation-section {
    padding: 4rem 0;
    background-color: var(--csc-gray);
}

.simulation-container {
    background-color: white;
    border-radius: 10px;
    padding: 2.5rem;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    border: 1px solid var(--csc-border);
}

.simulation-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.simulation-header h2 {
    color: var(--csc-blue);
    font-weight: 700;
    margin-bottom: 1rem;
}

.simulation-header p {
    color: var(--csc-dark-gray);
    max-width: 700px;
    margin: 0 auto;
}

/* Maturity Date Clarification */
.maturity-clarification {
    background-color: rgba(111, 66, 193, 0.05);
    border-left: 4px solid var(--csc-purple);
    border-radius: 4px;
    padding: 0.75rem 1rem;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.maturity-clarification i {
    color: var(--csc-purple);
    margin-right: 0.5rem;
}

/* Simulation Dropdown */
.simulation-dropdown {
    max-width: 400px;
    margin: 0 auto;
    display: block;
    text-align: center;
    text-align-last: center;
    padding: 0.75rem 2.5rem 0.75rem 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid var(--csc-border);
    border-radius: 6px;
    background-color: white;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23002e5d' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 16px 12px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.simulation-dropdown:hover {
    border-color: var(--csc-accent);
    box-shadow: 0 0 0 0.25rem rgba(0, 160, 223, 0.15);
}

.simulation-dropdown:focus {
    border-color: var(--csc-accent);
    box-shadow: 0 0 0 0.25rem rgba(0, 160, 223, 0.15);
    outline: none;
}

/* Simulation Results */
.simulation-results {
    background-color: rgba(0,160,223,0.05);
    border-radius: 10px;
    padding: 2rem;
    border-left: 4px solid var(--csc-accent);
    margin-top: 2rem;
}

.result-item {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.result-item:last-child {
    border-bottom: none;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--csc-blue);
}

.result-label {
    color: var(--csc-dark-gray);
}

.result-value {
    font-weight: 600;
    color: var(--csc-blue);
}

.total-return {
    color: var(--csc-green) !important;
}

.fee-amount {
    color: var(--csc-orange);
}

/* Editable Amount */
.editable-amount-container {
    text-align: center;
    margin: 1rem 0 1.5rem;
}

.editable-amount-label {
    color: var(--csc-dark-gray);
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
    display: block;
}

.editable-amount-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--csc-blue);
    cursor: text;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: inline-block;
    min-width: 150px;
    border: 2px solid transparent;
}

.editable-amount-value:hover {
    background-color: rgba(0, 160, 223, 0.05);
}

.editable-amount-value:focus {
    outline: none;
    border-color: var(--csc-accent);
    background-color: rgba(0, 160, 223, 0.1);
    box-shadow: 0 0 0 0.25rem rgba(0, 160, 223, 0.15);
}

.editable-amount-input {
    font-size: 2rem;
    font-weight: 700;
    color: var(--csc-blue);
    text-align: center;
    border: 2px solid var(--csc-accent);
    border-radius: 8px;
    background-color: white;
    padding: 0.5rem;
    width: 200px;
    max-width: 100%;
    display: none;
}

.editable-amount-input:focus {
    outline: none;
    box-shadow: 0 0 0 0.25rem rgba(0, 160, 223, 0.15);
}

/* Buttons */
.btn-simulate {
    background-color: var(--csc-accent);
    color: white;
    font-weight: 600;
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 6px;
    transition: all 0.3s;
    width: 100%;
}

.btn-simulate:hover {
    background-color: var(--csc-light-blue);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,160,223,0.2);
    color: white;
}

.btn-callback {
    background-color: var(--csc-accent);
    color: white;
    font-weight: 600;
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 6px;
    transition: all 0.3s;
    width: 100%;
}

.btn-callback:hover {
    background-color: var(--csc-light-blue);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,160,223,0.2);
    color: white;
}

.btn-apply {
    background-color: var(--csc-blue);
    color: white;
    font-weight: 600;
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 6px;
    transition: all 0.3s;
    width: 100%;
}

.btn-apply:hover {
    background-color: var(--csc-light-blue);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,46,93,0.15);
    color: white;
}

/* Application Link Notice */
.application-link-notice {
    background: linear-gradient(135deg, rgba(0,160,223,0.1) 0%, rgba(40,167,69,0.1) 100%);
    border-left: 4px solid var(--csc-accent);
    padding: 1rem;
    border-radius: 4px;
    margin-top: 1.5rem;
    animation: fadeIn 0.5s ease;
    display: none;
}

.application-link-notice.show {
    display: block;
}

.simulation-data-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.75rem;
    margin-top: 1rem;
}

.simulation-data-item {
    background-color: white;
    padding: 0.75rem;
    border-radius: 4px;
    border: 1px solid var(--csc-border);
    text-align: center;
}

.simulation-data-label {
    font-size: 0.75rem;
    color: var(--csc-dark-gray);
    margin-bottom: 0.25rem;
}

.simulation-data-value {
    font-weight: 600;
    color: var(--csc-blue);
    font-size: 0.95rem;
}

/* ===== CALLBACK MODAL STYLES - MOBILE OPTIMIZED ===== */

/* Modal container - ensure it fits within viewport */
.modal-dialog {
    margin: 0.5rem;
    max-width: calc(100% - 1rem);
}

.modal-content {
    border-radius: 12px;
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* Modal header - more compact */
.modal-header {
    background-color: var(--csc-blue);
    color: white;
    padding: 1rem;
    border-bottom: none;
    border-radius: 12px 12px 0 0;
}

.modal-header .modal-title {
    font-size: 1.1rem;
    font-weight: 600;
}

.modal-header .btn-close {
    filter: brightness(0) invert(1);
    opacity: 0.8;
    font-size: 0.8rem;
}

/* Modal body - scrollable if needed */
.modal-body {
    padding: 1.25rem;
    max-height: calc(100vh - 130px);
    overflow-y: auto;
}

/* Form fields - smaller and more compact */
.modal-body .form-label {
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
    color: var(--csc-blue);
    font-weight: 500;
}

.modal-body .form-control,
.modal-body .form-select {
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
    border: 1px solid var(--csc-border);
    border-radius: 6px;
    height: auto;
    min-height: 38px;
}

.modal-body .form-control:focus,
.modal-body .form-select:focus {
    border-color: var(--csc-accent);
    box-shadow: 0 0 0 0.2rem rgba(0, 160, 223, 0.15);
}

/* Reduce spacing between form groups */
.modal-body .mb-3 {
    margin-bottom: 0.75rem !important;
}

/* Alert within modal - more compact */
.modal-body .alert {
    padding: 0.5rem 0.75rem;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.8rem;
}

.modal-body .alert i {
    font-size: 0.9rem;
}

/* Modal footer - more compact */
.modal-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    gap: 0.5rem;
}

.modal-footer .btn {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    border-radius: 6px;
    margin: 0;
}

.modal-footer .btn-secondary {
    background-color: #6c757d;
    border: none;
}

.modal-footer .btn-callback {
    background-color: var(--csc-accent);
    border: none;
}

.modal-footer .btn-callback i {
    font-size: 0.9rem;
}

/* Mobile-specific optimizations */
@media (max-width: 576px) {
    .modal-dialog {
        margin: 0.25rem;
        max-width: calc(100% - 0.5rem);
    }
    
    .modal-body {
        padding: 1rem;
        max-height: calc(100vh - 120px);
    }
    
    .modal-header {
        padding: 0.75rem 1rem;
    }
    
    .modal-header .modal-title {
        font-size: 1rem;
    }
    
    .modal-body .form-label {
        font-size: 0.8rem;
    }
    
    .modal-body .form-control,
    .modal-body .form-select {
        padding: 0.4rem 0.6rem;
        font-size: 0.85rem;
        min-height: 36px;
    }
    
    .modal-footer {
        padding: 0.75rem 1rem;
    }
    
    .modal-footer .btn {
        padding: 0.4rem 0.75rem;
        font-size: 0.85rem;
    }
}

/* For very small devices */
@media (max-width: 375px) {
    .modal-body {
        padding: 0.875rem;
    }
    
    .modal-body .form-label {
        font-size: 0.75rem;
    }
    
    .modal-body .form-control,
    .modal-body .form-select {
        padding: 0.35rem 0.5rem;
        font-size: 0.8rem;
        min-height: 32px;
    }
    
    .modal-footer .btn {
        padding: 0.35rem 0.6rem;
        font-size: 0.8rem;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

.price-loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid var(--csc-accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* ===== RESPONSIVE STYLES ===== */
/* All mobile optimizations consolidated here */

@media (max-width: 992px) {
    .about-content,
    .contact-content {
        flex-direction: column;
    }
    
    .about-image,
    .contact-info {
        margin-top: 30px;
    }
    
    .simulation-container .col-lg-6:first-child {
        padding-right: 15px;
        border-right: none;
    }
    
    .simulation-container .col-lg-6:last-child {
        padding-left: 15px;
    }
}

@media (max-width: 768px) {
    /* Header mobile styles */
    .header-content {
        padding: 15px 0;
    }
    
    /* Logo image - KEPT AT FULL SIZE */
    .logo img {
        height: 40px;
        margin-right: 10px;
    }
    
    /* Only reduce text size, not the logo image */
    .logo span {
        font-size: 0.85rem;
        letter-spacing: -0.02em;
    }
    
    .header-actions {
        gap: 10px;
    }
    
    /* Smaller hamburger menu */
    .mobile-menu-toggle {
        padding: 6px;
    }
    
    .hamburger {
        width: 14px;
        margin: 3px 0;
    }
    
    .mobile-menu-toggle.active .hamburger:nth-child(1) {
        transform: translateY(5px) rotate(45deg);
    }
    
    .mobile-menu-toggle.active .hamburger:nth-child(3) {
        transform: translateY(-5px) rotate(-45deg);
    }
    
    /* Client portal button - icon only */
    .client-portal-button {
        padding: 8px;
        border-radius: 50%;
    }
    
    .client-portal-button span:not(.lock-icon) {
        display: none;
    }
    
    .client-portal-button .lock-icon {
        font-size: 16px;
        margin: 0;
    }
    
    /* Navigation dropdown */
    .main-nav {
        min-width: 160px;
        max-width: 220px;
        top: 65px;
    }
    
    .main-nav a {
        padding: 8px 20px;
        font-size: 0.85rem;
        gap: 10px;
    }
    
    /* Hero section */
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .hero-content {
        min-height: 300px;
    }
    
    /* Bond Card Mobile Styles */
    .bond-card {
        max-height: none;
        max-width: 100%;
        width: 100%;
        height: auto;
        margin-left: auto;
        margin-right: auto;
        font-size: 0.85rem;
    }
    
    .bond-card .bond-header {
        padding: 1rem;
        min-height: 100px;
    }
    
    .bond-card .bond-header h3 {
        font-size: 1.1rem;
        margin-bottom: 0.25rem;
        padding-right: 60px; /* Added padding for mobile to prevent overlap */
    }
        
    .bond-card .bond-header .isin {
        font-size: 0.75rem;
    }
    
    .bond-card .bond-body {
        padding: 1rem;
        overflow-y: visible;
    }
    
    .bond-card .bond-logo img {
        width: 60px;
        height: 60px;
        margin-bottom: 1rem;
    }
    
    .bond-card .bond-details {
        margin-bottom: 1rem;
    }
    
    .bond-card .detail-item,
    .bond-card .investment-term {
        padding: 0.35rem 0;
        font-size: 0.8rem;
    }
    
    /* Bond button row mobile */
    .bond-button-row {
        gap: 6px;
    }
    
    .bond-button-row .simulate-button,
    .bond-button-row .market-link {
        padding: 6px 8px;
        font-size: 0.75rem;
    }
    
    .bond-button-row .simulate-button i,
    .bond-button-row .market-link i {
        margin-right: 3px;
        font-size: 0.75rem;
    }
    
    .bond-card .bond-price-display {
        max-width: 100%;
        margin-left: 0;
        margin-right: 0;
    }
    
    .bond-card .bond-price-display .price-value {
        font-size: 0.9rem;
        font-weight: 600;
    }
    
    .bond-card .bond-price-display .price-meta {
        font-size: 0.7rem;
    }
    
    .bond-card .bond-price-display .source-badge {
        font-size: 0.65rem;
        padding: 0.15rem 0.4rem;
    }
    
    .bond-card .bond-price-content {
        text-align: right;
    }
    
    .bond-card .bond-footer {
        padding: 1rem;
        font-size: 0.8rem;
    }
    
    /* Buyback notice mobile */
    .buyback-guarantee-notice {
        padding: 1.25rem;
    }
    
    .buyback-guarantee-notice h5 {
        font-size: 1.1rem;
    }
    
    .buyback-guarantee-notice p {
        font-size: 0.9rem;
    }
    
    .buyback-guarantee-notice i {
        font-size: 1.5rem;
    }
    
    /* Simulation mobile */
    .simulation-container {
        padding: 1.5rem;
    }
    
    .simulation-results {
        padding: 1.25rem;
        margin-top: 1.5rem;
    }
    
    .simulation-dropdown {
        max-width: 100%;
    }
    
    .editable-amount-value {
        font-size: 1.75rem;
    }
    
    .btn-simulate,
    .btn-callback,
    .btn-apply {
        padding: 0.75rem 1rem;
        font-size: 0.95rem;
    }
}

@media (max-width: 576px) {
    /* Grid layouts */
    .services-grid,
    .insights-grid {
        grid-template-columns: 1fr;
    }
    
    .solutions-tabs {
        flex-direction: column;
    }
    
    /* Footer */
    .footer-content {
        flex-direction: column;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 30px;
        margin-top: 30px;
    }
    
    /* Navigation */
    .main-nav {
        min-width: 150px;
        max-width: 200px;
        right: 10px;
        top: 60px;
    }
    
    .main-nav a {
        padding: 8px 15px;
        font-size: 0.8rem;
        gap: 8px;
    }
    
    /* Bond card */
    .bond-card .bond-header h3 {
        font-size: 1rem;
    }
    
    .bond-button-row .simulate-button,
    .bond-button-row .market-link {
        font-size: 0.7rem;
        padding: 5px 6px;
    }
    
    .simulation-data-summary {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    /* Even smaller header elements - but NOT the logo image */
    .header-content {
        padding: 12px 0;
    }
    
    /* Logo image remains full size */
    .logo img {
        height: 40px;
        margin-right: 8px;
    }
    
    /* Only reduce text size further */
    .logo span {
        font-size: 0.75rem;
        max-width: 110px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        display: inline-block;
        vertical-align: middle;
    }
    
    .hamburger {
        width: 12px;
        margin: 2.5px 0;
    }
    
    .mobile-menu-toggle {
        padding: 5px;
    }
    
    .client-portal-button {
        padding: 6px;
    }
    
    .client-portal-button .lock-icon {
        font-size: 14px;
    }
    
    .main-nav {
        min-width: 140px;
        max-width: 180px;
        top: 55px;
    }
    
    /* Hero section */
    .hero {
        padding: 60px 0;
    }
    
    .hero h1 {
        font-size: 1.75rem;
    }
    
    /* Bond card */
    .bond-card .bond-header {
        padding: 0.85rem;
    }
    
    .bond-card .bond-header h3 {
        font-size: 0.95rem;
    }
    
    .bond-card .bond-header .isin {
        font-size: 0.7rem;
    }
    
    .bond-button-row {
        flex-direction: column;
        gap: 5px;
    }
    
    .bond-button-row .simulate-button,
    .bond-button-row .market-link {
        width: 100%;
        font-size: 0.75rem;
        padding: 6px 10px;
    }
    
    .simulation-container {
        padding: 1rem;
    }
    
    .editable-amount-value {
        font-size: 1.5rem;
    }
    
    .result-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
}

@media (max-width: 360px) {
    /* Extremely small devices */
    .logo img {
        height: 40px;
        margin-right: 6px;
    }
    
    .logo span {
        font-size: 0.65rem;
        max-width: 100px;
    }
    
    .hamburger {
        width: 11px;
    }
    
    .client-portal-button .lock-icon {
        font-size: 12px;
    }
    
    .hero h1 {
        font-size: 1.5rem;
    }
    
    .bond-card .bond-header h3 {
        font-size: 0.9rem;
    }
    
    .bond-button-row .simulate-button,
    .bond-button-row .market-link {
        font-size: 0.7rem;
        padding: 5px 8px;
    }
}

/* ===== MOBILE TEXT SIZE REDUCTION - ALL NON-HEADING TEXT ===== */
@media (max-width: 768px) {
    /* Base text size reduction for all non-heading text */
    body, 
    p, 
    li, 
    a:not(.logo):not(.cta-button):not(.client-portal-button):not(.simulate-button):not(.market-link):not(.btn),
    span:not(.logo span):not(.h1):not(.h2):not(.h3):not(.h4):not(.h5):not(.h6),
    div:not(.hero h1):not(.hero p):not(.section-title),
    .form-label,
    .form-control,
    .form-select,
    .alert,
    .detail-label,
    .detail-value,
    .bond-footer,
    .bond-price-display,
    .data-source-info,
    .market-status,
    .source-badge {
        font-size: 0.85rem !important;
    }

    /* Further reduction for very small text elements */
    .isin,
    .price-meta,
    .source-badge,
    .market-status,
    .data-source-badge,
    .simulation-data-label,
    .simulation-data-value,
    .small-text,
    .text-muted,
    .bond-card .isin,
    .bond-price-display .price-meta,
    .bond-price-display .source-badge {
        font-size: 0.7rem !important;
    }

    /* Form elements specific sizing */
    .form-control,
    .form-select,
    .form-control::placeholder,
    .form-select::placeholder {
        font-size: 0.8rem !important;
    }

    /* Button text - slightly larger for better touch targets but still reduced */
    .simulate-button,
    .market-link,
    .btn,
    .cta-button,
    .submit-button {
        font-size: 0.8rem !important;
    }

    /* Compact form spacing */
    .form-group {
        margin-bottom: 0.75rem !important;
    }

    /* Reduce padding in cards for more compact view */
    .bond-card .bond-body {
        padding: 0.75rem !important;
    }

    .bond-card .bond-footer {
        padding: 0.75rem !important;
    }

    /* Tighter detail items */
    .detail-item {
        padding: 0.25rem 0 !important;
    }
}

/* Extra small devices - even smaller text */
@media (max-width: 480px) {
    body, 
    p, 
    li, 
    a:not(.logo):not(.cta-button):not(.client-portal-button):not(.simulate-button):not(.market-link):not(.btn),
    span:not(.logo span):not(.h1):not(.h2):not(.h3):not(.h4):not(.h5):not(.h6),
    div:not(.hero h1):not(.hero p):not(.section-title) {
        font-size: 0.8rem !important;
    }

    .isin,
    .price-meta,
    .source-badge,
    .market-status,
    .data-source-badge,
    .small-text,
    .text-muted {
        font-size: 0.65rem !important;
    }

    .simulate-button,
    .market-link,
    .btn,
    .cta-button,
    .submit-button {
        font-size: 0.75rem !important;
        padding: 0.4rem 0.6rem !important;
    }
}

/* Very small devices - minimum text size */
@media (max-width: 360px) {
    body, 
    p, 
    li, 
    a:not(.logo):not(.cta-button):not(.client-portal-button):not(.simulate-button):not(.market-link):not(.btn),
    span:not(.logo span):not(.h1):not(.h2):not(.h3):not(.h4):not(.h5):not(.h6) {
        font-size: 0.75rem !important;
    }

    .isin,
    .price-meta,
    .source-badge,
    .market-status,
    .data-source-badge {
        font-size: 0.6rem !important;
    }
}

/* Preserve heading sizes on mobile */
@media (max-width: 768px) {
    h1, .h1,
    h2, .h2,
    h3, .h3,
    h4, .h4,
    h5, .h5,
    h6, .h6,
    .hero h1,
    .hero p,
    .section-title,
    .bond-header h3,
    .modal-title,
    .simulation-header h2 {
        font-size: revert !important; /* Keep original heading sizes */
    }
    /* Adjust hero text specifically but keep larger than body */
    .hero p {
        font-size: 0.9rem !important; /* Keep hero paragraph readable */
        font-weight:200;
    }

    /* Bond card titles */
    .bond-header h3 {
        font-size: 1rem !important; /* Keep bond titles prominent */
    }
}

/* ULTIMATE OVERRIDE - Force hero h1 to be lighter on mobile */
@media (max-width: 768px) {
    .hero h1,
    section.hero h1,
    .hero-content h1,
    div.hero h1 {
        font-weight: 400 !important;
        font-family: 'Open Sans', sans-serif !important;
    }
}

@media (max-width: 480px) {
    .hero h1,
    section.hero h1,
    .hero-content h1,
    div.hero h1 {
        font-weight: 300 !important;
        font-family: 'Open Sans', sans-serif !important;
    }
}

/* SUPER AGGRESSIVE OVERRIDE - Force hero h1 to be lighter on ALL devices */
html body .hero h1,
html body section.hero h1,
html body .hero-content h1 {
    font-weight: 500 !important;
    font-family: 'Open Sans', sans-serif !important;
}
}