<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>{{ subject }}</title>
    <!--[if mso]>
    <style type="text/css">
        body, table, td { font-family: Arial, sans-serif !important; }
    </style>
    <![endif]-->
</head>
<body style="margin: 0; padding: 0; background-color: #ffffff; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif; -webkit-font-smoothing: antialiased; color: #292929;">
    <table role="presentation" width="100%" cellspacing="0" cellpadding="0" border="0" style="background-color: #ffffff;">
        <tr>
            <td align="center" style="padding: 0;">
                <table role="presentation" width="100%" cellspacing="0" cellpadding="0" border="0" style="max-width: 600px;">

                    <!-- Header -->
                    <tr>
                        <td style="padding: 32px 20px 24px 20px;">
                            {% if logo_url %}
                            <img src="{{ logo_url }}" alt="{{ platform_name }}" style="max-height: 40px; max-width: 160px;">
                            {% else %}
                            <span style="font-family: Georgia, 'Times New Roman', serif; font-size: 28px; letter-spacing: -0.5px;">
                                <span style="font-weight: 700; color: {{ secondary_color }};">{{ platform_name }}</span>
                                <span style="font-weight: 400; color: #5f584f;"> Platform Brief</span>
                            </span>
                            {% endif %}
                        </td>
                    </tr>

                    <!-- Section Divider -->
                    <tr>
                        <td style="padding: 0 20px;">
                            <table role="presentation" width="100%" cellspacing="0" cellpadding="0" border="0">
                                <tr>
                                    <td style="border-bottom: 1px solid #e6e6e6; padding-bottom: 8px;">
                                        <span style="font-size: 12px; font-weight: 600; color: #757575; text-transform: uppercase; letter-spacing: 0.5px;">Platform Update</span>
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>

                    <!-- Content -->
                    <tr>
                        <td style="padding: 24px 20px 32px 20px;">
                            <style>
                                h1 { font-family: Georgia, 'Times New Roman', serif; font-size: 22px; font-weight: 700; line-height: 1.3; color: #292929; margin: 0 0 8px 0; letter-spacing: -0.3px; }
                                h2 { font-family: Georgia, 'Times New Roman', serif; font-size: 20px; font-weight: 700; line-height: 1.3; color: #292929; margin: 32px 0 8px 0; letter-spacing: -0.3px; }
                                h3 { font-family: Georgia, 'Times New Roman', serif; font-size: 18px; font-weight: 700; line-height: 1.3; color: #292929; margin: 24px 0 6px 0; }
                                p { margin: 0 0 16px 0; font-size: 16px; line-height: 1.6; color: #505050; }
                                a { color: {{ secondary_color }}; text-decoration: none; }
                                a:hover { text-decoration: underline; }
                                strong, b { font-weight: 700; color: #292929; }
                                ul, ol { padding-left: 20px; margin: 0 0 16px 0; }
                                li { margin-bottom: 12px; font-size: 16px; line-height: 1.5; color: #505050; }
                                .highlight { background: #fafafa; border-left: 3px solid {{ primary_color }}; padding: 16px 20px; margin: 20px 0; }
                                .highlight p { margin: 0; color: #505050; }
                                hr { border: none; border-top: 1px solid #e6e6e6; margin: 24px 0; }
                            </style>
                            {{ content }}
                        </td>
                    </tr>

                    <!-- Footer -->
                    <tr>
                        <td style="background-color: #292929; padding: 24px 20px;">
                            <table role="presentation" width="100%" cellspacing="0" cellpadding="0" border="0">
                                <tr>
                                    <td style="text-align: center; padding-bottom: 16px;">
                                        <span style="font-family: Georgia, 'Times New Roman', serif; font-size: 18px; font-weight: 700; color: #ffffff;">{{ platform_name }}</span>
                                    </td>
                                </tr>
                                <tr>
                                    <td style="text-align: center;">
                                        <span style="font-size: 12px; color: #757575;">
                                            {{ footer_text }}
                                            {% if support_email %}
                                            <span style="color: #757575;"> · </span>
                                            <a href="mailto:{{ support_email }}" style="color: #757575; text-decoration: underline;">Contact Support</a>
                                            {% endif %}
                                        </span>
                                    </td>
                                </tr>
                                <tr>
                                    <td style="text-align: center; padding-top: 16px;">
                                        <a href="#" style="font-size: 12px; color: #757575; text-decoration: underline;">Unsubscribe</a>
                                        <span style="color: #757575;"> · </span>
                                        <a href="#" style="font-size: 12px; color: #757575; text-decoration: underline;">Privacy Policy</a>
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>

                </table>
            </td>
        </tr>
    </table>
</body>
</html>
