/*
Theme Name: Al Web RTL
Theme URI: https://example.com/
Author: Custom WordPress conversion
Description: Arabic RTL WordPress theme rebuilt from the supplied Blogger layout.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: alweb-wp-theme
*/

:root {
  --body-bg: #f5f7fb;
  --surface: #fff;
  --surface-soft: #f8fafc;
  --text: #1e293b;
  --muted: #64748b;
  --line: #e7ebf2;
  --primary: #2463eb;
  --primary-dark: #1646b4;
  --header-bg: #fff;
  --footer-bg: #111827;
  --footer-text: #cbd5e1;
  --radius: 16px;
  --shadow: 0 10px 35px rgba(15, 23, 42, .07);
  --container: 1180px;
  --font: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Tahoma, Arial, sans-serif;
}

[data-theme="dark"] {
  --body-bg: #0f172a;
  --surface: #172033;
  --surface-soft: #1e293b;
  --text: #e5edf8;
  --muted: #a9b7ca;
  --line: #2c3a52;
  --primary: #76a4ff;
  --primary-dark: #a8c4ff;
  --header-bg: #111a2b;
  --footer-bg: #080d18;
  --footer-text: #b6c2d4;
  --shadow: 0 12px 36px rgba(0, 0, 0, .2);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--body-bg); color: var(--text); font-family: var(--font); line-height: 1.8; }
body, button, input, textarea, select { font-size: 16px; }
img { max-width: 100%; height: auto; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.container { width: min(calc(100% - 32px), var(--container)); margin-inline: auto; }

.mainH { position: sticky; top: 0; z-index: 20; background: var(--header-bg); border-bottom: 1px solid var(--line); }
.headC { min-height: 76px; display: flex; align-items: center; gap: 24px; }
.headL, .headR { display: flex; align-items: center; }
.headL { gap: 15px; margin-inline-end: auto; }
.headR { gap: 12px; }
.headH { margin: 0; font-size: clamp(20px, 2vw, 27px); line-height: 1.2; font-weight: 800; }
.headT { color: var(--text); }
.headDsc { color: var(--muted); font-size: 12px; }
.tIc, .icon-button { display: inline-grid; place-items: center; width: 42px; height: 42px; border: 0; border-radius: 50%; background: transparent; color: var(--text); }
.tIc:hover, .icon-button:hover { background: var(--surface-soft); color: var(--primary); }
.tNav { display: none; }
.icon { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.srchF { display: flex; align-items: center; width: min(32vw, 310px); height: 42px; padding: 0 12px; background: var(--surface-soft); border: 1px solid var(--line); border-radius: 999px; }
.srchF .i { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; color: var(--text); }
.srchF .b { border: 0; background: transparent; color: var(--muted); display: grid; place-items: center; }
.headIc { display: flex; align-items: center; gap: 2px; list-style: none; padding: 0; margin: 0; }

.mainN { background: var(--surface); border-bottom: 1px solid var(--line); }
.mainL { width: min(calc(100% - 32px), var(--container)); margin-inline: auto; }
.mnBr { overflow-x: auto; }
.mnMn { display: flex; align-items: center; gap: 4px; list-style: none; padding: 0; margin: 0; white-space: nowrap; }
.mnMn li { margin: 0; }
.mnMn a { display: block; padding: 13px 16px; color: var(--muted); font-size: 14px; font-weight: 650; border-radius: 10px; }
.mnMn a:hover, .mnMn .current-menu-item > a, .mnMn .current_page_item > a { color: var(--primary); background: color-mix(in srgb, var(--primary) 10%, transparent); }

.mainM { padding: 28px 0 52px; }
.secIn { width: min(calc(100% - 32px), var(--container)); margin-inline: auto; }
.content-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; align-items: start; }
.mainA { margin-bottom: 26px; }
.mainA .ad-placeholder, .ad-placeholder { min-height: 90px; display: grid; place-items: center; padding: 16px; color: var(--muted); background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); font-size: 13px; }
.blogP { display: grid; gap: 18px; }
.itm, .post-card, .widget, .no-results { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.itm { display: grid; grid-template-columns: 230px minmax(0,1fr); overflow: hidden; }
.iThmb { min-height: 190px; background: var(--surface-soft); }
.iThmb a, .thmb { display: block; width: 100%; height: 100%; }
.iThmb img { width: 100%; height: 100%; min-height: 190px; object-fit: cover; }
.iInr { padding: 22px 24px; }
.iTtl, .pTtl { margin: 0 0 8px; line-height: 1.35; }
.iTtl { font-size: 21px; }
.iTtl a, .pTtl a { color: var(--text); }
.iTtl a:hover, .pTtl a:hover { color: var(--primary); }
.pSnpt { margin: 8px 0 0; color: var(--muted); font-size: 14px; }
.byline { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 14px; color: var(--muted); font-size: 12px; }
.byline a { color: var(--muted); }
.byline a:hover { color: var(--primary); }
.post-card { padding: clamp(22px, 4vw, 44px); }
.post-header { margin-bottom: 22px; }
.post-card .pTtl { font-size: clamp(27px, 4vw, 42px); }
.post-content { font-size: 18px; line-height: 2; }
.post-content > *:first-child { margin-top: 0; }
.post-content h2, .post-content h3, .post-content h4 { line-height: 1.4; }
.post-content blockquote { margin-inline: 0; padding: 12px 20px; border-inline-start: 4px solid var(--primary); background: var(--surface-soft); border-radius: 8px; }
.post-content pre { overflow-x: auto; padding: 18px; color: #e5edf8; background: #101827; border-radius: 10px; direction: ltr; text-align: left; }
.post-content code { padding: 2px 5px; background: var(--surface-soft); border-radius: 5px; }
.post-content pre code { padding: 0; background: transparent; }
.post-content table { width: 100%; border-collapse: collapse; }
.post-content th, .post-content td { padding: 10px; border: 1px solid var(--line); }
.post-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); }
.tag { padding: 4px 11px; color: var(--primary); background: color-mix(in srgb, var(--primary) 10%, transparent); border-radius: 999px; font-size: 12px; }

