/* ================================================
   ZedCoder Blog — Light Mode + RTL Arabic
   Primary: #6c3bff (purple) | Accent: #d3ff2e (lime)
   ================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;500;600;700;800;900&family=Tajawal:wght@300;400;500;700;800&display=swap');

/* ── Variables ──────────────────────────────────── */
:root {
  --primary:    #6cd339;
  --primary-dim:#6cd339;
  --lime:       #6c3bff;
  --lime-bg:    rgba(108,59,255,.08);
  --lime-border:rgba(108,59,255,.2);
  --bg:         #f5f6fa;
  --bg-2:       #ffffff;
  --bg-3:       #f0f2f8;
  --bg-4:       #e8eaf4;
  --border:     rgba(0,0,0,.07);
  --border-2:   rgba(0,0,0,.1);
  --text:       #1a1d2e;
  --text-2:     #3d4166;
  --muted:      #8b91b0;
  --white:      #ffffff;
  --danger:     #e53e3e;
  --success:    #22c55e;
  --radius:     12px;
  --radius-lg:  20px;
  --shadow-sm:  0 2px 12px rgba(108,59,255,.08);
  --shadow:     0 8px 32px rgba(108,59,255,.12);
  --shadow-lg:  0 20px 60px rgba(108,59,255,.16);
  --trans:      .25s cubic-bezier(.4,0,.2,1);
  --font-head:  'Cairo', sans-serif;
  --font-body:  'Tajawal', sans-serif;
}

/* ── Reset ──────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  direction: rtl;
  text-align: right;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

/* ── Scrollbar ──────────────────────────────────── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg-3); }
::-webkit-scrollbar-thumb { background: var(--bg-4); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* ── Selection ──────────────────────────────────── */
::selection { background: var(--primary); color: #fff; }

/* ── Navbar ─────────────────────────────────────── */
@media(max-width:767px){
    .heading-area .sec-title{
        font-size: 35px;
    }
    .navbar .logo{
    width: 50px;
}
}
@media(max-width:991px){
    .heading-area .sec-title{
        font-size: 35px;
    }
}
/* start navbar  */
/* General navbar styling */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #fff;
    padding: 10px 20px;
    position: absolute; 
    z-index: 11;
    width: 100%;
    background: transparent;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1), background-color 0.3s ease, box-shadow 0.3s ease, opacity 0.6s ease; 
    opacity: 1;
}

.navbar.fixed {
    position: fixed; 
    top: 0;
    background: #0a0e1a; 
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); 
    opacity: 1;
}

.navbar.hide {
    transform: translateY(-100%); 
    opacity: 0; 
}
.navbar .logo {
    font-size: 1.5em;
    font-weight: bold;
}

.navbar .nav-links {
    list-style: none;
    display: flex;
    gap: 20px;
}

.navbar .nav-links li a {
    text-decoration: none;
    color: #0a0e19;
    transition: color 0.3s ease;
    font-size: 20px;
}

.navbar .nav-links li a:hover {
    color: #f39c12;
}

/* Hamburger icon styling */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.hamburger span {
    display: block;
    height: 3px;
    width: 25px;
    background: #fff;
    border-radius: 2px;
}

/* Side navbar (hidden by default) */
.side-navbar {
    position: fixed;
    top: 0;
    left: -250px;
    width: 250px;
    height: 100%;
    background: #0a0e1a;
    color: #fff;
    transition: left 0.3s ease;
    z-index: 1000;
    padding-top: 60px;
}
.side-navbar .close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 24px;
    background: none;
    color: #fff;
    border: none;
    cursor: pointer;
}

.side-navbar ul {
    list-style: none;
    padding: 0;
}

.side-navbar ul li {
    margin: 20px 0;
    text-align: center;
}

.side-navbar ul li a {
    text-decoration: none;
    color: #fff;
    font-size: 1.2em;
    transition: color 0.3s ease;
}

.side-navbar ul li a:hover {
    color: #f39c12;
}

/* Responsive styling */
@media (max-width: 992px) {
    .navbar .nav-links {
        display: none;
    }

    .hamburger {
        display: flex;
    }
}

/* Show the side navbar when active */
.side-navbar.active {
    left: 0;
}

