/* ══════════════════════════════════════════════════════════════
   Insights SEO Pages — Article layout for research reports
   ══════════════════════════════════════════════════════════════ */

/* ─── Breadcrumb ─── */
.seo-breadcrumb {
    padding: 100px 0 0;
    font-size: 0.875rem;
    color: var(--text-secondary, #94a3b8);
}
.seo-breadcrumb a {
    color: var(--brand-primary, #3b82f6);
    text-decoration: none;
}
.seo-breadcrumb a:hover {
    text-decoration: underline;
}
.seo-breadcrumb-sep {
    margin: 0 8px;
    opacity: 0.5;
}

/* ─── Report Page Layout ─── */
.seo-report {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 24px 80px;
}

.seo-report-header {
    padding: 24px 0 20px;
    border-bottom: 1px solid var(--border-primary, rgba(255,255,255,0.1));
    margin-bottom: 28px;
}

.seo-report-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-primary, #f1f5f9);
    margin: 0 0 12px;
}

.seo-report-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 0.875rem;
    color: var(--text-secondary, #94a3b8);
}

.seo-report-meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.seo-report-meta .meta-icon {
    width: 16px;
    height: 16px;
    opacity: 0.6;
}

/* ─── Sections ─── */
.seo-section {
    margin-bottom: 36px;
}

.seo-section h2 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary, #f1f5f9);
    margin: 0 0 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-primary, rgba(255,255,255,0.08));
}

.seo-section h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary, #f1f5f9);
    margin: 20px 0 8px;
}

/* ─── Text Content ─── */
.seo-section p,
.seo-section li {
    font-size: 0.9375rem;
    line-height: 1.65;
    color: var(--text-secondary, #cbd5e1);
}

.seo-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.seo-section li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 8px;
}

.seo-section li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--brand-primary, #3b82f6);
    opacity: 0.7;
}

/* ─── KPI Grid ─── */
.seo-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.seo-kpi-card {
    background: var(--bg-secondary, rgba(255,255,255,0.04));
    border: 1px solid var(--border-primary, rgba(255,255,255,0.08));
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}

