/* Scoring Explainer Page Styles */

.scoring-explainer-page {
    font-family: var(--font-family-a);
    color: var(--text);
    background: var(--bs-body-bg);
}

/* =========================
   Hero Section
   ========================= */
.explainer-hero {
    background: linear-gradient(135deg, var(--bs-primary) 0%, var(--primary) 100%);
    color: white;
    padding: 6rem 0 4rem;
    position: relative;
    overflow: hidden;
}

.hero-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1.2;
    font-family: var(--font-family-b);
}

.hero-subtitle {
    font-size: 1.25rem;
    opacity: 0.95;
    max-width: 700px;
    margin: 0 auto;
    font-family: var(--font-family-a);
}

.hero-cta .btn {
    padding: 0.875rem 2rem;
    font-weight: 600;
}

.hero-wave {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    color: var(--bs-body-bg);
}

/* =========================
   Section Headings
   ========================= */
.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 1rem;
    font-family: var(--font-family-b);
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-muted);
    font-family: var(--font-family-a);
}

/* =========================
   Overview Section
   ========================= */
.overview-section {
    padding: 5rem 0;
    background: var(--surface-0);
}

.three-layer-diagram {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    padding: 3rem 0;
}

/* Industry-Based Scoring Announcement */
.industry-scoring-announcement {
    margin: 3rem 0;
}

.announcement-card {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.05) 0%, rgba(59, 130, 246, 0.1) 100%);
    border: 2px solid var(--bs-primary);
    border-radius: 1rem;
    padding: 2.5rem;
    position: relative;
    overflow: hidden;
}

.announcement-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--bs-primary) 0%, var(--bs-secondary) 100%);
}

.announcement-badge {
    display: inline-block;
    background: var(--bs-primary);
    color: white;
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    font-family: var(--font-family-b);
}

.announcement-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.5rem;
    font-family: var(--font-family-b);
}

.announcement-subtitle {
    font-size: 1.125rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    font-family: var(--font-family-a);
}

.announcement-content {
    color: var(--text);
}

.announcement-content p {
    line-height: 1.7;
}

.feature-highlight {
    background: var(--surface-0);
    padding: 1.25rem;
    border-radius: 0.75rem;
    text-align: center;
    box-shadow: var(--shadow-s);
    height: 100%;
    transition: all 0.3s ease;
}

.feature-highlight:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-m);
}

.feature-highlight i {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.75rem;
}

.feature-highlight strong {
    display: block;
    font-size: 1rem;
    margin-bottom: 0.5rem;
    font-family: var(--font-family-b);
}

.announcement-note {
    background: rgba(37, 99, 235, 0.1);
    border-left: 4px solid var(--bs-primary);
    padding: 1rem 1.25rem;
    border-radius: 0.5rem;
    font-size: 0.95rem;
    margin-top: 1.5rem;
    margin-bottom: 0;
}

.three-layer-diagram {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    padding: 3rem 0;
}

.layer {
    background: var(--surface-0);
    border: 2px solid var(--bs-border-color);
    border-radius: 1rem;
    padding: 2rem;
    width: 100%;
    max-width: 600px;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: all 0.3s ease;
}

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

.layer-3 {
    border-color: var(--pillar-valuation);
    background: linear-gradient(135deg, var(--pillar-valuation-light) 0%, var(--pillar-valuation-medium) 100%);
}

.layer-2 {
    border-color: var(--bs-primary);
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1) 0%, rgba(37, 99, 235, 0.2) 100%);
}

.layer-1 {
    border-color: var(--pillar-profitability);
    background: linear-gradient(135deg, var(--pillar-profitability-light) 0%, var(--pillar-profitability-medium) 100%);
}

.layer-icon {
    font-size: 3rem;
    flex-shrink: 0;
}

.layer-content h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    font-family: var(--font-family-b);
}

.layer-badge {
    display: inline-block;
    background: rgba(0, 0, 0, 0.1);
    padding: 0.25rem 0.75rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 0.5rem;
}

.layer-arrow {
    font-size: 2rem;
    color: var(--text-muted);
    opacity: 0.5;
}

