* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.psa-container {
    width: clamp(300px, 100%, 800px);
    margin-inline: auto;
    background-color: white;
    box-shadow: 0 5px 25px rgba(0,0,0,0.1);
    overflow: hidden;
    position: relative;
}

/* Header Section */
.header {
    background: linear-gradient(to right, #2c7d59, #1e5c3e);
    color: white;
    padding: 30px 40px;
    text-align: center;

    .title {
        font-size: 36px;
        margin-bottom: 10px;
        font-weight: 800;
        text-transform: uppercase;
        letter-spacing: 1px;
    }

    .subtitle {
        font-size: 18px;
        opacity: 0.9;
        max-width: 600px;
        margin: 0 auto;
    }
}

.title {
    text-align: center;
}

/* Main Content */
.content {
    padding: 40px;
    display: flex;
    flex-direction: column;
    gap: 30px;

    .compelling-question {
        font-size: 24px;
        color: #2c7d59;
        text-align: center;
        padding: 15px 15px 15px 20px;
        background-color: #f0f7f4;
        border-radius: 10px;
        font-weight: 600;
        position: relative;
        overflow: hidden;

        &::before {
            content: "";
            position: absolute;
            inset: 0;
            display: block;
            width: 5px;
            background: #2c7d59;
        }
    }
    
    .stats-container {
        display: flex;
        justify-content: space-around;
        flex-wrap: wrap;

        .stat-item {
            text-align: center;
            width: 180px;
            padding: 20px 10px;
            background-color: #f9f9f9;
            border-radius: 10px;
            box-shadow: 0 3px 10px rgba(0,0,0,0.1);
            margin: 10px;
            transition: transform 0.3s ease;

            display: flex;
            flex-direction: column;
            gap: 10px;

            &:hover {
                transform: translateY(-5px);
            }

            .stat-number {
                font-size: 32px;
                font-weight: 700;
                color: #2c7d59;
            }

            .stat-description {
                font-size: 14px;
                color: #555;
            }
        }
    }
    
    .columns {
        display: flex;
        gap: 30px;
        flex-wrap: wrap;

        .column {
            min-width: min(300px, 100%);
            flex: 1;
        }
    }
    
    .call-to-action {
        background: linear-gradient(to right, #2c7d59, #1e5c3e);
        color: white;
        padding: 30px;
        text-align: center;
        border-radius: 10px;

        display: flex;
        flex-direction: column;
        gap: 15px;

        .cta-title {
            font-size: 24px;
        }

        .cta-description {
            font-size: 16px;
            max-width: 600px;
            margin: 0 auto;
            opacity: 0.9;
        }

        .cta-button {
            align-self: center;
            display: inline-block;
            background-color: white;
            color: #2c7d59;
            padding: 12px 30px;
            border-radius: 30px;
            font-weight: 600;
            text-decoration: none;
            transition: all 0.3s ease;

            &:hover {
                transform: translateY(-3px);
                box-shadow: 0 5px 15px rgba(0,0,0,0.2);
            }
        }
    }
    
    .key-terms {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;

        .term-tag {
            background-color: #e0f2f1;
            color: #00796b;
            padding: 5px 15px;
            border-radius: 20px;
            font-size: 14px;
            font-weight: 500;
            box-shadow: 0 2px 5px rgba(0,0,0,0.1);
        }
    }
    
    .sources {
        font-size: 12px;
        color: #777;
        font-style: italic;
        text-align: center;
    }
}

/* Section Styles */
.section {
    padding: 20px 20px 20px 25px;
    border-radius: 10px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.1);
    background: var(--background);
    position: relative;
    overflow: hidden;

    &::before {
        content: "";
        position: absolute;
        inset: 0;
        display: block;
        width: 5px;
        background: var(--line);
    }

    .section-title {
        font-size: 20px;
        margin-bottom: 15px;
        border-bottom: 2px solid var(--line);
        padding-bottom: 10px;
        color: var(--color);
    }

    &.sustainable-economy {
        --background: #e8f5e9;
        --line: #43a047;

        .section-title {
            --color: #2e7d32;
            --line: #2e7d32;
        }
    }

    &.human-condition {
        --background: #e3f2fd;
        --line: #1976d2;

        .section-title {
            --color: #0d47a1;
            --line: #0d47a1;
        }
    }

    .key-terms {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;

        .term-tag {
            background-color: #e0f2f1;
            color: #00796b;
            padding: 5px 15px;
            border-radius: 20px;
            font-size: 14px;
            font-weight: 500;
            box-shadow: 0 2px 5px rgba(0,0,0,0.1);
        }
    }
}

/* Product Comparison */
.product-comparison {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
    gap: 30px;

    .product-card {
        padding: 20px 20px 20px 25px;
        border-radius: 10px;
        box-shadow: 0 3px 15px rgba(0,0,0,0.1);
        display: flex;
        flex-direction: column;
        gap: 15px;
        background-color: var(--background);
        position: relative;
        overflow: hidden;

        &::before {
            content: "";
            position: absolute;
            inset: 0;
            display: block;
            width: 5px;
            background: var(--line);
        }

        .product-title {
            font-size: 18px;
            font-weight: 600;
            display: flex;
            align-items: center;

            .product-icon {
                margin-right: 10px;
                width: 30px;
                height: 30px;
                display: flex;
                align-items: center;
                justify-content: center;
            }
        }

        .product-description {
            flex: 1;
        }

        .factors-table {
            width: 100%;
            border-collapse: collapse;
            font-size: 14px;

            th, td {
                padding: 8px;
                text-align: left;
                border-bottom: 1px solid #eee;
            }

            th {
                background-color: rgba(0,0,0,0.05);
                font-weight: 600;
            }
        }

        &.positive {
            &.environment {
                --background: #43a04720;
                --line: #43a047;
            }

            &.human-condition {
                --background: #1976d220;
                --line: #1976d2;
            }
        }

        &.negative {
            &.environment {
                --background: #e5393520;
                --line: #e53935;
            }

            &.human-condition {
                --background: #7b1fa220;
                --line: #7b1fa2;
            }
        }
    }
}

/* Charts */
.chart-container {
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.1);

    display: flex;
    flex-direction: column;
    gap: 10px;

    position: relative;
    isolation: isolate;

    .chart-title {
        text-align: center;
        font-size: 18px;
        color: #555;
    }

    .intersection-observer {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;

        z-index: -1;
    }

    &.js[hidden] {
        .bar-chart {
            .bar {
                --height: 0%;
                opacity: 0;
                animation: none;

                &::before, &::after {
                    opacity: 0;
                }
            }
        }
    }

    .bar-chart {
        height: 300px;
        display: flex;
        align-items: flex-end;
        justify-content: space-around;

        .bar {
            --height: 100%;
            width: 60px;
            transition: height 1s ease;
            display: flex;
            flex-direction: column;
            animation: barGrow 1.5s ease-out forwards;
            
            &::before, &::after {
                opacity: 1;
                width: 100%;
                text-align: center;
                animation: opacityFade 1.5s ease-out forwards;
            }

            &::after {
                content: attr(data-label);
                font-size: 12px;
            }
            
            &::before {
                content: attr(data-value);
                font-size: 14px;
                font-weight: 600;
            }
            
            .pillar {
                flex: 1;
                background: linear-gradient(to top, #2c7d59, #43a047);
                border-radius: 5px 5px 0 0;
            }

            &.renewable {
                height: var(--final-height);
                --final-height: calc(var(--height) / 3.2425);
            }
            
            &.fossil {
                height: var(--final-height);
                --final-height: var(--height);
            }
        }
    }
}

/* Footer */
.footer {
    background-color: #f9f9f9;
    padding: 20px;
    text-align: center;
    color: #777;
    font-size: 14px;
    border-top: 1px solid #eee;
}

/* Animation for charts */
@keyframes barGrow {
    from { height: 0; }
    to { height: var(--final-height); }
}

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

.comparison-title {
    text-align: center;
    color: #333;
}

/* Additional Classes */
.factors-list {
    margin-left: 20px;
    margin-bottom: 15px;
}

.resource-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 15px;
}

.resource-item {
    flex: 1;
    min-width: 200px;
}

.resource-title {
    margin-bottom: 5px;
}

.resource-title.green {
    color: #2e7d32;
}

.resource-title.red {
    color: #e53935;
}

.resource-title.blue {
    color: #1976d2;
}

.main-img-parent {
    width: 100%;

    .img {
        display: block;
        margin-inline: auto;
        max-inline-size: 100%;
        aspect-ratio: 16 / 9;
        object-fit: cover;

        border-radius: 1rem;
        box-shadow: 0 0 10px rgba(0,0,0,0.1);
    }
}