<?php
// Colossians Bible Study

$colossiansBibleStudy = [
    "title" => "Bible Study on Colossians",
    
    "background_context" => [
        "author" => "Paul the Apostle",
        "recipients" => "Church in Colossae",
        "purpose" => [
            "Encourage believers in the supremacy of Christ over all creation and spiritual powers",
            "Correct false teachings and emphasize the fullness of life in Christ",
            "Strengthen unity, love, and godly living in the church community"
        ],
        "key_theme" => "Christ’s supremacy and completeness in Him",
        "discussion_starter" => "How does Christ’s supremacy affect your view of daily struggles and spiritual battles?"
    ],
    
    "structure_main_points" => [
        [
            "section" => "The Supremacy of Christ",
            "passages" => "Colossians 1:15–23",
            "summary" => "Christ is the image of the invisible God, creator of all, and the head of the church. Believers are reconciled through His blood.",
            "key_verses" => [
                "Colossians 1:16 – 'For in him all things were created: things in heaven and on earth, visible and invisible…'",
                "Colossians 1:18 – 'He is the head of the body, the church; he is the beginning and the firstborn from among the dead…'"
            ],
            "discussion" => "How does recognizing Christ’s supremacy influence your worship and daily decisions?"
        ],
        [
            "section" => "Fullness in Christ",
            "passages" => "Colossians 2:6–15",
            "summary" => "Believers are complete in Christ, rooted and built up in Him, resisting deceptive philosophies and human traditions.",
            "key_verses" => [
                "Colossians 2:10 – 'And in Christ you have been brought to fullness. He is the head over every power and authority.'",
                "Colossians 2:15 – 'And having disarmed the powers and authorities, he made a public spectacle of them…'"
            ],
            "discussion" => "What does being 'complete in Christ' mean for your spiritual growth?"
        ],
        [
            "section" => "Living in Christ",
            "passages" => "Colossians 3:1–17",
            "summary" => "Believers are called to set their minds on things above, put to death earthly behaviors, and clothe themselves in virtues like compassion, kindness, humility, patience, and love.",
            "key_verses" => [
                "Colossians 3:1–2 – 'Since, then, you have been raised with Christ, set your hearts on things above…'",
                "Colossians 3:12–14 – 'Therefore, as God’s chosen people, clothe yourselves with compassion, kindness, humility…'"
            ],
            "discussion" => "How can you actively ‘clothe yourself’ with these virtues in your relationships today?"
        ],
        [
            "section" => "Instructions for Families and Work",
            "passages" => "Colossians 3:18–4:1",
            "summary" => "Paul gives practical instructions for wives, husbands, children, parents, and workers, emphasizing obedience, respect, and diligence as unto the Lord.",
            "key_verses" => [
                "Colossians 3:23 – 'Whatever you do, work at it with all your heart, as working for the Lord, not for human masters.'",
                "Colossians 3:18–19 – Instructions for wives and husbands"
            ],
            "discussion" => "How does viewing daily work and family responsibilities as service to God change your attitude and actions?"
        ],
        [
            "section" => "Prayer and Perseverance",
            "passages" => "Colossians 4:2–18",
            "summary" => "Paul urges steadfast prayer, wise conduct, and sharing the gospel. He also sends greetings and emphasizes encouragement among believers.",
            "key_verses" => [
                "Colossians 4:2 – 'Devote yourselves to prayer, being watchful and thankful.'",
                "Colossians 4:5–6 – 'Be wise in the way you act toward outsiders; make the most of every opportunity…'"
            ],
            "discussion" => "How can prayer and careful conduct strengthen your witness to others?"
        ]
    ],
    
    "key_themes" => [
        "Supremacy of Christ" => "Christ is above all powers and the head of the church.",
        "Fullness in Christ" => "Believers are complete in Him and resistant to false teachings.",
        "Living in Christ" => "Transformation of daily conduct to reflect heavenly values.",
        "Practical Godly Living" => "Obedience, diligence, and love in family, work, and community.",
        "Prayer and Perseverance" => "Persistent prayer and wise action sustain spiritual growth."
    ],
    
    "practical_application" => [
        "Reflect on areas where you may be seeking fulfillment outside of Christ.",
        "Examine your daily habits and attitudes in light of Colossians 3 virtues.",
        "Serve your family, work, and community as unto the Lord.",
        "Commit to regular prayer, watchfulness, and gratitude.",
        "Encourage others in faith and unity, modeling Christ’s love."
    ],
    
    "group_discussion_questions" => [
        "How does Christ’s supremacy affect your perspective on spiritual challenges?",
        "In what ways can you grow more complete in Christ in your daily life?",
        "Which virtues in Colossians 3 do you find hardest to practice? Why?",
        "How can your work and family life reflect obedience to Christ?",
        "What role does prayer play in maintaining spiritual vigilance and growth?"
    ]
];

?>

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title><?php echo $colossiansBibleStudy['title']; ?></title>
    <style>
        body { font-family: Arial, sans-serif; line-height: 1.6; margin: 20px; max-width: 900px; }
        h1, h2, h3 { color: #2c3e50; }
        ul { margin-bottom: 20px; }
        li { margin-bottom: 10px; }
        .section { margin-bottom: 30px; padding-bottom: 20px; border-bottom: 1px solid #ccc; }
        .key-verse { font-style: italic; color: #34495e; }
    </style>
</head>
<body>

<h1><?php echo $colossiansBibleStudy['title']; ?></h1>

<h2>1. Background & Context</h2>
<p><strong>Author:</strong> <?php echo $colossiansBibleStudy['background_context']['author']; ?></p>
<p><strong>Recipients:</strong> <?php echo $colossiansBibleStudy['background_context']['recipients']; ?></p>
<p><strong>Purpose:</strong></p>
<ul>
    <?php foreach ($colossiansBibleStudy['background_context']['purpose'] as $purpose) {
        echo "<li>$purpose</li>";
    } ?>
</ul>
<p><strong>Key Theme:</strong> <?php echo $colossiansBibleStudy['background_context']['key_theme']; ?></p>
<p><strong>Discussion Starter:</strong> <?php echo $colossiansBibleStudy['background_context']['discussion_starter']; ?></p>

<h2>2. Structure & Main Points</h2>
<?php foreach ($colossiansBibleStudy['structure_main_points'] as $point) { ?>
    <div class="section">
        <h3><?php echo $point['section']; ?> (<?php echo $point['passages']; ?>)</h3>
        <p><?php echo $point['summary']; ?></p>
        <p class="key-verse"><strong>Key Verses:</strong></p>
        <ul>
        <?php foreach ($point['key_verses'] as $verse) {
            echo "<li>$verse</li>";
        } ?>
        </ul>
        <p><strong>Discussion:</strong> <?php echo $point['discussion']; ?></p>
    </div>
<?php } ?>

<h2>3. Key Themes</h2>
<ul>
<?php foreach ($colossiansBibleStudy['key_themes'] as $theme => $description) {
    echo "<li><strong>$theme:</strong> $description</li>";
} ?>
</ul>

<h2>4. Practical Application</h2>
<ul>
<?php foreach ($colossiansBibleStudy['practical_application'] as $action) {
    echo "<li>$action</li>";
} ?>
</ul>

<h2>5. Group Discussion Questions</h2>
<ul>
<?php foreach ($colossiansBibleStudy['group_discussion_questions'] as $question) {
    echo "<li>$question</li>";
} ?>
</ul>

</body>
</html>
