// This script is for client-side functionality and not part of the content itself.
// It is included to demonstrate how responsiveness and interactive elements would be handled
// if this content were embedded in a live web page with JavaScript.
// For a pure copy-paste into a block editor, this script part might be ignored or removed.
function applyResponsiveStyles() {
const articleDiv = document.querySelector(‘div[style*=”font-family: ‘B Nazanin'”]’);
if (!articleDiv) return;
const width = window.innerWidth;
// Adjust font sizes for smaller screens
if (width h.style.fontSize = ‘2.2em’);
document.querySelectorAll(‘h2’).forEach(h => h.style.fontSize = ‘1.8em’);
document.querySelectorAll(‘h3’).forEach(h => h.style.fontSize = ‘1.4em’);
document.querySelectorAll(‘table th, table td’).forEach(el => el.style.padding = ‘8px 10px’);
document.querySelectorAll(‘.infographic-item h4’).forEach(h => h.style.fontSize = ‘1.1em’);
document.querySelectorAll(‘.infographic-item p’).forEach(p => p.style.fontSize = ‘0.85em’);
document.querySelectorAll(‘.contact-section div’).forEach(div => div.style.flex = ‘1 1 100%’);
} else if (width h.style.fontSize = ‘2.5em’);
document.querySelectorAll(‘h2’).forEach(h => h.style.fontSize = ‘2em’);
document.querySelectorAll(‘h3’).forEach(h => h.style.fontSize = ‘1.6em’);
document.querySelectorAll(‘table th, table td’).forEach(el => el.style.padding = ’10px 12px’);
document.querySelectorAll(‘.infographic-item h4’).forEach(h => h.style.fontSize = ‘1.2em’);
document.querySelectorAll(‘.infographic-item p’).forEach(p => p.style.fontSize = ‘0.9em’);
document.querySelectorAll(‘.contact-section div’).forEach(div => div.style.flex = ‘1 1 45%’);
} else {
articleDiv.style.fontSize = ’16px’;
document.querySelectorAll(‘h1’).forEach(h => h.style.fontSize = ‘2.8em’);
document.querySelectorAll(‘h2’).forEach(h => h.style.fontSize = ‘2.2em’);
document.querySelectorAll(‘h3’).forEach(h => h.style.fontSize = ‘1.8em’);
document.querySelectorAll(‘table th, table td’).forEach(el => el.style.padding = ’12px 15px’);
document.querySelectorAll(‘.infographic-item h4’).forEach(h => h.style.fontSize = ‘1.3em’);
document.querySelectorAll(‘.infographic-item p’).forEach(p => p.style.fontSize = ‘0.95em’);
document.querySelectorAll(‘.contact-section div’).forEach(div => div.style.flex = ‘1 1 250px’);
}
}
// Call on load and resize
window.addEventListener(‘load’, applyResponsiveStyles);
window.addEventListener(‘resize’, applyResponsiveStyles);
// Optional: Add a class to infographic items for easier styling
document.querySelectorAll(‘div[style*=”background-color: white; border: 1px solid #cceeff;”]’).forEach(el => {
el.classList.add(‘infographic-item’);
});
// Optional: Add a class to contact section for easier styling
document.querySelector(‘div[style*=”background-color: #f0f8ff;”]’).classList.add(‘contact-section’);
// This part ensures that the link placeholder is visible and instructs the user.
// In a real scenario, this would be replaced with the actual link.
document.addEventListener(‘DOMContentLoaded’, () => {
const linkElement = document.querySelector(‘a[href=”YOUR_CATEGORY_LINK_HERE”]’);
if (linkElement) {
linkElement.title = “دسته بندی مربوط به انواع کامیون و کشنده را از اینجا مشاهده نمایید.”;
// For a live site, you would replace href with the actual URL:
// linkElement.href = “https://example.com/category/18-wheelers”;
// And remove the instruction for the user.
}
});