/* ── Hero Banner ─────────────────────────────────── */
.page-hero {
  background: linear-gradient(135deg, #eee8ff 0%, #f5f6fa 60%);
  border-bottom: 1px solid var(--border);
  padding: 5rem 0 4rem;
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute;
  top: -40%; left: -5%;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(108,59,255,.07) 0%, transparent 70%);
  pointer-events: none;
}
.page-hero::after {
  content: '';
  position: absolute;
  bottom: -30%; right: -5%;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(108,59,255,.05) 0%, transparent 70%);
  pointer-events: none;
}
.page-hero-title {
  font-family: var(--font-head);
  font-size: clamp(2.2rem, 5vw, 3.75rem);
  font-weight: 900;
  letter-spacing: -.02em;
  color: var(--text);
  line-height: 1.2;
}
.breadcrumb-zed {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .875rem;
  color: var(--muted);
  margin-top: .75rem;
  flex-direction: row-reverse;
  justify-content: flex-end;
}
.breadcrumb-zed a { color: var(--muted); transition: color var(--trans); }
.breadcrumb-zed a:hover { color: var(--primary); }
.breadcrumb-zed .sep { color: var(--bg-4); transform: scaleX(-1); display: inline-block; }
.breadcrumb-zed .current { color: var(--primary); font-weight: 600; }

/* ── Blog Grid ──────────────────────────────────── */
.blog-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

/* ── Post Card ──────────────────────────────────── */
.post-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform var(--trans), box-shadow var(--trans), border-color var(--trans);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
}
.post-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(108,59,255,.2);
}

.post-card-img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  transition: transform .4s ease;
}
.post-card:hover .post-card-img { transform: scale(1.04); }
.post-card-img-wrap { overflow: hidden; position: relative; }

.post-card-body { padding: 1.5rem; flex: 1; display: flex; flex-direction: column; }
.post-card-meta { display: flex; align-items: center; gap: .75rem; margin-bottom: .875rem; }

.badge-cat {
  display: inline-block;
  padding: .25rem .875rem;
  background: var(--lime-bg);
  color: var(--primary);
  border-radius: 100px;
  font-size: .73rem;
  font-weight: 700;
  letter-spacing: .03em;
  transition: background var(--trans);
}
.post-card:hover .badge-cat { background: rgba(108,59,255,.14); }

.post-date { font-size: .8rem; color: var(--muted); }

.post-card-title {
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.45;
  margin-bottom: .75rem;
  transition: color var(--trans);
}
.post-card:hover .post-card-title { color: var(--primary); }

