/*
 * City4Market - Policy Pages Stylesheet (policy-style.css)
 * Version: 1.2 - Accessibility & Performance Enhancements, Responsive Design
 * Description: Shared styles for privacy policy, return policy, etc., optimized for user experience.
*/

/* --- 1. General Variables & Reset --- */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #1abc9c;
    --text-color: #34495e;
    --text-light: #7f8c8d;
    --bg-light: #f4f6f9;
    --bg-white: #ffffff;
    --border-color: #e8eaf0;
    --radius-lg: 16px;
    --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.07);
    --focus-ring-color: rgba(26, 188, 156, 0.4);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Cairo', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-color);
    line-height: 1.8;
    font-size: 1rem;
    overflow-x: hidden; /* Prevent horizontal scroll */
}

/* --- 2. Header & Footer --- */
.page-header {
    background-color: var(--primary-color);
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.logo {
    color: var(--bg-white);
    font-size: 1.8rem;
    font-weight: 900;
    text-decoration: none;
    display: inline-block; /* Ensures padding/margin work as expected for block-level content */
    padding: 0 20px; /* Added horizontal padding to prevent sticking to edges */
    /* تحسين إمكانية الوصول: زيادة حجم منطقة اللمس */
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}
/* Accessibility: Consistent focus state for logo link */
.logo:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px var(--focus-ring-color);
    border-radius: var(--radius-lg); /* Match card radius for consistency */
}

.page-footer {
    text-align: center;
    padding: 1.5rem 0;
    color: var(--text-light);
    font-size: 0.9rem;
    border-top: 1px solid var(--border-color);
    background-color: var(--bg-white);
}

/* --- 3. Main Content Layout --- */
.container {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}
main.container {
    padding-top: 2rem;
    padding-bottom: 2rem;
}

/* --- 4. Policy Card Styling --- */
.policy-card {
    background: var(--bg-white);
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    margin-bottom: 2rem;
}
.policy-card h1 {
    font-size: 2.2rem;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 0.5rem;
}
.policy-card .last-updated {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 2.5rem;
    font-style: italic;
}
.policy-card section {
    margin-bottom: 2rem;
}
.policy-card h2 {
    font-size: 1.6rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--secondary-color);
}
.policy-card p, .policy-card li {
    font-size: 1.1rem;
    color: var(--text-color);
    margin-bottom: 1rem;
}
.policy-card ul, .policy-card ol {
    padding-right: 2rem; /* Adjusted for RTL list indent */
}
.policy-card li {
    margin-bottom: 0.75rem;
}
.policy-card a {
    color: var(--secondary-color);
    font-weight: 700;
    text-decoration: none;
    transition: color 0.2s ease;
}
/* Accessibility: Consistent focus state for links */
.policy-card a:hover, .policy-card a:focus-visible {
    text-decoration: underline;
    color: #16a085;
    outline: none; /* Remove default outline when providing custom focus */
    box-shadow: 0 0 0 2px var(--focus-ring-color); /* Add a subtle focus ring */
    border-radius: 4px; /* Slight border-radius for focus ring */
}

/* --- 5. Back Button --- */
.back-to-store {
    text-align: center;
    margin-bottom: 2rem;
}
.action-btn {
    padding: 0.8rem 1.8rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-color);
    background-color: transparent;
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    /* تحسين إمكانية الوصول: زيادة حجم منطقة اللمس */
    min-width: 48px;
    min-height: 48px;
}
.action-btn:hover {
    background: var(--primary-color);
    color: #fff;
    transform: translateY(-2px);
}
/* Accessibility: Consistent focus state for buttons */
.action-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px var(--focus-ring-color);
}

/* --- 6. Responsive Adjustments --- */
@media (max-width: 768px) {
    .policy-card {
        padding: 1.5rem; /* Reduce padding on smaller screens */
    }
    .policy-card h1 {
        font-size: 1.8rem; /* Adjust heading size */
    }
    .policy-card h2 {
        font-size: 1.4rem; /* Adjust subheading size */
    }
    .policy-card p, .policy-card li {
        font-size: 1rem; /* Adjust body text size */
    }
    .policy-card ul, .policy-card ol {
        padding-right: 1.5rem; /* Reduce list indent */
    }
    .action-btn {
        width: calc(100% - 40px); /* Adjust button width for smaller screens, considering container padding */
        max-width: 300px; /* Max width for button on mobile */
        margin: 0 auto; /* Center the button */
        display: flex; /* Ensure flex for icon centering */
    }
}