.overview-steps {
    padding-left: 1.5rem;
}

.overview-steps li {
    margin-bottom: 1rem;
    line-height: 1.6;
}

/* =========================
   Pillars Section
   ========================= */
.pillars-section {
    padding: 5rem 0;
    background: var(--bs-body-bg);
}

.pillars-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.pillar-card {
    background: var(--surface-0);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: var(--shadow-s);
    transition: all 0.3s ease;
    border-top: 4px solid var(--bs-primary);
}

.pillar-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-l);
}

.pillar-growth { border-top-color: var(--pillar-growth); }
.pillar-profitability { border-top-color: var(--pillar-profitability); }
.pillar-health { border-top-color: var(--pillar-health); }
.pillar-efficiency { border-top-color: var(--pillar-efficiency); }
.pillar-valuation { border-top-color: var(--pillar-valuation); }

.pillar-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--bs-primary);
}

.pillar-growth .pillar-icon { color: var(--pillar-growth); }
.pillar-profitability .pillar-icon { color: var(--pillar-profitability); }
.pillar-health .pillar-icon { color: var(--pillar-health); }
.pillar-efficiency .pillar-icon { color: var(--pillar-efficiency); }
.pillar-valuation .pillar-icon { color: var(--pillar-valuation); }

.pillar-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    font-family: var(--font-family-b);
}

.pillar-description {
    margin-bottom: 1.5rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.pillar-metrics h6 {
    font-weight: 700;
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.pillar-metrics ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.pillar-metrics li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--bs-border-color);
    font-size: 0.875rem;
}

.pillar-why-matters {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 2px solid var(--bs-border-color);
    font-size: 0.875rem;
    font-style: italic;
    color: var(--text-muted);
}

/* =========================
   Metric Scoring Section
   ========================= */
.metric-scoring-section {
    padding: 5rem 0;
    background: var(--surface-0);
}

.example-card {
    background: var(--surface-0);
    border-radius: 1rem;
    padding: 2.5rem;
    box-shadow: var(--shadow-m);
    border: 1px solid var(--bs-border-color);
}

.example-header h4 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    font-family: var(--font-family-b);
}

.calculation-steps {
    margin: 2rem 0;
}