.post-card-excerpt {
  font-size: .88rem;
  color: var(--muted);
  line-height: 1.7;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.read-more {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  margin-top: 1.25rem;
  font-size: .85rem;
  font-weight: 700;
  color: var(--primary);
  transition: gap var(--trans);
  flex-direction: row-reverse;
}
.read-more:hover { gap: .8rem; }
.read-more svg { transition: transform var(--trans); }
.read-more:hover svg { transform: translateX(-3px); }

/* ── Sidebar ────────────────────────────────────── */
.sidebar { display: flex; flex-direction: column; gap: 1.5rem; }

.sidebar-widget {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.widget-title {
  font-family: var(--font-head);
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 1.25rem;
  padding-bottom: .75rem;
  border-bottom: 2px solid var(--bg-3);
  position: relative;
}
.widget-title::after {
  content: '';
  position: absolute;
  bottom: -2px; right: 0;
  width: 40px; height: 2px;
  background: var(--primary);
}

/* Search */
.search-form { display: flex; gap: .5rem; flex-direction: row-reverse; }
.search-input {
  flex: 1;
  background: var(--bg-3);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: .65rem 1rem;
  color: var(--text);
  font-family: var(--font-body);
  font-size: .875rem;
  transition: border-color var(--trans), box-shadow var(--trans);
  outline: none;
  direction: rtl;
  text-align: right;
}
.search-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(108,59,255,.1);
}
.search-input::placeholder { color: var(--muted); }
.search-btn {
  width: 44px; height: 44px;
  background: var(--primary);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  display: grid; place-items: center;
  transition: all var(--trans);
  flex-shrink: 0;
}
.search-btn:hover { background: var(--primary-dim); transform: scale(1.06); }
.search-btn svg { color: #fff; }

/* Categories */
.cat-list { list-style: none; display: flex; flex-direction: column; gap: .4rem; }
.cat-list li a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .55rem .875rem;
  border-radius: var(--radius);
  color: var(--text-2);
  font-size: .875rem;
  font-weight: 500;
  transition: all var(--trans);
}
.cat-list li a:hover {
  background: var(--lime-bg);
  color: var(--primary);
  padding-right: 1.125rem;
}
.cat-list li a.text-lime { color: var(--primary); font-weight: 700; background: var(--lime-bg); }

/* Recent posts */
.recent-post {
  display: flex;
  gap: .875rem;
  align-items: flex-start;
  padding: .875rem 0;
  border-bottom: 1px solid var(--border);
  transition: all var(--trans);
  flex-direction: row-reverse;
}
.recent-post:last-child { border-bottom: none; padding-bottom: 0; }
.recent-post:hover { padding-right: .4rem; }
.recent-post-img {
  width: 66px; height: 54px;
  object-fit: cover;
  border-radius: 10px;
  flex-shrink: 0;
  transition: transform var(--trans);
  border: 1px solid var(--border);
}
.recent-post:hover .recent-post-img { transform: scale(1.05); }
.recent-post-date { font-size: .73rem; color: var(--muted); margin-bottom: .25rem; }
.recent-post-title {
  font-family: var(--font-head);
  font-size: .85rem;
  font-weight: 700;
  color: var(--text-2);
  line-height: 1.45;
  transition: color var(--trans);
}
.recent-post:hover .recent-post-title { color: var(--primary); }

/* Tags */
.tags-cloud { display: flex; flex-wrap: wrap; gap: .5rem; }
.tag-pill {
  padding: .3rem .875rem;
  background: var(--bg-3);
  border: 1.5px solid var(--border);
  border-radius: 100px;
  font-size: .78rem;
  color: var(--text-2);
  font-weight: 500;
  transition: all var(--trans);
  cursor: pointer;
}
.tag-pill:hover, .tag-pill.active {
  background: var(--lime-bg);
  border-color: var(--lime-border);
  color: var(--primary);
  font-weight: 700;
}

/* ── Pagination ─────────────────────────────────── */
.pagination { display: flex; gap: .5rem; align-items: center; margin-top: 2.5rem; flex-direction: row-reverse; justify-content: flex-end; }
.page-btn {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 9px;
  font-size: .875rem;
  font-weight: 700;
  transition: all var(--trans);
  border: 1.5px solid var(--border);
  color: var(--muted);
  background: var(--bg-2);
  cursor: pointer;
  text-decoration: none;
}
.page-btn:hover, .page-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 4px 14px rgba(108,59,255,.3);
}

/* ── Single Post ─────────────────────────────────── */
.post-hero-img {
  width: 100%;
  max-height: 520px;
  object-fit: contain;
  border-radius: var(--radius-lg);
  margin-bottom: 2rem;
  box-shadow: var(--shadow);
}

.post-title {
  font-family: var(--font-head);
  font-size: clamp(1.6rem, 3.5vw, 2.5rem);
  font-weight: 900;
  letter-spacing: -.02em;
  line-height: 1.25;
  color: var(--text);
  margin-bottom: 1.5rem;
}

.post-meta-bar {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1rem 0;
  border-top: 1.5px solid var(--border);
  border-bottom: 1.5px solid var(--border);
  margin-bottom: 2rem;
  font-size: .875rem;
  color: var(--muted);
  flex-wrap: wrap;
  flex-direction: row-reverse;
  justify-content: flex-end;
}
.post-meta-item { display: flex; align-items: center; gap: .4rem; flex-direction: row-reverse; }
.post-meta-item svg { color: var(--primary); }

/* Post content */
.post-content {
  color: var(--text-2);
  font-size: 1.05rem;
  line-height: 1.9;
}
.post-content h1, .post-content h2, .post-content h3, .post-content h4 {
  font-family: var(--font-head);
  color: var(--text);
  margin: 2rem 0 1rem;
  line-height: 1.3;
  font-weight: 800;
}
.post-content h2 { font-size: 1.5rem; }
.post-content h3 { font-size: 1.25rem; }
.post-content p { margin-bottom: 1.35rem; }
.post-content a { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }
.post-content ul, .post-content ol { margin: 1rem 0 1.25rem 0; padding-right: 1.5rem; }
.post-content li { margin-bottom: .5rem; }
.post-content blockquote {
  background: var(--lime-bg);
  border-right: 4px solid var(--primary);
  border-left: none;
  border-radius: var(--radius) 0 0 var(--radius);
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
  font-size: 1.1rem;
  font-style: normal;
  font-weight: 600;
  color: var(--primary);
}
.post-content img { border-radius: var(--radius); margin: 1.5rem 0; box-shadow: var(--shadow); }
.post-content pre {
  background: var(--bg-3);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  overflow-x: auto;
  font-size: .875rem;
  margin: 1.5rem 0;
  direction: ltr;
  text-align: left;
}
.post-content code {
  background: var(--lime-bg);
  color: var(--primary);
  padding: .15rem .45rem;
  border-radius: 4px;
  font-size: .875em;
}