.seo-kpi-value {
    font-size: 1.625rem;
    font-weight: 700;
    color: var(--brand-primary, #3b82f6);
    line-height: 1.2;
}

.seo-kpi-label {
    font-size: 0.8125rem;
    color: var(--text-secondary, #94a3b8);
    margin-top: 4px;
}

.seo-kpi-insight {
    font-size: 0.75rem;
    color: var(--text-secondary, #94a3b8);
    margin-top: 6px;
    opacity: 0.8;
    line-height: 1.45;
}

/* ─── Dashboard Showcase (full-width) ─── */
.seo-dashboard-showcase {
    max-width: 1400px;
    margin: 0 auto 48px;
    padding: 0 24px;
}

.seo-dashboard-header {
    text-align: center;
    margin-bottom: 24px;
}

.seo-dashboard-header h2 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary, #f1f5f9);
    margin: 0 0 6px;
}

.seo-dashboard-header p {
    font-size: 0.875rem;
    color: var(--text-secondary, #94a3b8);
    margin: 0;
}

.seo-dashboard-header a {
    color: var(--brand-primary, #3b82f6);
    text-decoration: none;
}

.seo-dashboard-header a:hover {
    text-decoration: underline;
}

.seo-dashboard-open-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    padding: 6px 14px;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--brand-primary, #3b82f6);
    border: 1px solid var(--brand-primary, #3b82f6);
    border-radius: 6px;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}

.seo-dashboard-open-btn:hover {
    background: var(--brand-primary, #3b82f6);
    color: #fff;
    text-decoration: none;
}

.seo-dashboard-frame {
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border-primary, rgba(255,255,255,0.1));
    box-shadow: 0 4px 32px rgba(0, 0, 0, 0.3);
    background: #0f172a;
    padding: 12px;
}

.seo-dashboard-frame iframe {
    display: block;
    width: 100%;
    height: 85vh;
    min-height: 700px;
    border: none;
    background: #0f172a;
}

/* KPIs section — tighter spacing when above dashboard */
.seo-section-kpis {
    margin-bottom: 32px;
}

/* ─── Methodology ─── */
.seo-methodology {
    background: var(--bg-secondary, rgba(255,255,255,0.03));
    border: 1px solid var(--border-primary, rgba(255,255,255,0.08));
    border-radius: 12px;
    padding: 20px;
    font-size: 0.875rem;
}

.seo-methodology p {
    margin: 0 0 8px;
}
.seo-methodology p:last-child {
    margin-bottom: 0;
}

/* ─── Related Insights ─── */
.seo-related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.seo-related-card {
    display: block;
    background: var(--bg-secondary, rgba(255,255,255,0.04));
    border: 1px solid var(--border-primary, rgba(255,255,255,0.08));
    border-radius: 12px;
    padding: 20px;
    text-decoration: none;
    transition: border-color 0.2s, transform 0.2s;
}

.seo-related-card:hover {
    border-color: var(--brand-primary, #3b82f6);
    transform: translateY(-2px);
}

.seo-related-card h3 {
    font-size: 1rem;
    color: var(--text-primary, #f1f5f9);
    margin: 0 0 8px;
}

.seo-related-card p {
    font-size: 0.875rem;
    color: var(--text-secondary, #94a3b8);
    margin: 0;
    line-height: 1.5;
}

/* ═══════════════════════════════════════════════════════════════
   Hub Page
   ═══════════════════════════════════════════════════════════════ */

.insights-hub {
    min-height: 60vh;
}

.insights-hub-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px 80px;
}

.insights-hub-header {
    padding: 32px 0 40px;
    text-align: center;
}

.insights-hub-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary, #f1f5f9);
    margin: 0 0 10px;
}

.insights-hub-subtitle {
    font-size: 0.9375rem;
    color: var(--text-secondary, #94a3b8);
    max-width: 640px;
    margin: 0 auto;
    line-height: 1.6;
}

.insights-hub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.insights-hub-empty {
    text-align: center;
    padding: 80px 0;
    color: var(--text-secondary, #94a3b8);
}

/* ─── Hub Cards ─── */
.insights-card {
    display: flex;
    flex-direction: column;
    background: var(--bg-secondary, rgba(255,255,255,0.04));
    border: 1px solid var(--border-primary, rgba(255,255,255,0.08));
    border-radius: 16px;
    padding: 24px;
    text-decoration: none;
    transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.insights-card:hover {
    border-color: var(--brand-primary, #3b82f6);
    transform: translateY(-3px);
    box-shadow: 0 8px 32px rgba(59, 130, 246, 0.1);
}

.insights-card-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 16px;
}

.insights-card-category {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--brand-primary, #3b82f6);
    background: rgba(59, 130, 246, 0.1);
    padding: 4px 10px;
    border-radius: 6px;
}

.insights-card-stat {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary, #f1f5f9);
}

.insights-card-stat small {
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--text-secondary, #94a3b8);
    margin-left: 4px;
}

.insights-card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary, #f1f5f9);
    margin: 0 0 12px;
    line-height: 1.4;
}

.insights-card-desc {
    font-size: 0.9375rem;
    color: var(--text-secondary, #94a3b8);
    line-height: 1.6;
    margin: 0 0 16px;
    flex: 1;
}

.insights-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid var(--border-primary, rgba(255,255,255,0.06));
}

.insights-card-date {
    font-size: 0.8125rem;
    color: var(--text-secondary, #94a3b8);
    opacity: 0.7;
}

.insights-card-cta {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--brand-primary, #3b82f6);
}

/* ═══════════════════════════════════════════════════════════════
   Loading State
   ═══════════════════════════════════════════════════════════════ */

.seo-loading {
    text-align: center;
    padding: 80px 0;
    color: var(--text-secondary, #94a3b8);
}

.seo-loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-primary, rgba(255,255,255,0.1));
    border-top-color: var(--brand-primary, #3b82f6);
    border-radius: 50%;
    animation: seo-spin 0.8s linear infinite;
    margin: 0 auto 16px;
}

@keyframes seo-spin {
    to { transform: rotate(360deg); }
}

.seo-error {
    text-align: center;
    padding: 60px 0;
    color: var(--color-error, #ef4444);
}

/* ═══════════════════════════════════════════════════════════════
   Responsive
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    .seo-report-header h1 {
        font-size: 1.5rem;
    }
    .insights-hub-header h1 {
        font-size: 1.5rem;
    }
    .seo-kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .seo-dashboard-frame iframe {
        height: 70vh;
        min-height: 500px;
    }
    .seo-report {
        padding: 0 16px 60px;
    }
    .insights-hub-container {
        padding: 0 16px 60px;
    }
    .insights-hub-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .seo-report-header h1 {
        font-size: 1.25rem;
    }
    .seo-kpi-grid {
        grid-template-columns: 1fr;
    }
    .seo-dashboard-frame iframe {
        height: 60vh;
        min-height: 400px;
    }
    .seo-report-meta {
        flex-direction: column;
        gap: 8px;
    }
}
