/* تنسيقات مشتركة لصفحتي المدونة ولوحة الأدمن (بنفس هوية الموقع) */
:root {
    --primary-blue: #0c3893;
    --secondary-blue: #1b5edb;
    --accent-yellow: #ffb703;
    --logo-orange: #fb8500;
    --gradient-sun: linear-gradient(135deg, #ffb703 0%, #fb8500 100%);
    --gradient-blue: linear-gradient(135deg, #0c3893 0%, #1b5edb 100%);
    --dark-bg: #071c4d;
    --light-bg: #f8f9fa;
    --text-color: #333333;
    --white: #ffffff;
    --danger: #e53935;
    --success: #2e7d32;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Cairo', sans-serif;
}

body {
    background-color: var(--light-bg);
    color: var(--text-color);
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

[hidden] {
    display: none !important;
}

/* --- Header --- */
.page-header {
    background: var(--white);
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.06);
    position: sticky;
    top: 0;
    z-index: 100;
}

.page-header-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 30px;
    gap: 15px;
}

.page-header img {
    height: 90px;
    width: auto;
    display: block;
}

.header-links {
    display: flex;
    gap: 20px;
    align-items: center;
}

.header-links a, .link-btn {
    color: var(--logo-orange);
    text-decoration: none;
    font-weight: 800;
    font-size: 17px;
    background: none;
    border: none;
    cursor: pointer;
}

.header-links a:hover, .link-btn:hover {
    color: var(--primary-blue);
}

/* --- Banner --- */
.page-banner {
    background: linear-gradient(rgba(7, 28, 77, 0.85), rgba(12, 56, 147, 0.88)), url('https://images.unsplash.com/photo-1508514177221-188b1cf16e9d?auto=format&fit=crop&w=1600&q=80') no-repeat center / cover;
    color: var(--white);
    text-align: center;
    padding: 80px 20px;
}

.page-banner h1 {
    font-size: 40px;
    font-weight: 900;
    margin-bottom: 10px;
}

.page-banner p {
    font-size: 18px;
    color: #e2e8f0;
}

.page-section {
    padding: 70px 20px;
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--gradient-sun);
    color: var(--dark-bg);
    padding: 12px 30px;
    font-size: 17px;
    font-weight: 700;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    box-shadow: 0 5px 15px rgba(255, 183, 3, 0.35);
    transition: transform 0.3s, box-shadow 0.3s, opacity 0.3s;
}

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

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-blue {
    background: var(--gradient-blue);
    color: var(--white);
    box-shadow: 0 5px 15px rgba(12, 56, 147, 0.25);
}

.btn-outline {
    background: transparent;
    color: var(--primary-blue);
    border: 2px solid var(--primary-blue);
    box-shadow: none;
}

.btn-danger {
    background: var(--danger);
    color: var(--white);
    box-shadow: none;
}

.btn-sm {
    padding: 7px 16px;
    font-size: 14px;
}

/* --- Single article --- */
.article {
    max-width: 850px;
    margin: 0 auto;
    background: var(--white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 35px rgba(12, 56, 147, 0.08);
}

.article-cover {
    width: 100%;
    max-height: 450px;
    object-fit: cover;
    display: block;
}

.article-body {
    padding: 40px 45px 50px;
}

.article-meta {
    color: #8a94a6;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 10px;
}

.article-body h1 {
    color: var(--primary-blue);
    font-size: 34px;
    font-weight: 900;
    line-height: 1.5;
    margin-bottom: 25px;
}

.article-content {
    font-size: 18px;
    line-height: 2.1;
    color: #333;
    overflow-wrap: anywhere;
}

.article-content h2, .article-content h3, .article-content h4 {
    color: var(--primary-blue);
    margin: 30px 0 12px;
    line-height: 1.5;
}

.article-content p, .article-content ul, .article-content ol, .article-content blockquote, .article-content pre, .article-content table {
    margin-bottom: 18px;
}

.article-content ul, .article-content ol {
    padding-right: 25px;
}

.article-content a {
    color: var(--secondary-blue);
}

.article-content img {
    max-width: 100%;
    border-radius: 12px;
    margin: 10px 0;
}

.article-content blockquote {
    border-right: 4px solid var(--accent-yellow);
    background: #fff8e6;
    padding: 12px 20px;
    border-radius: 8px;
}

.article-content code {
    background: #f0f4ff;
    padding: 2px 6px;
    border-radius: 4px;
    direction: ltr;
}

.article-content pre {
    background: #071c4d;
    color: #fff;
    padding: 16px;
    border-radius: 10px;
    overflow-x: auto;
    direction: ltr;
    text-align: left;
}

.article-content pre code {
    background: none;
    padding: 0;
}

.article-content table {
    width: 100%;
    border-collapse: collapse;
    display: block;
    overflow-x: auto;
}

.article-content th, .article-content td {
    border: 1px solid #e2e8f0;
    padding: 8px 12px;
}

.article-content th {
    background: #f0f4ff;
}

.article-actions {
    margin-top: 40px;
    padding-top: 25px;
    border-top: 2px solid #f0f4ff;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: space-between;
}

.whatsapp-cta {
    background: #25d366;
    color: var(--white);
    box-shadow: 0 5px 15px rgba(37, 211, 102, 0.3);
}

.loading {
    text-align: center;
    padding: 60px 0;
    color: #8a94a6;
    font-size: 18px;
}

/* --- Footer --- */
.page-footer {
    background: #04102c;
    color: #888;
    text-align: center;
    padding: 25px 20px;
}

.page-footer span {
    color: var(--accent-yellow);
}

@media (max-width: 768px) {
    .page-header-inner {
        padding: 0 16px;
    }
    .page-header img {
        height: 65px;
    }
    .header-links {
        gap: 12px;
    }
    .header-links a, .link-btn {
        font-size: 15px;
    }
    .page-banner h1 {
        font-size: 30px;
    }
    .article-body {
        padding: 25px 20px 35px;
    }
    .article-body h1 {
        font-size: 26px;
    }
}