/* Post tags */
.post-tags-row {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1.5px solid var(--border);
  flex-wrap: wrap;
  flex-direction: row-reverse;
  justify-content: flex-end;
}
.post-tags-label { font-size: .875rem; color: var(--muted); font-weight: 600; }

/* Reactions */
.post-reactions {
  display: flex;
  gap: 1rem;
  margin-right: auto;
  margin-left: 0;
}
.reaction-btn {
  display: flex;
  align-items: center;
  gap: .4rem;
  padding: .4rem .875rem;
  border: 1.5px solid var(--border);
  border-radius: 100px;
  background: var(--bg-3);
  color: var(--muted);
  font-size: .85rem;
  cursor: pointer;
  transition: all var(--trans);
  font-family: var(--font-body);
}
.reaction-btn:hover, .reaction-btn.active {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--lime-bg);
}

/* ── Footer ─────────────────────────────────────── */
.footer {
    background-color: #0a0e1a;
    padding: 50px 0;
}
.footer{
    background-image: url('../imgs/featurebackground.png');
}
.footer a {
    color: #fff;
    text-decoration: none;
    transition: all .3s ease-in-out;
}
.footer a:hover {
    text-decoration: underline;
    color: var(--primary-color);
}
.footer-title {
    font-size: 60px;
    text-transform: uppercase;
    margin-bottom: 30px;
    color: white;
    text-align: center;
}
.footer-title span {
    display: inline-block;
    transform: scale(1);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.footer h4{
    color: white;
}
.footer ul li{
    margin-bottom: 10PX;
}
.footer ul li a{
    color: #b1b4ba;
}
.footer-section {
    margin-bottom: 20px;
}
.copyrights{
    background-color: #0a0e1a;
    padding-block: 10px;
    color: white;
}

/* ── No image placeholder ─────────────────────────── */
.img-placeholder {
  width: 100%;
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, var(--bg-3), var(--bg-4));
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Alerts ──────────────────────────────────────── */
.alert-zed {
  padding: .875rem 1.25rem;
  border-radius: var(--radius);
  margin-bottom: 1.25rem;
  font-size: .9rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: .75rem;
  flex-direction: row-reverse;
  justify-content: flex-start;
}
.alert-success { background: #f0fdf4; color: #16a34a; border: 1.5px solid #bbf7d0; }
.alert-danger   { background: #fff5f5; color: #dc2626; border: 1.5px solid #fecaca; }

/* ── Animations ─────────────────────────────────── */
@keyframes fadeUp {
  from { opacity:0; transform:translateY(24px); }
  to   { opacity:1; transform:translateY(0); }
}
.anim-fadeup   { animation: fadeUp .5s ease both; }
.anim-fadeup-d1{ animation: fadeUp .5s .1s ease both; }
.anim-fadeup-d2{ animation: fadeUp .5s .2s ease both; }
.anim-fadeup-d3{ animation: fadeUp .5s .3s ease both; }

/* ── Utilities ───────────────────────────────────── */
.text-lime     { color: var(--primary) !important; }
.text-muted-zed{ color: var(--muted); }
.fw-800        { font-weight: 800; }
.font-head     { font-family: var(--font-head); }

/* ── Mobile ──────────────────────────────────────── */
@media (max-width: 991px) {
  .blog-grid { grid-template-columns: 1fr; }
  .nav-links {
    display: none; flex-direction: column;
    position: absolute; top: 100%; left: 0; right: 0;
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: 1.5rem; gap: 1rem;
    box-shadow: 0 8px 24px rgba(0,0,0,.08);
  }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }
}
@media (max-width: 767px) {
  .page-hero { padding: 3rem 0 2.5rem; }
  .post-meta-bar { gap: 1rem; }
  .post-reactions { margin-right: 0; }
  .post-tags-row { flex-direction: column; align-items: flex-end; }
  .breadcrumb-zed { flex-direction: row; }
}
