/* ══════════════════════════════════════════════════════════
   Pregnancy Hub — مركز الحمل
   تصميم نظيف متجاوب يدعم الوضعين، متناسق مع هوية الموقع
══════════════════════════════════════════════════════════ */

.preg-page { background: #faf6fc; color: #2c1830; min-height: 100vh; }
[data-theme="dark"] .preg-page { background: #0d0618; color: #e8dcf0; }

.preg-wrap {
    max-width: 1100px;
    margin: 0 auto;
    padding: 110px 18px 80px;   /* 110 تعويض الهيدر الثابت */
}

/* ── الهيرو ── */
.preg-hero { text-align: center; margin-bottom: 30px; }
.preg-hero-icon { font-size: 46px; margin-bottom: 8px; }
.preg-hero h1 {
    font-size: 2rem;
    font-weight: 900;
    margin: 0 0 8px;
    background: linear-gradient(135deg, #b05080, #7040a0);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.preg-hero p { font-size: 14px; color: #8a6a8a; max-width: 560px; margin: 0 auto; line-height: 1.7; }
[data-theme="dark"] .preg-hero p { color: #a893b8; }

/* ── التنبيهات ── */
.preg-alert {
    max-width: 560px; margin: 0 auto 22px;
    padding: 12px 18px; border-radius: 12px;
    font-size: 14px; font-weight: 700; text-align: center;
}
.preg-alert.ok { background: #f0fdf4; border: 1px solid #86efac; color: #166534; }
[data-theme="dark"] .preg-alert.ok { background: rgba(34,197,94,0.12); border-color: rgba(34,197,94,0.35); color: #86efac; }

/* ── التنبيه الطبي ── */
.preg-disclaimer {
    max-width: 760px; margin: 0 auto 26px;
    padding: 12px 18px; border-radius: 12px;
    background: #fff8ec; border: 1px solid #fcd9a0; color: #92600e;
    font-size: 13px; line-height: 1.6; text-align: center;
}
[data-theme="dark"] .preg-disclaimer { background: rgba(245,158,11,0.10); border-color: rgba(245,158,11,0.3); color: #e8c88a; }

/* ── اختيار الشهر ── */
.preg-months { margin-bottom: 26px; text-align: center; }
.preg-months-label { font-size: 13px; font-weight: 800; color: #8a6a8a; margin-bottom: 12px; text-transform: uppercase; letter-spacing: 0.05em; }
[data-theme="dark"] .preg-months-label { color: #a893b8; }
.preg-months-grid {
    display: grid;
    grid-template-columns: repeat(9, 1fr);
    gap: 8px;
    max-width: 640px; margin: 0 auto;
}
.preg-month {
    display: flex; flex-direction: column; align-items: center; gap: 2px;
    padding: 12px 4px; border-radius: 14px;
    background: #fff; border: 1.5px solid #f0d8e8;
    text-decoration: none; color: #7a5a7a;
    transition: transform .18s, border-color .18s, background .18s;
}
.preg-month:hover { transform: translateY(-2px); border-color: #d090c0; }
.preg-month.active {
    background: linear-gradient(135deg, #b05080, #7040a0);
    border-color: transparent; color: #fff;
    box-shadow: 0 6px 18px rgba(176,80,128,0.3);
}
.pm-num { font-size: 20px; font-weight: 900; line-height: 1; }
.pm-lbl { font-size: 10px; font-weight: 700; opacity: 0.75; }
[data-theme="dark"] .preg-month { background: #1a1226; border-color: rgba(180,100,220,0.2); color: #c8b0d8; }
[data-theme="dark"] .preg-month.active { background: linear-gradient(135deg, #b05080, #7040a0); color: #fff; }

/* ── لوحة الأدمن ── */
.preg-admin {
    max-width: 900px; margin: 0 auto 30px;
    background: #fff; border: 1.5px solid #f0d8e8; border-radius: 18px;
    overflow: hidden;
}
[data-theme="dark"] .preg-admin { background: #160b24; border-color: rgba(180,100,220,0.22); }
.preg-admin-toggle {
    width: 100%; text-align: start;
    padding: 16px 20px; border: none; cursor: pointer;
    background: linear-gradient(135deg, #7040a0, #b05080); color: #fff;
    font-size: 15px; font-weight: 800;
    display: flex; align-items: center; gap: 8px;
}
.preg-admin-toggle .chev { margin-inline-start: auto; transition: transform .25s; }
.preg-admin.open .preg-admin-toggle .chev { transform: rotate(180deg); }
.preg-admin-body {
    display: none;
    grid-template-columns: 1fr 1fr; gap: 18px;
    padding: 20px;
}
.preg-admin.open .preg-admin-body { display: grid; }
@media (max-width: 720px) { .preg-admin-body { grid-template-columns: 1fr; } }

.preg-form h3 { font-size: 14px; margin: 0 0 12px; color: #b05080; }
[data-theme="dark"] .preg-form h3 { color: #e39ec6; }
.preg-form input, .preg-form textarea, .preg-form select {
    width: 100%; box-sizing: border-box;
    padding: 10px 13px; margin-bottom: 10px;
    border: 1.5px solid #e8d0e0; border-radius: 10px;
    font-size: 13px; font-family: inherit;
    background: #fdf8fc; color: #2c1830;
    outline: none; transition: border-color .18s;
}
.preg-form input:focus, .preg-form textarea:focus, .preg-form select:focus { border-color: #b05080; }
.preg-form textarea { resize: vertical; min-height: 80px; }
[data-theme="dark"] .preg-form input, [data-theme="dark"] .preg-form textarea, [data-theme="dark"] .preg-form select {
    background: #0d0618; border-color: rgba(180,100,220,0.28); color: #e8dcf0;
}
.preg-form-row { display: flex; gap: 10px; }
.preg-form-row > * { flex: 1; min-width: 0; }
.preg-file-label {
    display: block; font-size: 12px; font-weight: 700; color: #8a6a8a;
    padding: 10px 13px; border: 1.5px dashed #d8b8d0; border-radius: 10px;
    cursor: pointer; margin-bottom: 10px;
}
.preg-file-label input { margin: 6px 0 0; padding: 0; border: none; background: none; }
[data-theme="dark"] .preg-file-label { color: #a893b8; border-color: rgba(180,100,220,0.3); }
.preg-btn {
    width: 100%; padding: 12px; border: none; cursor: pointer;
    border-radius: 10px; font-size: 14px; font-weight: 800; color: #fff;
    background: linear-gradient(135deg, #b05080, #7040a0);
    transition: opacity .18s, transform .18s;
}
.preg-btn:hover { opacity: 0.9; transform: translateY(-1px); }
.preg-btn.ad { background: linear-gradient(135deg, #e0872f, #c2410c); }

/* ── التخطيط: عمودان ── */
.preg-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 24px;
    align-items: start;
}
@media (max-width: 860px) { .preg-layout { grid-template-columns: 1fr; } }

.preg-sec-title {
    font-size: 17px; font-weight: 800; margin: 0 0 16px;
    color: #6a2d5e;
}
[data-theme="dark"] .preg-sec-title { color: #e39ec6; }

/* ── بطاقة المقال ── */
.preg-card {
    position: relative;
    background: #fff; border: 1.5px solid #f0d8e8; border-radius: 16px;
    padding: 20px 22px; margin-bottom: 16px;
    box-shadow: 0 3px 14px rgba(176,80,128,0.06);
}
[data-theme="dark"] .preg-card { background: #160b24; border-color: rgba(180,100,220,0.2); box-shadow: none; }
.preg-card-badge {
    display: inline-block; font-size: 11px; font-weight: 800;
    padding: 3px 12px; border-radius: 999px; margin-bottom: 10px;
    background: rgba(176,80,128,0.1); color: #b05080;
}
[data-theme="dark"] .preg-card-badge { background: rgba(200,80,140,0.18); color: #f0b0d0; }
.preg-card-title { font-size: 17px; font-weight: 800; margin: 0 0 10px; color: #2c1830; }
[data-theme="dark"] .preg-card-title { color: #ede4f5; }
.preg-card-text { font-size: 14px; line-height: 1.85; color: #4a3548; }
[data-theme="dark"] .preg-card-text { color: #cfc2dc; }
.preg-source {
    margin-top: 14px; padding-top: 12px; border-top: 1px dashed #ecd4e4;
    font-size: 12px; color: #9a7a95;
}
[data-theme="dark"] .preg-source { border-top-color: rgba(180,100,220,0.18); color: #a893b8; }
.preg-source a { color: #b05080; font-weight: 700; text-decoration: none; }
.preg-source a:hover { text-decoration: underline; }
[data-theme="dark"] .preg-source a { color: #f090c0; }

.preg-empty, .preg-ad-empty {
    padding: 40px 20px; text-align: center;
    color: #a88aa5; font-size: 14px; font-weight: 600;
    background: #fff; border: 1.5px dashed #ecd4e4; border-radius: 16px;
}
[data-theme="dark"] .preg-empty, [data-theme="dark"] .preg-ad-empty {
    background: #160b24; border-color: rgba(180,100,220,0.2); color: #8a7398;
}

/* ── بطاقة الإعلان ── */
.preg-ad {
    position: relative;
    background: #fff; border: 1.5px solid #f0d8e8; border-radius: 18px;
    padding: 18px; margin-bottom: 16px; text-align: center;
    box-shadow: 0 4px 18px rgba(176,80,128,0.08);
}
[data-theme="dark"] .preg-ad { background: #160b24; border-color: rgba(180,100,220,0.22); box-shadow: none; }
.preg-ad-tag {
    position: absolute; top: 10px; inset-inline-start: 10px;
    font-size: 9px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase;
    background: #f0e0c8; color: #92600e; padding: 2px 8px; border-radius: 6px;
}
[data-theme="dark"] .preg-ad-tag { background: rgba(245,158,11,0.18); color: #e8c88a; }
.preg-ad-img {
    width: 100%; height: 140px; border-radius: 12px; overflow: hidden;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #f9e0ec, #ecd4f0); margin-bottom: 12px;
}
[data-theme="dark"] .preg-ad-img { background: linear-gradient(135deg, #2a1438, #1c1030); }
.preg-ad-img img { width: 100%; height: 100%; object-fit: cover; }
.preg-ad-icon { font-size: 3rem; }
.preg-ad-name { font-size: 15px; font-weight: 800; margin: 0 0 6px; color: #2c1830; }
[data-theme="dark"] .preg-ad-name { color: #ede4f5; }
.preg-ad-price {
    display: inline-block; font-size: 14px; font-weight: 900; color: #c2410c;
    background: #fff3e8; padding: 3px 14px; border-radius: 999px; margin-bottom: 12px;
}
[data-theme="dark"] .preg-ad-price { background: rgba(194,65,12,0.15); color: #f0a060; }
.preg-ad-btn {
    display: block; padding: 11px; border-radius: 10px;
    background: linear-gradient(135deg, #b05080, #7040a0); color: #fff;
    font-size: 14px; font-weight: 800; text-decoration: none;
    transition: opacity .18s, transform .18s;
}
.preg-ad-btn:hover { opacity: 0.9; transform: translateY(-1px); }

/* ── أزرار الحذف (أدمن) ── */
.preg-del-form { margin-top: 12px; }
.preg-del {
    border: none; cursor: pointer; background: transparent;
    color: #c0506a; font-size: 12px; font-weight: 700; padding: 4px 8px; border-radius: 8px;
}
.preg-del:hover { background: rgba(220,60,80,0.1); }
.preg-del.small { position: absolute; top: 8px; inset-inline-end: 8px; margin: 0; }

/* ── جوال ── */
@media (max-width: 560px) {
    .preg-wrap { padding: 96px 12px 60px; }
    .preg-hero h1 { font-size: 1.6rem; }
    .preg-months-grid { grid-template-columns: repeat(5, 1fr); }
    .pm-num { font-size: 17px; }
    .preg-card { padding: 16px; }
}
