/*
Component Styles - All UI components for the M&A platform
*/

/* ===== BUTTONS ===== */
.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.6rem;
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background-color: #475569;
}

/* ===== NEWS COMPACT LIST ===== */
.news-list-compact {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.news-item-compact {
    padding: 0.6rem;
    border-left: 2px solid var(--primary-color);
    background: var(--bg-color);
    border-radius: 6px;
    transition: var(--transition);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.news-item-compact:hover {
    background: #f1f5f9;
    transform: translateX(2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.news-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.3rem;
}

.news-badge {
    background: var(--primary-color);
    color: white;
    padding: 0.1rem 0.2rem;
    border-radius: 3px;
    font-size: 0.4rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.05rem;
}

.news-badge i {
    font-size: 0.3rem;
}

.news-date-small {
    font-size: 0.7rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.news-title-compact {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0.8rem 0;
    line-height: 1.2;
}

.news-link-small {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.5rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.1rem;
    margin-top: 0.2rem;
}

.news-link-small:hover {
    gap: 0.2rem;
}

/* ===== FUNDRAISING COMPACT LIST ===== */
.fundraising-list-compact {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.fundraising-item-compact {
    padding: 1rem;
    background: var(--bg-color);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border-left: 4px solid var(--primary-color);
}

.fund-name-compact {
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.2rem;
    font-size: 0.6rem;
    line-height: 1.2;
}

.fund-details-compact {
    font-size: 0.5rem;
    color: var(--text-secondary);
    margin-bottom: 0.3rem;
    font-weight: 500;
}

.progress-badge {
    background: var(--primary-color);
    color: white;
    padding: 0.3rem 0.6rem;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 600;
}

.progress-bar {
    height: 5px;
    background: #e2e8f0;
    border-radius: 6px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-dark));
    border-radius: 6px;
    transition: width 0.5s ease;
}

/* ===== PE FIRMS GRID ===== */
.pe-firms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.pe-firm-card-compact {
    display: flex;
    align-items: center;
    padding: 1.5rem;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    text-decoration: none;
    transition: var(--transition);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.pe-firm-card-compact:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.firm-logo-container {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    background: var(--bg-color);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1.2rem;
    flex-shrink: 0;
}

.firm-logo-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.firm-info-compact {
    flex: 1;
}

.firm-name-compact {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.firm-stats-compact {
    display: flex;
    gap: 1.2rem;
    font-size: 1rem;
    color: var(--text-secondary);
}

.firm-stats-compact i {
    margin-right: 0.25rem;
}

.firm-arrow {
    color: var(--primary-color);
    margin-left: 0.5rem;
}

/* ===== PE FIRM CARDS (Full) ===== */
.pe-firms-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.2rem;
}

.pe-firm-card {
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    text-decoration: none;
    transition: var(--transition);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: fadeInUp 0.5s ease forwards;
    opacity: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

@keyframes fadeInUp {
    to { opacity: 1; transform: translateY(0); }
}

.pe-firm-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.pe-firm-card-header {
    padding: 1.2rem;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80px;
}

.pe-firm-logo {
    max-width: 120px;
    max-height: 50px;
    object-fit: contain;
}

.pe-firm-icon-fallback {
    font-size: 2rem;
    color: var(--primary-color);
}

.pe-firm-card-body {
    padding: 1.2rem;
    flex: 1;
}

.pe-firm-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.8rem;
    line-height: 1.3;
}

.pe-firm-stats {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 0.8rem;
}

.stat-item-inline {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    padding: 0.3rem 0;
}

.stat-item-inline i {
    color: var(--primary-color);
    width: 16px;
    font-size: 0.8rem;
}

.pe-firm-description {
    color: var(--text-secondary);
    line-height: 1.4;
    font-size: 0.9rem;
}

.pe-firm-card-footer {
    padding: 0.8rem 1.2rem;
    border-top: 1px solid var(--border-color);
    background: var(--bg-color);
}

.view-details {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

/* ===== PE FIRM DETAIL PAGE ===== */
.firm-detail-header {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.firm-detail-header-content {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.firm-detail-logo {
    height: 80px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
    background: white;
    padding: 1rem;
    border-radius: 12px;
    border: 2px solid var(--border-color);
}

.firm-detail-name {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.firm-detail-meta {
    display: flex;
    gap: 2rem;
    color: var(--text-secondary);
}

.firm-detail-meta span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ===== TABS ===== */
.tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    background: white;
    padding: 0.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
}

.tab-btn {
    flex: 1;
    padding: 0.75rem 1.5rem;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.tab-btn:hover {
    background: var(--bg-color);
    color: var(--text-primary);
}

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

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ===== INFO GRID ===== */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.6rem;
}

.info-item {
    padding: 0.5rem;
    background: var(--bg-color);
    border-radius: 5px;
}

.info-label {
    font-size: 0.55rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
    font-weight: 500;
}

.info-value {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* ===== TEAM GRID ===== */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.8rem;
}

.team-card {
    display: flex;
    gap: 0.5rem;
    padding: 0.6rem;
    background: var(--bg-color);
    border-radius: 6px;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.team-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-1px);
}

.team-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    flex-shrink: 0;
}

.team-info {
    flex: 1;
}

.team-name {
    font-size: 0.6rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.1rem;
}

.team-title {
    font-size: 0.5rem;
    color: var(--text-secondary);
    margin-bottom: 0.2rem;
}

.team-location {
    font-size: 0.45rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.2rem;
}

/* ===== FOCUS/STRATEGY SECTION ===== */
.focus-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.focus-section h4 {
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    padding: 0.2rem 0.5rem;
    background: var(--primary-color);
    color: white;
    border-radius: 12px;
    font-size: 0.6rem;
    font-weight: 500;
}

.tag-sm {
    padding: 0.15rem 0.4rem;
    font-size: 0.55rem;
}

.tag-large {
    padding: 0.3rem 0.6rem;
    font-size: 0.65rem;
}

.office-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--bg-color);
    border-radius: 6px;
    margin: 0.25rem;
    font-size: 0.9rem;
}

.offices-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* ===== FUNDRAISING TABLE ===== */
.fundraising-table {
    width: 100%;
    border-collapse: collapse;
}

.fundraising-table thead {
    background: var(--primary-color);
    color: white;
}

.fundraising-table th {
    padding: 0.4rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.5rem;
}

.fundraising-table tbody tr {
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

.fundraising-table tbody tr:hover {
    background: var(--bg-color);
}

.fundraising-table td {
    padding: 0.4rem;
    font-size: 0.5rem;
}

.fundraising-table td.amount {
    font-weight: 700;
    color: var(--primary-color);
}

.status-badge {
    padding: 0.15rem 0.3rem;
    border-radius: 6px;
    font-size: 0.45rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-closed {
    background: #d1fae5;
    color: #065f46;
}

.status-marketing {
    background: #fef3c7;
    color: #92400e;
}

.status-active {
    background: #dbeafe;
    color: #1e40af;
}

.progress-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.progress-bar-table {
    flex: 1;
    height: 5px;
    background: #e2e8f0;
    border-radius: 6px;
    overflow: hidden;
}

.progress-fill-table {
    height: 100%;
    background: var(--primary-color);
    border-radius: 6px;
}

.progress-text {
    font-weight: 600;
    color: var(--text-primary);
    min-width: 30px;
    font-size: 0.5rem;
}

.strategy-tag {
    background: var(--bg-color);
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-size: 0.45rem;
    font-weight: 500;
    color: var(--text-secondary);
    line-height: 1.2;
}

/* ===== FILTER BUTTONS ===== */
.filter-buttons {
    display: flex;
    gap: 0.5rem;
}

.filter-btn {
    padding: 0.5rem 1rem;
    border: 2px solid var(--border-color);
    background: white;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
}

.filter-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.filter-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* ===== FAMILY OFFICES GRID ===== */
.family-offices-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
}

.family-office-card {
    background: white;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: var(--transition);
    animation: fadeInUp 0.5s ease forwards;
    opacity: 0;
}

.family-office-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.fo-card-header {
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    text-align: center;
}

.fo-logo {
    height: 50px;
    width: auto;
    max-width: 150px;
    object-fit: contain;
    background: white;
    padding: 0.5rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.fo-icon {
    width: 60px;
    height: 60px;
    background: white;
    color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 1rem;
}

.fo-name {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.fo-type {
    font-size: 0.85rem;
    opacity: 0.9;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
}

.fo-card-body {
    padding: 1.5rem;
}

.fo-info-row {
    display: flex;
    align-items: start;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
}

.fo-info-row i {
    color: var(--primary-color);
    width: 16px;
    margin-top: 0.2rem;
}

.fo-description {
    margin: 1rem 0;
    padding: 1rem;
    background: var(--bg-color);
    border-radius: 6px;
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

.fo-focus {
    margin-top: 1rem;
    font-size: 0.9rem;
}

.fo-focus strong {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.fo-holdings {
    margin-top: 1rem;
    font-size: 0.9rem;
}

.fo-holdings strong {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.holdings-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.holding-item {
    background: var(--bg-color);
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    font-size: 0.85rem;
}

.fo-strategy {
    margin-top: 1rem;
    padding: 1rem;
    background: #eff6ff;
    border-left: 3px solid var(--primary-color);
    border-radius: 6px;
}

.fo-strategy strong {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.fo-strategy p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

.fo-recent-activity {
    margin-top: 1rem;
    padding: 1rem;
    background: #f0fdf4;
    border-radius: 6px;
}

.fo-recent-activity strong {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.activity-list {
    margin: 0;
    padding-left: 1.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

.activity-list li {
    margin-bottom: 0.5rem;
}

.fo-news {
    margin-top: 1rem;
    padding: 1rem;
    background: #fef3c7;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.news-badge-inline {
    background: var(--warning-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    width: fit-content;
}

.fo-news p {
    font-size: 0.9rem;
    color: var(--text-primary);
    font-weight: 500;
    margin: 0;
}

.fo-card-footer {
    padding: 1rem 1.5rem;
    background: var(--bg-color);
    border-top: 1px solid var(--border-color);
    text-align: center;
}

/* ===== FIRM DESCRIPTION ===== */
.firm-description {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

/* ===== INVESTMENT COMPANIES (INVESTMENTBOLAG) ===== */
#invBolagContainer {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 1.5rem;
}

.inv-bolag-card {
    background: white;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: var(--transition);
    animation: fadeInUp 0.5s ease forwards;
    opacity: 0;
}

.inv-bolag-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.inv-card-header {
    padding: 1.5rem;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    display: grid;
    grid-template-columns: 80px 1fr auto;
    gap: 1rem;
    align-items: center;
}

.inv-logo-section {
    width: 80px;
    height: 80px;
    background: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
}

.inv-logo {
    max-width: 70px;
    max-height: 70px;
    object-fit: contain;
}

.inv-icon-fallback {
    font-size: 2.5rem;
    color: var(--primary-color);
}

.inv-main-info {
    flex: 1;
}

.inv-name {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.inv-ticker {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-family: 'Courier New', monospace;
    margin-bottom: 0.5rem;
}

.inv-type-tag {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.inv-discount-box {
    text-align: center;
    padding: 1rem;
    border-radius: 12px;
    min-width: 100px;
}

.inv-discount-box.discount {
    background: linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%);
    color: white;
}

.inv-discount-box.premium {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

.discount-label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 1px;
    opacity: 0.9;
    margin-bottom: 0.25rem;
}

.discount-value {
    font-size: 1.8rem;
    font-weight: 800;
    line-height: 1;
}

.inv-card-body {
    padding: 1.5rem;
}

.inv-description {
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 0.95rem;
}

.inv-nav-data {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--bg-color);
    border-radius: 8px;
}

.nav-item {
    display: flex;
    flex-direction: column;
}

.nav-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
    font-weight: 500;
}

.nav-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.inv-holdings {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.inv-holdings strong {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.holdings-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.holding-badge {
    background: var(--primary-color);
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
}

.holding-badge.more {
    background: var(--primary-dark);
}

.inv-focus {
    margin-bottom: 1rem;
}

.inv-focus strong {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.inv-ceo, .inv-activity {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.75rem;
    padding: 0.75rem;
    background: var(--bg-color);
    border-radius: 6px;
    font-size: 0.9rem;
}

.inv-ceo i, .inv-activity i {
    color: var(--primary-color);
    width: 20px;
}

.inv-card-footer {
    padding: 1rem 1.5rem;
    background: var(--bg-color);
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 0.75rem;
    justify-content: center;
}

.sort-select {
    padding: 0.5rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-weight: 600;
    background: white;
    cursor: pointer;
    transition: var(--transition);
}

.sort-select:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* ===== COMPANY DETAIL MODAL - ENHANCED PURPLE THEME ===== */
.company-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15), rgba(118, 75, 162, 0.15)), 
                rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.company-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.company-modal-content {
    background: white;
    border-radius: 12px;
    max-width: 600px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
    animation: slideUp 0.4s ease-out;
    border: 1px solid rgba(102, 126, 234, 0.2);
}

@keyframes slideUp {
    from { 
        opacity: 0;
        transform: translateY(50px) scale(0.95);
    }
    to { 
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Header Section */
.company-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 1rem;
    background: linear-gradient(135deg, #4c1d95 0%, #581c87 50%, #6b21a8 100%);
    color: white;
    border-radius: 12px 12px 0 0;
    position: relative;
    overflow: hidden;
}

.company-modal-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 120"><path fill="rgba(255,255,255,0.05)" d="M0,0 L1200,0 L1200,40 Q900,80 600,40 T0,40 Z"/></svg>');
    background-size: cover;
    opacity: 0.3;
}

.company-modal-header-left {
    display: flex;
    gap: 2rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.modal-logo-wrapper {
    position: relative;
}

.modal-logo-wrapper::before {
    content: '';
    position: absolute;
    inset: -6px;
    background: linear-gradient(135deg, rgba(255,255,255,0.4), rgba(255,255,255,0.1));
    border-radius: 16px;
    z-index: -1;
}

.modal-company-logo {
    width: 50px;
    height: 50px;
    object-fit: contain;
    background: white;
    border-radius: 8px;
    padding: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    display: block;
}

.modal-header-text {
    flex: 1;
}

.modal-company-name {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    color: white;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
    letter-spacing: -0.01em;
}

.modal-company-meta {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}

.modal-sector-badge {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.modal-status-badge-header {
    background: rgba(255, 255, 255, 0.95);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 700;
    color: #4c1d95;
}

.modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-size: 1.5rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: rotate(90deg) scale(1.1);
    border-color: rgba(255, 255, 255, 0.5);
}

/* Modal Body */
.company-modal-body {
    padding: 1rem;
    background: linear-gradient(to bottom, #faf8ff, #ffffff);
}

/* Quick Stats Banner */
.modal-stats-banner {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
    border: 1px solid #e9d5ff;
    border-radius: 8px;
    padding: 0.75rem;
}

.modal-stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-stat-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #4c1d95, #581c87);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.875rem;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.modal-stat-content {
    flex: 1;
}

.modal-stat-value {
    font-size: 1rem;
    font-weight: 700;
    color: #5b21b6;
    line-height: 1.2;
}

.modal-stat-label {
    font-size: 0.75rem;
    color: #4c1d95;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.25rem;
}

/* Modal Sections */
.modal-section {
    margin-bottom: 1rem;
}

.modal-section-title {
    font-size: 1rem;
    font-weight: 700;
    color: #5b21b6;
    margin: 0 0 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e9d5ff;
}

.modal-section-title i {
    color: #4c1d95;
    font-size: 1rem;
}

.modal-description {
    font-size: 0.875rem;
    line-height: 1.5;
    color: #4c1d95;
    background: white;
    padding: 0.75rem;
    border-radius: 8px;
    border: 1px solid #e9d5ff;
    margin: 0;
}

/* Timeline Styling */
.modal-timeline {
    position: relative;
    padding-left: 1.5rem;
}

.modal-timeline::before {
    content: '';
    position: absolute;
    left: 0.5rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, #4c1d95, #581c87);
    border-radius: 1px;
}

.timeline-item {
    position: relative;
    margin-bottom: 1rem;
    padding-left: 1rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -1.5rem;
    top: 0.5rem;
    width: 12px;
    height: 12px;
    background: #4c1d95;
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 0 0 2px #4c1d95;
}

.timeline-date {
    font-size: 0.75rem;
    font-weight: 700;
    color: #4c1d95;
    background: #f3f0ff;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    display: inline-block;
    margin-bottom: 0.25rem;
}

.timeline-content {
    background: white;
    padding: 0.75rem;
    border-radius: 8px;
    border: 1px solid #e9d5ff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.timeline-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.25rem;
}

.timeline-description {
    font-size: 0.75rem;
    color: #64748b;
    line-height: 1.4;
}

/* Investment Detail Grid */
.modal-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
}

.modal-detail-card {
    background: white;
    border: 2px solid #e9d5ff;
    border-radius: 14px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
}

.modal-detail-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(139, 92, 246, 0.2);
    border-color: #c084fc;
}

.modal-detail-icon {
    width: 54px;
    height: 54px;
    border-radius: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.modal-detail-icon.purple {
    background: linear-gradient(135deg, #4c1d95, #581c87);
    color: white;
    box-shadow: 0 6px 16px rgba(139, 92, 246, 0.35);
}

.modal-detail-content {
    flex: 1;
}

.modal-detail-label {
    font-size: 0.75rem;
    color: #4c1d95;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.5rem;
}

.modal-detail-value {
    font-size: 1.25rem;
    font-weight: 800;
    color: #5b21b6;
    line-height: 1.3;
}

/* Geographic Grid */
.modal-geo-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

.modal-geo-card {
    background: linear-gradient(135deg, #faf5ff, #f3e8ff);
    border: 2px solid #e9d5ff;
    border-radius: 14px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    text-align: center;
}

.modal-geo-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.15);
}

.modal-geo-icon {
    width: 54px;
    height: 54px;
    background: linear-gradient(135deg, #4c1d95, #581c87);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    margin: 0 auto 1rem;
    box-shadow: 0 6px 16px rgba(139, 92, 246, 0.3);
}

.modal-geo-content {
    text-align: center;
}

.modal-geo-label {
    font-size: 0.75rem;
    color: #4c1d95;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.modal-geo-value {
    font-size: 1.125rem;
    font-weight: 700;
    color: #5b21b6;
}

.modal-geography-badge {
    padding: 0.5rem 1.25rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 700;
    display: inline-block;
}

/* Operational Metrics Grid */
.modal-metrics-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

.modal-metric-card {
    background: linear-gradient(135deg, #ffffff, #faf5ff);
    border: 2px solid #e9d5ff;
    border-radius: 14px;
    padding: 1.75rem;
    transition: all 0.3s ease;
    text-align: center;
}

.modal-metric-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(139, 92, 246, 0.2);
    border-color: #c084fc;
}

.modal-metric-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    color: #4c1d95;
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.modal-metric-header i {
    font-size: 1.25rem;
}

.modal-metric-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: #5b21b6;
}

.modal-status-badge {
    padding: 0.5rem 1.25rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 700;
    display: inline-block;
}

/* Business Intelligence Section */
.modal-intelligence-section {
    background: linear-gradient(135deg, #f5f3ff, #ede9fe);
    border: 2px solid #e9d5ff;
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.modal-intelligence-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.modal-intel-card {
    background: white;
    border: 2px solid #e9d5ff;
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.modal-intel-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.2);
    border-color: #c084fc;
}

.modal-intel-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #4c1d95, #581c87);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
    margin-bottom: 1rem;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.modal-intel-content {
    text-align: left;
}

.modal-intel-label {
    font-size: 0.75rem;
    color: #4c1d95;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.modal-intel-value {
    font-size: 1.125rem;
    font-weight: 800;
    color: #5b21b6;
    margin-bottom: 0.5rem;
}

.modal-intel-desc {
    font-size: 0.8125rem;
    color: #6d28d9;
    line-height: 1.5;
    opacity: 0.8;
}

/* Funding & Valuation Section */
.modal-funding-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.modal-funding-card {
    background: linear-gradient(135deg, #ffffff, #faf5ff);
    border: 2px solid #e9d5ff;
    border-radius: 14px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
}

.modal-funding-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.2);
}

.modal-funding-label {
    font-size: 0.8125rem;
    color: #4c1d95;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}

.modal-funding-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: #5b21b6;
}

.modal-funding-history {
    background: white;
    border: 2px solid #e9d5ff;
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 1rem;
}

/* Leadership Team */
.modal-leadership-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}

.modal-leader-card {
    background: white;
    border: 2px solid #e9d5ff;
    border-radius: 12px;
    padding: 1.25rem;
    display: flex;
    gap: 1rem;
    align-items: center;
    transition: all 0.3s ease;
}

.modal-leader-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(139, 92, 246, 0.15);
}

.modal-leader-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4c1d95, #581c87);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.modal-leader-info {
    flex: 1;
}

.modal-leader-name {
    font-size: 1rem;
    font-weight: 700;
    color: #5b21b6;
    margin-bottom: 0.25rem;
}

.modal-leader-role {
    font-size: 0.8125rem;
    color: #4c1d95;
    font-weight: 600;
}

/* Products & Technology */
.modal-products-list {
    margin-bottom: 1.5rem;
}

.modal-product-item {
    background: white;
    border: 2px solid #e9d5ff;
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1rem;
}

.modal-product-name {
    font-size: 1.125rem;
    font-weight: 700;
    color: #5b21b6;
    margin-bottom: 0.5rem;
}

.modal-product-desc {
    font-size: 0.9375rem;
    color: #6d28d9;
    line-height: 1.6;
}

.modal-tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.modal-tech-tag {
    background: linear-gradient(135deg, #4c1d95, #581c87);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8125rem;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.25);
}

/* News Timeline */
.modal-news-timeline {
    position: relative;
}

.modal-news-item {
    background: white;
    border: 2px solid #e9d5ff;
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1rem;
    margin-left: 2rem;
    position: relative;
    transition: all 0.3s ease;
}

.modal-news-item:hover {
    transform: translateX(8px);
    box-shadow: 0 4px 16px rgba(139, 92, 246, 0.15);
}

.modal-news-item::before {
    content: '';
    position: absolute;
    left: -2rem;
    top: 1.25rem;
    width: 12px;
    height: 12px;
    background: linear-gradient(135deg, #4c1d95, #581c87);
    border-radius: 50%;
    box-shadow: 0 0 0 4px #f5f3ff;
}

.modal-news-date {
    font-size: 0.75rem;
    color: #4c1d95;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.modal-news-title {
    font-size: 1rem;
    font-weight: 700;
    color: #5b21b6;
    margin-bottom: 0.5rem;
}

.modal-news-content {
    font-size: 0.9375rem;
    color: #6d28d9;
    line-height: 1.6;
}

/* Market Position */
.modal-market-content {
    background: white;
    border: 2px solid #e9d5ff;
    border-radius: 14px;
    padding: 1.75rem;
}

.modal-market-item {
    margin-bottom: 1.5rem;
}

.modal-market-item:last-child {
    margin-bottom: 0;
}

.modal-market-label {
    font-size: 0.875rem;
    color: #4c1d95;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-market-value {
    font-size: 1rem;
    color: #5b21b6;
    line-height: 1.6;
}

.modal-advantages-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.modal-advantage-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem;
    background: #faf5ff;
    border-radius: 8px;
}

.modal-advantage-icon {
    color: #4c1d95;
    font-size: 1rem;
    margin-top: 0.125rem;
}

.modal-advantage-text {
    flex: 1;
    font-size: 0.9375rem;
    color: #6d28d9;
    line-height: 1.5;
}

/* Loading Indicator */
.modal-loading {
    text-align: center;
    padding: 2rem;
    background: linear-gradient(135deg, #f5f3ff, #ede9fe);
    border: 2px solid #e9d5ff;
    border-radius: 14px;
    margin-bottom: 1.5rem;
}

.modal-loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #e9d5ff;
    border-top-color: #4c1d95;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

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

.modal-loading-text {
    font-size: 1rem;
    color: #4c1d95;
    font-weight: 600;
}

/* Modal Actions */
.modal-actions {
    display: flex;
    gap: 1.25rem;
    justify-content: center;
    padding-top: 1rem;
}

.modal-btn {
    padding: 1rem 2.5rem;
    border-radius: 14px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.modal-btn-primary {
    background: linear-gradient(135deg, #4c1d95 0%, #581c87 100%);
    color: white;
    border: 2px solid transparent;
}

.modal-btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(139, 92, 246, 0.4);
    background: linear-gradient(135deg, #581c87 0%, #4c1d95 100%);
}

.modal-btn-secondary {
    background: white;
    color: #4c1d95;
    border: 2px solid #e9d5ff;
}

.modal-btn-secondary:hover {
    background: #f5f3ff;
    border-color: #c084fc;
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(139, 92, 246, 0.2);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .pe-firms-grid, .family-offices-grid {
        grid-template-columns: 1fr;
    }
    
    .team-grid {
        grid-template-columns: 1fr;
    }
    
    .focus-grid {
        grid-template-columns: 1fr;
    }
    
    #invBolagContainer {
        grid-template-columns: 1fr;
    }
    
    .inv-card-header {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .inv-nav-data {
        grid-template-columns: 1fr;
    }
    
    /* Modal Responsive */
    .company-modal.show {
        padding: 0.75rem;
    }
    
    .company-modal-content {
        max-height: 95vh;
    }
    
    .company-modal-header {
        padding: 1.5rem;
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .company-modal-header-left {
        flex-direction: column;
        text-align: center;
        width: 100%;
    }
    
    .modal-company-name {
        font-size: 1.75rem;
    }
    
    .modal-stats-banner {
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
        padding: 1rem;
    }
    
    .modal-stat-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .modal-stat-value {
        font-size: 1.25rem;
    }
    
    .modal-detail-grid,
    .modal-metrics-grid,
    .modal-intelligence-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-geo-grid,
    .modal-funding-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-leadership-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-news-item {
        margin-left: 1rem;
    }
    
    .company-modal-body {
        padding: 1.5rem;
    }
    
    .modal-actions {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .modal-btn {
        width: 100%;
        justify-content: center;
    }
}

