/* ==================== AI Company Details Page Styles ==================== */

.detail-hero {
    background: linear-gradient(135deg, #0F172A 0%, #1E1B4B 30%, #312E81 60%, #4F46E5 100%);
    padding: 4rem 0 6rem;
    position: relative;
    overflow: hidden;
}

.detail-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 20% 50%, rgba(79, 70, 229, 0.15) 0%, transparent 50%),
                radial-gradient(ellipse at 80% 50%, rgba(139, 92, 246, 0.1) 0%, transparent 50%);
}

.detail-hero-wave {
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
}

.detail-hero-wave svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 60px;
    transform: scaleY(-1);
}

.detail-hero-wave .shape-fill { fill: #F7F7F7; }
.detail-hero-content { position: relative; z-index: 1; }

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.875rem;
    margin-bottom: 2rem;
    transition: color 0.2s ease;
}

.back-link:hover { color: white; }

.detail-hero-main {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.detail-logo-wrap { flex-shrink: 0; }

.detail-logo {
    width: 100px;
    height: 100px;
    border-radius: 20px;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.95);
    padding: 0.75rem;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

.detail-logo-placeholder {
    width: 100px;
    height: 100px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2.5rem;
}

.detail-title-section { flex: 1; min-width: 200px; }

.detail-title {
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 800;
    color: white;
    margin-bottom: 0.75rem;
    line-height: 1.2;
}

.detail-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.badge-detail {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.875rem;
    border-radius: 50px;
    font-size: 0.78rem;
    font-weight: 600;
}

.badge-startup { background: rgba(16, 185, 129, 0.2); color: #6EE7B7; border: 1px solid rgba(16, 185, 129, 0.3); }
.badge-govt-detail { background: rgba(245, 158, 11, 0.2); color: #FCD34D; border: 1px solid rgba(245, 158, 11, 0.3); }
.badge-cat-detail { background: rgba(96, 165, 250, 0.2); color: #93C5FD; border: 1px solid rgba(96, 165, 250, 0.3); }
.badge-featured { background: rgba(251, 191, 36, 0.2); color: #FDE68A; border: 1px solid rgba(251, 191, 36, 0.3); }
.badge-status { background: rgba(52, 211, 153, 0.2); color: #6EE7B7; border: 1px solid rgba(52, 211, 153, 0.3); }

.detail-hero-action { flex-shrink: 0; }

.detail-hero-action .btn-primary {
    background: linear-gradient(135deg, #4F46E5, #7C3AED);
    border: none;
    padding: 0.75rem 1.75rem;
    font-weight: 600;
    border-radius: 12px;
}

.detail-hero-action .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(79, 70, 229, 0.35);
}

.detail-body { padding: 3rem 0 5rem; background: #F7F7F7; }

.detail-card {
    background: white;
    border-radius: 16px;
    padding: 1.75rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.06);
    border: 1px solid #F3F4F6;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

.detail-card:hover {
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
    border-color: #E5E7EB;
}

.detail-card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #F3F4F6;
}

.detail-card-header i { font-size: 1.25rem; color: #4F46E5; }
.detail-card-header h3 { font-size: 1.125rem; font-weight: 700; color: #111827; margin: 0; }
.detail-description { color: #4B5563; font-size: 0.95rem; line-height: 1.8; margin: 0; }

.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.info-item {
    padding: 0.75rem 1rem;
    background: #F9FAFB;
    border-radius: 10px;
}

.info-label {
    display: block;
    font-size: 0.75rem;
    color: #9CA3AF;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

.info-label i { margin-right: 0.25rem; }

.info-value {
    font-size: 0.9rem;
    color: #111827;
    font-weight: 600;
}

.info-link { color: #4F46E5; text-decoration: none; word-break: break-all; }
.info-link:hover { color: #3730A3; text-decoration: underline; }

.services-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.service-card {
    background: #F9FAFB;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    padding: 1.25rem;
    transition: all 0.2s ease;
}

.service-card:hover {
    border-color: #4F46E5;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.1);
}

.service-card h4 { font-size: 0.9rem; font-weight: 700; color: #111827; margin-bottom: 0.5rem; }
.service-card p { font-size: 0.82rem; color: #6B7280; line-height: 1.6; margin: 0; }

.social-links-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.social-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    background: #F3F4F6;
    border-radius: 10px;
    color: #4B5563;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.social-btn:hover {
    background: #4F46E5;
    color: white;
    transform: translateY(-2px);
}

.social-btn i { font-size: 1rem; }

.related-section { margin-top: 2rem; }
.related-title { font-size: 1.25rem; font-weight: 800; color: #111827; margin-bottom: 1.5rem; display: flex; align-items: center; gap: 0.5rem; }
.related-title i { color: #4F46E5; }

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.related-card {
    background: white;
    border-radius: 12px;
    padding: 1.25rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid #F3F4F6;
    transition: all 0.2s ease;
    text-decoration: none;
    color: inherit;
}

.related-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    border-color: #E5E7EB;
}

.related-card-logo { width: 48px; height: 48px; border-radius: 10px; object-fit: contain; background: #F9FAFB; padding: 0.375rem; margin-bottom: 0.75rem; }
.related-card h4 { font-size: 0.95rem; font-weight: 700; color: #111827; margin-bottom: 0.25rem; }
.related-card .cat-tag { font-size: 0.7rem; color: #6B7280; background: #F3F4F6; padding: 0.125rem 0.5rem; border-radius: 4px; display: inline-block; }

.sidebar-card-detail {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.06);
    border: 1px solid #F3F4F6;
    margin-bottom: 1.5rem;
}

.sidebar-card-detail h4 { font-size: 1rem; font-weight: 700; color: #111827; margin-bottom: 1rem; display: flex; align-items: center; gap: 0.5rem; }
.sidebar-card-detail h4 i { color: #4F46E5; }

.info-row { display: flex; align-items: center; justify-content: space-between; padding: 0.75rem 0; border-bottom: 1px solid #F3F4F6; }
.info-row:last-child { border-bottom: none; }
.info-row-label { font-size: 0.82rem; color: #6B7280; }
.info-row-value { font-size: 0.85rem; font-weight: 600; color: #111827; display: flex; align-items: center; gap: 0.5rem; }
.info-row-value a { color: #4F46E5; text-decoration: none; }
.info-row-value a:hover { text-decoration: underline; }

.sidebar-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.75rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.85rem;
    text-decoration: none;
    transition: all 0.2s ease;
    margin-bottom: 0.75rem;
}

.sidebar-action-btn.primary { background: linear-gradient(135deg, #4F46E5, #7C3AED); color: white; border: none; }
.sidebar-action-btn.primary:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3); color: white; }
.sidebar-action-btn.outline { background: #F3F4F6; color: #4B5563; border: 1px solid #E5E7EB; }
.sidebar-action-btn.outline:hover { background: #E5E7EB; }

.upvote-btn-dir { background: none; border: 1px solid #E5E7EB; border-radius: 8px; padding: 4px 10px; font-size: .75rem; color: #6B7280; cursor: pointer; transition: all .2s; display: inline-flex; align-items: center; gap: 4px; }
.upvote-btn-dir:hover { border-color: #4F46E5; color: #4F46E5; background: #EEF2FF; }
.upvote-btn-dir.upvoted { border-color: #4F46E5; color: #4F46E5; background: #EEF2FF; font-weight: 600; }
.upvote-btn-dir i { font-size: .7rem; }

.stars-wrap-dir { display: inline-flex; align-items: center; }
.star-display { display: inline-flex; align-items: center; gap: 1px; }
.star-display .star { font-size: .75rem; color: #D1D5DB; cursor: pointer; transition: color .15s; }
.star-display .star.active { color: #F59E0B; }
.star-display .star:hover { color: #FBBF24; }
.star-display .star-count { font-size: .65rem; color: #9CA3AF; }
.star-static { display: inline-flex; align-items: center; gap: 1px; }
.star-static .star { font-size: .7rem; color: #D1D5DB; }
.star-static .star.active { color: #F59E0B; }
.star-static .star-count { font-size: .65rem; color: #9CA3AF; }



.founded-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.75rem;
    background: rgba(79, 70, 229, 0.1);
    color: #4F46E5;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
}

[data-theme="dark"] .detail-body { background: #0F172A; }
[data-theme="dark"] .detail-card { background: #1E293B; border-color: #334155; }
[data-theme="dark"] .detail-card:hover { border-color: #475569; box-shadow: 0 12px 30px rgba(0,0,0,0.3); }
[data-theme="dark"] .detail-card-header { border-color: #334155; }
[data-theme="dark"] .detail-card-header h3 { color: #F1F5F9; }
[data-theme="dark"] .detail-description { color: #94A3B8; }
[data-theme="dark"] .info-item { background: #334155; }
[data-theme="dark"] .info-value { color: #F1F5F9; }
[data-theme="dark"] .service-card { background: #334155; border-color: #475569; }
[data-theme="dark"] .service-card:hover { border-color: #818CF8; box-shadow: 0 4px 12px rgba(129,140,248,0.2); }
[data-theme="dark"] .service-card h4 { color: #F1F5F9; }
[data-theme="dark"] .service-card p { color: #94A3B8; }
[data-theme="dark"] .sidebar-card-detail { background: #1E293B; border-color: #334155; }
[data-theme="dark"] .sidebar-card-detail h4 { color: #F1F5F9; }
[data-theme="dark"] .info-row { border-color: #334155; }
[data-theme="dark"] .info-row-label { color: #94A3B8; }
[data-theme="dark"] .info-row-value { color: #F1F5F9; }
[data-theme="dark"] .sidebar-action-btn.outline { background: #334155; color: #E2E8F0; border-color: #475569; }
[data-theme="dark"] .sidebar-action-btn.outline:hover { background: #475569; }
[data-theme="dark"] .share-btn-detail.email { background: #334155; color: #E2E8F0; border-color: #475569; }
[data-theme="dark"] .share-btn-detail.email:hover { background: #475569; }
[data-theme="dark"] .related-card { background: #1E293B; border-color: #334155; }
[data-theme="dark"] .related-card:hover { border-color: #475569; }
[data-theme="dark"] .related-card h4 { color: #F1F5F9; }
[data-theme="dark"] .related-card .cat-tag { background: #334155; color: #94A3B8; }
[data-theme="dark"] .detail-hero-wave .shape-fill { fill: #0F172A; }
[data-theme="dark"] .founded-badge { background: rgba(129,140,248,0.2); color: #818CF8; }
[data-theme="dark"] .upvote-btn-dir { border-color: #334155; color: #94A3B8; }
[data-theme="dark"] .upvote-btn-dir:hover { border-color: #818CF8; color: #818CF8; background: rgba(129,140,248,0.15); }
[data-theme="dark"] .upvote-btn-dir.upvoted { border-color: #818CF8; color: #818CF8; background: rgba(129,140,248,0.15); }
[data-theme="dark"] .star-display .star, [data-theme="dark"] .star-static .star { color: #475569; }
[data-theme="dark"] .star-display .star.active, [data-theme="dark"] .star-static .star.active { color: #FBBF24; }
[data-theme="dark"] .star-display .star:hover { color: #FDE68A; }

@media (max-width: 768px) {
    .info-grid { grid-template-columns: 1fr; }
    .services-grid { grid-template-columns: 1fr; }
    .social-links-grid { flex-direction: column; }
    .social-btn { width: 100%; justify-content: center; }
}