<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <title><?= esc($subject ?? 'Al Rahma Sunday School') ?></title>
    <style>
        body {
            font-family: Arial, sans-serif;
            background-color: #f9f9f9;
            padding: 40px 0;
            margin: 0;
        }

        .email-container {
            background-color: #ffffff;
            max-width: 600px;
            margin: auto;
            border-radius: 6px;
            overflow: hidden;
            box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
        }

        .email-header {
            background-color: #e0f3ff;
            text-align: center;
            padding: 10px 10px;
        }

        .email-header img {
            max-height: 200px;
        }

        .email-body {
            padding: 10px;
            color: #333333;
        }

        .email-nopicture {
            text-align: center;
        }

        .email-footer {
            text-align: center;
            font-size: 14px;
            color: #777777;
            padding: 20px;
            background-color: #f1f1f1;
        }

        a {
            color: #007bff;
        }
    </style>
</head>

<body>
    <div class="email-container">
        <div class="email-nopicture">
            <img src="https://alrahmaisgl.org/assets/images/alrahma_logo.png" alt="" style="width: 110px; height: 110px; border-radius: 50%; object-fit: cover;">
        </div>

        <div class="email-body">
            <?php
            $body = $this->renderSection('email_content');
            if (trim($body) === '') {
                $body = $this->renderSection('content');
            }
            echo $body;
            ?>
        </div>
        <div class="email-footer">
            <p>Visit us: <a href="https://alrahmaisgl.org" target="_blank">https://alrahmaisgl.org</a></p>
            <p>Contact: <a href="mailto:alrahma.isgl@gmail.com">alrahma.isgl@gmail.com</a></p>
            <p>Address: 5 Courthouse Lane, Chelmsford, MA 01824</p>
        </div>
    </div>
</body>

</html>