<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Your Membership Certificate</title>
    <style>
        body { font-family: Arial, sans-serif; background: #f4f4f4; margin: 0; padding: 0; color: #333333; }
        .wrapper { max-width: 600px; margin: 30px auto; background: #ffffff; border-radius: 8px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
        .header { background: #1a3a5c; padding: 30px 40px; text-align: center; }
        .header h1 { color: #ffffff; font-size: 22px; margin: 0; letter-spacing: 1px; }
        .header p { color: #c9a84c; font-size: 13px; margin: 6px 0 0; }
        .body { padding: 32px 40px; }
        .greeting { font-size: 16px; margin-bottom: 16px; }
        .message { font-size: 14px; line-height: 1.7; margin-bottom: 20px; color: #555555; }
        .cert-box { background: #f8f9fa; border-left: 4px solid #1a3a5c; padding: 16px 20px; border-radius: 4px; margin-bottom: 24px; }
        .cert-box p { margin: 4px 0; font-size: 13px; color: #444444; }
        .cert-box strong { color: #1a3a5c; }
        .btn { display: inline-block; background: #1a3a5c; color: #ffffff; text-decoration: none; padding: 12px 28px; border-radius: 5px; font-size: 14px; font-weight: bold; margin-top: 8px; }
        .footer { background: #f4f4f4; padding: 20px 40px; text-align: center; font-size: 12px; color: #999999; }
        .footer a { color: #1a3a5c; text-decoration: none; }
    </style>
</head>
<body>
<div class="wrapper">
    <div class="header">
        <h1>Membership Certificate</h1>
        <p>Your certificate is ready</p>
    </div>

    <div class="body">
        <p class="greeting">Dear <strong>{{ $member->full_name }}</strong>,</p>

        <p class="message">
            Congratulations! Your membership has been confirmed and your official membership certificate
            has been issued. Please find your certificate attached to this email as a PDF document.
        </p>

        <div class="cert-box">
            <p><strong>Certificate Number:</strong> {{ $certificate->certificate_number }}</p>
            <p><strong>Issue Date:</strong> {{ $certificate->issue_date->format('F j, Y') }}</p>
            <p><strong>Valid Till:</strong> {{ $certificate->valid_till_date->format('F j, Y') }}</p>
        </div>

        <p class="message">
            You can also download your certificate at any time from your member portal by clicking the button below.
        </p>

        <a href="{{ url('/member/certificate') }}" class="btn">View My Certificate</a>

        <p class="message" style="margin-top: 24px;">
            If you have any questions about your membership, please do not hesitate to contact us.
        </p>

        <p class="message">
            Warm regards,<br>
            <strong>The Membership Team</strong>
        </p>
    </div>

    <div class="footer">
        <p>This email was sent to you because you are a registered member.</p>
        <p>If you believe this was sent in error, please <a href="{{ url('/contact') }}">contact us</a>.</p>
    </div>
</div>
</body>
</html>