.step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.step-number {
    width: 3rem;
    height: 3rem;
    background: var(--bs-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.25rem;
    margin-bottom: 1rem;
    font-family: var(--font-family-b);
}

.step-content {
    text-align: center;
    padding: 1.5rem;
    background: var(--surface-1);
    border-radius: 0.5rem;
    width: 100%;
    max-width: 500px;
}

.step-description {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.step-value {
    font-size: 1.25rem;
    color: var(--bs-primary);
    font-weight: 700;
    font-family: var(--font-family-b);
}

.step-arrow {
    margin: 1rem 0;
    font-size: 2rem;
    color: var(--text-muted);
    opacity: 0.3;
}

.example-result {
    background: linear-gradient(135deg, var(--bs-success) 0%, var(--success) 100%);
    color: white;
    padding: 2rem;
    border-radius: 0.75rem;
    margin-top: 2rem;
}

.result-score {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.result-label {
    font-size: 1.125rem;
    font-weight: 600;
}

.result-value {
    font-size: 2.5rem;
    font-weight: 700;
    font-family: var(--font-family-b);
}

.result-explanation {
    opacity: 0.95;
    line-height: 1.6;
}

.principle-item {
    padding: 1rem 0;
    border-bottom: 1px solid var(--bs-border-color);
}

.principle-item:last-child {
    border-bottom: none;
}

/* =========================
   Pillar Aggregation Section
   ========================= */
.pillar-aggregation-section {
    padding: 5rem 0;
    background: var(--bs-body-bg);
}

.metrics-list {
    margin: 2rem 0;
}

.metric-row {
    display: grid;
    grid-template-columns: 2fr 1fr 4fr;
    gap: 1rem;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid var(--bs-border-color);
}

.metric-name {
    font-weight: 600;
    font-family: var(--font-family-a);
}

.metric-score {
    font-weight: 700;
    color: var(--bs-success);
    font-family: var(--font-family-b);
}

.metric-bar {
    background: var(--surface-2);
    height: 0.75rem;
    border-radius: 0.375rem;
    overflow: hidden;
}

.metric-bar-fill {
    background: linear-gradient(90deg, var(--bs-success) 0%, var(--success) 100%);
    height: 100%;
    transition: width 0.3s ease;
}

.aggregation-formula {
    /* background: var(--surface-0); */
    font-family: 'Courier New', monospace;
}

.formula-step {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.formula-calculation {
    font-size: 1.125rem;
    padding: 0.75rem;
    background: var(--surface-0);
    border-radius: 0.375rem;
    border-left: 4px solid var(--bs-primary);
}

.pillar-result {
    margin-top: 2rem;
}

.result-box {
    background: linear-gradient(135deg, var(--bs-success) 0%, var(--success) 100%);
    color: white;
    padding: 2rem;
    border-radius: 1rem;
    text-align: center;
}

.result-label {
    font-size: 1rem;
    opacity: 0.9;
    margin-bottom: 0.5rem;
}

.result-score-large {
    font-size: 4rem;
    font-weight: 700;
    line-height: 1;
    margin: 1rem 0;
    font-family: var(--font-family-b);
}

.result-confidence {
    opacity: 0.95;
}

/* =========================
   Overall Scoring Section  
   ========================= */
.overall-scoring-section {
    padding: 5rem 0;
    background: var(--surface-0);
}

.weight-legend {
    margin-top: 1rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.legend-dot {
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
}

.legend-dot.pillar-color {
    background: var(--bs-primary);
}

.legend-dot.metric-color {
    background: var(--bs-secondary);
}

.pillar-weight-row .progress {
    background: var(--surface-2);
}

.pillar-name {
    font-family: var(--font-family-a);
    font-weight: 600;
}

.pillar-weight-value {
    font-weight: 700;
    color: var(--bs-primary);
    font-family: var(--font-family-b);
}

.calculation-grid {
    display: grid;
    gap: 0.75rem;
}

.calc-row {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem;
    background: var(--surface-1);
    border-radius: 0.375rem;
}

.calc-row.total-row {
    background: var(--bs-primary);
    color: white;
    font-size: 1.125rem;
    font-family: var(--font-family-b);
}

/* =========================
   Confidence Section
   ========================= */
.confidence-section {
    padding: 5rem 0;
    background: var(--bs-body-bg);
}

.confidence-formula {
    font-family: 'Courier New', monospace;
}

.confidence-example {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--surface-0);
    border-radius: 0.5rem;
    border-left: 4px solid var(--bs-info);
}

.example-title {
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.confidence-levels {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.confidence-level {
    background: var(--surface-0);
    padding: 1.5rem;
    border-radius: 0.75rem;
    box-shadow: var(--shadow-s);
}

.level-bar {
    height: 0.75rem;
    border-radius: 0.375rem;
    margin-bottom: 1rem;
    transition: width 0.3s ease;
}

.confidence-level.high .level-bar {
    background: linear-gradient(90deg, var(--bs-success) 0%, var(--success) 100%);
}

.confidence-level.medium .level-bar {
    background: linear-gradient(90deg, var(--bs-warning) 0%, var(--warning) 100%);
}

.confidence-level.low .level-bar {
    background: linear-gradient(90deg, var(--bs-danger) 0%, var(--danger) 100%);
}

.level-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.level-range {
    font-weight: 700;
}

.level-label {
    font-family: var(--font-family-b);
    font-weight: 600;
}

.level-description {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.factor-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.factor-item i {
    font-size: 1.5rem;
    flex-shrink: 0;
}

/* =========================
   Adjustments Section
   ========================= */
.adjustments-section {
    padding: 5rem 0;
    background: var(--surface-0);
}

.adjustment-icon {
    font-size: 4rem;
    color: var(--bs-primary);
}

.adjustments-table {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.adjustment-row {
    display: grid;
    grid-template-columns: 1fr auto 2fr;
    gap: 1.5rem;
    align-items: center;
    padding: 1.5rem;
    background: var(--surface-1);
    border-radius: 0.75rem;
    transition: all 0.3s ease;
}

.adjustment-row:hover {
    background: var(--surface-2);
    transform: translateX(5px);
}

.adjustment-sector strong {
    font-size: 1.125rem;
}

.adjustment-value .badge {
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
}

.reason-text {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.example-text {
    font-size: 0.875rem;
}

.market-cap-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.market-cap-card {
    background: var(--surface-0);
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: var(--shadow-s);
    border-top: 4px solid var(--bs-primary);
    transition: all 0.3s ease;
}

.market-cap-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-m);
}

.cap-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.cap-header i {
    font-size: 1.5rem;
}

.cap-header h5 {
    margin: 0;
    font-size: 1.25rem;
    font-family: var(--font-family-b);
}

.cap-range {
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.cap-adjustment {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--bs-primary);
    margin-bottom: 1rem;
    font-family: var(--font-family-b);
}

.cap-reason {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.comparison-box {
    padding: 1.5rem;
    background: var(--surface-0);
    border-radius: 0.5rem;
    box-shadow: var(--shadow-s);
}

.comparison-item {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--bs-border-color);
}

.comparison-item.total {
    border-top: 2px solid var(--bs-primary);
    border-bottom: none;
    padding-top: 1rem;
    margin-top: 0.5rem;
}

/* =========================
   FAQ Section
   ========================= */
.faq-section {
    padding: 5rem 0;
    background: var(--bs-body-bg);
}

.faq-accordion .accordion-item {
    border: 1px solid var(--bs-border-color);
    margin-bottom: 1rem;
    border-radius: 0.5rem;
    overflow: hidden;
}

.faq-accordion .accordion-button {
    font-weight: 600;
    background: var(--surface-0);
    font-family: var(--font-family-b);
}

.faq-accordion .accordion-button:not(.collapsed) {
    background: var(--bs-primary);
    color: white;
}

.faq-disclaimer {
    margin-top: 3rem;
}

/* =========================
   CTA Section
   ========================= */
.cta-section {
    padding: 5rem 0;
    background: linear-gradient(135deg, var(--bs-primary) 0%, var(--primary) 100%);
    color: white;
}

.cta-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 1.5rem;
    padding: 4rem 3rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    font-family: var(--font-family-b);
}

.cta-subtitle {
    font-size: 1.25rem;
    opacity: 0.95;
    margin-bottom: 2rem;
    font-family: var(--font-family-a);
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-buttons .btn {
    padding: 1rem 2rem;
    font-weight: 600;
}

.cta-decoration {
    position: absolute;
    right: 2rem;
    bottom: 2rem;
    font-size: 10rem;
    opacity: 0.1;
}

.next-steps {
    background: var(--surface-0);
    padding: 3rem;
    border-radius: 1rem;
    margin-top: 3rem;
}

.next-step-card {
    background: var(--surface-1);
    padding: 2rem;
    border-radius: 0.75rem;
    text-align: center;
    transition: all 0.3s ease;
    height: 100%;
}

.next-step-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-m);
}

.step-icon {
    font-size: 3rem;
    color: var(--bs-primary);
    margin-bottom: 1rem;
}

.step-link {
    display: inline-block;
    margin-top: 1rem;
    color: var(--bs-primary);
    font-weight: 600;
    text-decoration: none;
    font-family: var(--font-family-b);
}

.step-link:hover {
    text-decoration: underline;
}

/* =========================
   Responsive Styles
   ========================= */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .metric-row {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .adjustment-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .cta-title {
        font-size: 1.75rem;
    }

    .cta-buttons {
        flex-direction: column;
    }

    .cta-decoration {
        display: none;
    }

    /* Industry announcement responsive */
    .announcement-card {
        padding: 1.5rem;
    }

    .announcement-title {
        font-size: 1.5rem;
    }

    .announcement-subtitle {
        font-size: 1rem;
    }

    .feature-highlight {
        padding: 1rem;
    }

    .feature-highlight i {
        font-size: 1.5rem;
    }
}