.sidebar { display: grid; gap: 18px; }
.widget { padding: 20px; }
.widget-title { position: relative; margin: 0 0 16px; padding-bottom: 10px; font-size: 18px; }
.widget-title::after { content: ""; position: absolute; inset-inline-start: 0; bottom: 0; width: 42px; height: 3px; background: var(--primary); border-radius: 8px; }
.widget ul { list-style: none; padding: 0; margin: 0; }
.widget li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.widget li:last-child { border-bottom: 0; }
.widget li a { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); }
.widget li a:hover { color: var(--primary); }
.widget input, .widget select, .widget textarea { width: 100%; padding: 10px 12px; color: var(--text); background: var(--surface-soft); border: 1px solid var(--line); border-radius: 8px; }
.widget .search-form { display: flex; gap: 7px; }
.widget .search-form label { flex: 1; }
.widget .search-submit, .button, .wp-block-button__link { display: inline-block; padding: 9px 16px; color: #fff; background: var(--primary); border: 0; border-radius: 8px; font-weight: 700; }
.button:hover, .search-submit:hover { color: #fff; background: var(--primary-dark); }

.pagination { display: flex; justify-content: center; gap: 7px; margin-top: 28px; }
.pagination .page-numbers { display: inline-grid; place-items: center; min-width: 38px; height: 38px; padding: 0 10px; color: var(--muted); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
.pagination .current, .pagination .page-numbers:hover { color: #fff; background: var(--primary); border-color: var(--primary); }
.page-title { margin: 0 0 22px; font-size: clamp(24px, 3vw, 36px); }
.no-results { padding: 35px; text-align: center; }

.mainF { padding: 48px 0 18px; color: var(--footer-text); background: var(--footer-bg); }
.fotN { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 34px; }
.fotW { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
.mainF .widget { padding: 0; color: var(--footer-text); background: transparent; border: 0; box-shadow: none; }
.mainF .widget-title { color: #fff; }
.mainF .widget li { border-color: rgba(255,255,255,.1); }
.mainF .widget li a { color: var(--footer-text); }
.mainF .widget li a:hover { color: #fff; }
.abtT h2 { margin: 0 0 8px; color: #fff; }
.abtD { margin: 0; color: var(--footer-text); font-size: 14px; }
.fotS { display: flex; flex-wrap: wrap; gap: 8px; margin: 17px 0 0; }
.fotS a { display: inline-grid; place-items: center; width: 35px; height: 35px; color: #fff; background: rgba(255,255,255,.1); border-radius: 50%; font-size: 12px; }
.fotS a:hover { background: var(--primary); }
.fotB { margin-top: 38px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.1); text-align: center; font-size: 13px; }

.comments-area { margin-top: 28px; padding: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.comment-list { padding: 0; list-style: none; }
.comment-list .comment { padding: 16px 0; border-bottom: 1px solid var(--line); }
.comment-meta, .comment-metadata { color: var(--muted); font-size: 13px; }
.comment-content { font-size: 15px; }
.comment-form input, .comment-form textarea { width: 100%; padding: 10px; color: var(--text); background: var(--surface-soft); border: 1px solid var(--line); border-radius: 8px; }
.comment-form .submit { padding: 10px 18px; color: #fff; background: var(--primary); border: 0; border-radius: 8px; }

@media (max-width: 900px) {
  .content-grid { grid-template-columns: minmax(0, 1fr); }
  .sidebar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fotN { grid-template-columns: 1fr 1fr; }
  .fotN > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 680px) {
  .headC { min-height: 64px; gap: 8px; }
  .tNav { display: inline-grid; }
  .headR .srchF { display: none; }
  .mainN { display: none; }
  .itm { grid-template-columns: 1fr; }
  .iThmb, .iThmb img { min-height: 190px; max-height: 240px; }
  .iInr { padding: 18px; }
  .sidebar, .fotN, .fotW { grid-template-columns: 1fr; }
  .fotN > :first-child { grid-column: auto; }
  .mainM { padding-top: 20px; }
  .post-card { padding: 22px 18px; }
  .post-content { font-size: 16px; }
}
