/* ============================================
   Mezan (ميزان) — Shared Styles
   Font: Readex Pro | Direction: RTL
   ============================================ */

/* CSS Variables */
:root {
    --font-primary: 'Readex Pro', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    --color-bg: #f8f9fa;
    --color-white: #ffffff;
    --color-text: #333333;
    --color-secondary: #666666;
    --color-border: #eeeeee;
    --color-button: #333333;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.08);
}

/* Reset */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Base */
html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.7;
    font-family: var(--font-primary);
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
}

/* Containers */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.container-narrow {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ============================================
   Navigation
   ============================================ */
.site-nav {
    background: var(--color-white);
    padding: 1rem 2rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.site-nav .logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text);
    font-family: var(--font-primary);
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    color: var(--color-secondary);
    font-family: var(--font-primary);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--color-text);
}

.nav-links a.active {
    color: var(--color-text);
    font-weight: 600;
}

/* Mobile menu button */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    color: var(--color-text);
}

.menu-toggle svg {
    width: 24px;
    height: 24px;
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        right: 0;
        left: 0;
        background: var(--color-white);
        flex-direction: column;
        padding: 1rem 2rem 1.5rem;
        gap: 1rem;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }

    .nav-links.open {
        display: flex;
    }

    .nav-links a {
        font-size: 1rem;
        padding: 0.5rem 0;
    }
}

/* ============================================
   Buttons
   ============================================ */
.store-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    background: var(--color-button);
    color: white;
    border-radius: var(--radius-sm);
    font-size: 1.1rem;
    font-family: var(--font-primary);
    font-weight: 500;
    transition: transform 0.2s, box-shadow 0.2s;
    border: none;
    cursor: pointer;
}

.store-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.store-button svg {
    width: 20px;
    height: 20px;
}

/* Official store badges */
.store-badges {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}

.store-badges.centered {
    justify-content: center;
}

.store-badge {
    display: inline-block;
    transition: transform 0.2s;
}

.store-badge:hover {
    transform: translateY(-2px);
}

.store-badge img {
    height: 28px !important;
    max-height: 28px !important;
    width: auto;
    object-fit: contain;
}

/* ============================================
   Cards
   ============================================ */
.card {
    background: var(--color-white);
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

/* ============================================
   Section Utilities
   ============================================ */
.section {
    padding: 5rem 0;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 1rem;
    font-family: var(--font-primary);
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--color-secondary);
    text-align: center;
    margin-bottom: 3rem;
    font-family: var(--font-primary);
    font-weight: 400;
}

/* ============================================
   Footer
   ============================================ */
.site-footer {
    background: var(--color-white);
    padding: 3rem 2rem;
    box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.03);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
}

.footer-brand .logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text);
    display: block;
    margin-bottom: 0.75rem;
}

.footer-brand p {
    color: var(--color-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
}

.footer-links h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--color-text);
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: var(--color-secondary);
    font-size: 0.9rem;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--color-text);
}

.footer-social {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.footer-social a {
    color: var(--color-secondary);
    padding: 0.75rem;
    background: var(--color-bg);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.footer-social a:hover {
    color: var(--color-text);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.footer-social svg {
    width: 20px;
    height: 20px;
}

.footer-bottom {
    max-width: 1200px;
    margin: 2rem auto 0;
    padding-top: 2rem;
    border-top: 1px solid var(--color-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--color-secondary);
}

@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    .footer-social {
        justify-content: center;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
}

/* ============================================
   Blog Card
   ============================================ */
.blog-card {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.blog-card-body {
    padding: 1.5rem;
}

.blog-card-category {
    display: inline-block;
    background: var(--color-bg);
    color: var(--color-secondary);
    font-size: 0.8rem;
    font-weight: 500;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    margin-bottom: 0.75rem;
}

.blog-card-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.blog-card-title a {
    color: var(--color-text);
    transition: color 0.3s;
}

.blog-card-title a:hover {
    color: var(--color-secondary);
}

.blog-card-excerpt {
    color: var(--color-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.blog-card-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
    color: var(--color-secondary);
}

/* ============================================
   CTA Banner
   ============================================ */
.cta-banner {
    background: var(--color-button);
    color: white;
    padding: 4rem 2rem;
    text-align: center;
}

.cta-banner h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.cta-banner p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

.cta-banner .store-button {
    background: white;
    color: var(--color-button);
}

.cta-banner .store-button:hover {
    box-shadow: 0 6px 20px rgba(255, 255, 255, 0.3);
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ============================================
   Breadcrumb
   ============================================ */
.breadcrumb {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    font-size: 0.85rem;
    color: var(--color-secondary);
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.breadcrumb a {
    color: var(--color-secondary);
    transition: color 0.3s;
}

.breadcrumb a:hover {
    color: var(--color-text);
}

.breadcrumb span {
    color: var(--color-text);
    font-weight: 500;
}

/* ============================================
   Article / Blog Post
   ============================================ */
.article-header {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--color-border);
}

.article-header h1 {
    font-size: 2.2rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 1rem;
}

.article-meta {
    display: flex;
    gap: 1.5rem;
    font-size: 0.9rem;
    color: var(--color-secondary);
    flex-wrap: wrap;
}

.article-content {
    font-size: 1.05rem;
    line-height: 1.9;
}

.article-content h2 {
    font-size: 1.6rem;
    font-weight: 700;
    margin: 2.5rem 0 1rem;
}

.article-content h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin: 2rem 0 0.75rem;
}

.article-content p {
    margin-bottom: 1.25rem;
    color: #444;
}

.article-content ul,
.article-content ol {
    margin-bottom: 1.25rem;
    padding-right: 1.5rem;
}

.article-content li {
    margin-bottom: 0.5rem;
    line-height: 1.8;
}

.article-content strong {
    font-weight: 600;
    color: var(--color-text);
}

/* Related Posts */
.related-posts {
    margin-top: 3rem;
    padding-top: 3rem;
    border-top: 1px solid var(--color-border);
}

.related-posts h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}
