/* Add custom CSS styles below */ 
/* خلفية الفوتر باللون التركواز */
footer {
    background-color: #017f8a !important;
}

/* جميع نصوص الفوتر باللون الأبيض */
footer,
footer * {
    color: #ffffff !important;
}

/* روابط الفوتر باللون الأبيض */
footer a,
footer a:hover,
footer a:focus {
    color: #ffffff !important;
}
from PIL import Image
from pathlib import Path
import zipfile

paths = [Path(f"/mnt/data/{i}.png") for i in range(1, 7)]
out_dir = Path("/mnt/data/partner_logos_ready")
out_dir.mkdir(exist_ok=True)

canvas_w, canvas_h = 800, 400
max_w, max_h = 700, 300
padding = 30

outputs = []

for idx, p in enumerate(paths, start=1):
    im = Image.open(p).convert("RGBA")
    bbox = im.getbbox()
    cropped = im.crop(bbox)

    # إضافة هامش بسيط حول الشعار بعد قص الفراغ الكبير
    padded = Image.new("RGBA", (cropped.width + padding*2, cropped.height + padding*2), (255,255,255,0))
    padded.alpha_composite(cropped, (padding, padding))

    # توحيد المقاس مع الحفاظ على النسبة
    scale = min(max_w / padded.width, max_h / padded.height)
    new_size = (max(1, int(padded.width * scale)), max(1, int(padded.height * scale)))
    resized = padded.resize(new_size, Image.Resampling.LANCZOS)

    canvas = Image.new("RGBA", (canvas_w, canvas_h), (255,255,255,0))
    x = (canvas_w - resized.width) // 2
    y = (canvas_h - resized.height) // 2
    canvas.alpha_composite(resized, (x, y))

    out = out_dir / f"partner_logo_{idx}.png"
    canvas.save(out, optimize=True)
    outputs.append(out)

zip_path = Path("/mnt/data/partner_logos_ready.zip")
with zipfile.ZipFile(zip_path, "w", zipfile.ZIP_DEFLATED) as z:
    for f in outputs:
        z.write(f, arcname=f.name)

print("تم تجهيز 6 شعارات بمقاس موحد 800×400 وخلفية شفافة.")
print(zip_path)


}
/* إجبار شعارات شركاء النجاح على الظهور بألوانها الأصلية */
html body .partners-logos .brand-item img,
html body .partners-logos .brand-item:hover img,
html body .partners-logos .brand-item:focus img,
html body .partners-logos .brand-item:active img,
html body .partners-logos a.brand-item img {
    filter: grayscale(0%) !important;
    -webkit-filter: grayscale(0%) !important;
    opacity: 1 !important;
}