



a,
a:link,
a:visited,
a:hover,
a:focus {
  text-decoration: none !important;
  color: #4a66ff;
}
/* ========= THEME ========= */
:root{
  /* Light (النهاري - الافتراضي) */
  --bg:#ffffff;
  --card:#f7f8fa;
  --fg:#0f172a;
  --muted:#64748b;
  --accent:#06b6d4;
  --header-bg:#ffffffcc; /* شفاف بسيط */
  --border:#e5e7eb;
}
:root[data-theme="dark"]{
  /* Dark (الظلام) */
  --bg:#0b0f14;
  --card:#111827;
  --fg:#e5e7eb;
  --muted:#9ca3af;
  --accent:#06b6d4;
  --header-bg:#0b0f14cc;
  --border:#1f2937;
}

/* ========= RESET ========= */
*{box-sizing:border-box}
body{
  margin:0;
  background:var(--bg);
  color:var(--fg);
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cairo,sans-serif;
  padding-top:60px; /* لتعويض النافبار الثابت */
  transition: background .25s ease, color .25s ease;
}

/* ========= NAVBAR ========= */
.navbar{
  position:fixed; inset-inline:0; top:0; z-index:1000;
  height:60px;
  backdrop-filter: saturate(180%) blur(6px);
  background:var(--header-bg);
  border-bottom:1px solid var(--border);
}
.nav-inner{
  height:100%;
  max-width:1100px;
  margin:auto;
  display:flex; align-items:center; gap:12px;
  padding:0 16px;
}

/* لوجو يسار حتى مع RTL */
.brand{
  margin-inline-end:auto; /* تدفع العناصر الأخرى لليمين، فيظهر اللوجو يسار */
  display:flex; align-items:center; gap:10px;
  text-decoration:none; color:var(--fg);
  font-weight:700; letter-spacing:.2px;
}
.brand .logo{
  width:34px; height:34px; border-radius:8px;
  background:var(--accent);
  display:inline-flex; align-items:center; justify-content:center;
  color:#002; font-size:16px; font-weight:800;
}

/* قائمة الروابط (ديسكتوب) */
.nav-links{
  display:none;
  align-items:center; gap:18px;
}
.nav-links a{
  text-decoration:none; color:var(--fg); font-size:15px;
  padding:6px 10px; border-radius:10px;
  transition:background .2s ease, color .2s ease;
}
.nav-links a:hover{ background:var(--card); }

/* أزرار التحكم يمين: بحث + تبديل ثيم + همبرجر */
.controls{
  display:flex; align-items:center; gap:8px;
}
.icon-btn{
  height:38px; width:38px; border:1px solid var(--border);
  background:var(--card); color:var(--fg);
  border-radius:10px; cursor:pointer;
  display:inline-flex; align-items:center; justify-content:center;
  transition:transform .1s ease, background .2s ease, border-color .2s ease;
}
.icon-btn:active{ transform:scale(.96); }
.icon-btn svg{ width:18px; height:18px }

/* همبرجر للموبايل */
.menu-toggle{ display:inline-flex; }
@media (min-width:900px){
  .nav-links{ display:flex; }
  .menu-toggle{ display:none; }
}

/* ========= MOBILE MENU ========= */
.mobile-menu{
  position:fixed; inset-inline:0; top:60px;
  background:var(--bg); border-bottom:1px solid var(--border);
  transform:translateY(-8px); opacity:0; pointer-events:none;
  transition:opacity .2s ease, transform .2s ease;
}
.mobile-menu.open{ transform:translateY(0); opacity:1; pointer-events:auto; }
.mobile-menu .wrap{
  max-width:1100px; margin:auto; padding:8px 16px 14px;
  display:flex; flex-direction:column; gap:8px;
}
.mobile-menu a{
  text-decoration:none; color:var(--fg);
  padding:10px 12px; border-radius:10px; background:var(--card);
  border:1px solid var(--border);
}

/* ========= SEARCH OVERLAY ========= */
.search-overlay{
  position:fixed; inset:0; background:rgba(0,0,0,.55);
  display:none; align-items:center; justify-content:center; z-index:1200;
}
.search-overlay.active{ display:flex; }
.search-box{
  width:min(900px, 92vw);
  background:var(--bg);
  border:1px solid var(--border);
  border-radius:16px; padding:18px;
  box-shadow:0 20px 50px rgba(0,0,0,.35);
}
.search-input{
  width:100%; font-size:18px; padding:16px 18px;
  border-radius:12px; border:1px solid var(--border);
  background:var(--card); color:var(--fg);
  outline:none;
}
.search-actions{
  margin-top:12px; display:flex; gap:8px; justify-content:flex-start;
}
.btn{
  padding:10px 14px; border-radius:10px; border:1px solid var(--border);
  background:var(--card); color:var(--fg); cursor:pointer;
}
.btn.primary{ background:var(--accent); color:#002; border-color:transparent; }

/* ========= CONTENT CARDS ========= */
header.page-header{padding:24px 16px;max-width:1100px;margin:10px auto 0}
h1{margin:0;font-size:28px}

.grid{
  display:grid; gap:16px;
  grid-template-columns:repeat(auto-fill,minmax(280px,1fr));
  max-width:1100px; margin:0 auto 40px; padding:0 16px
}
.card{
  background:var(--card); border:1px solid var(--border);
  border-radius:16px; overflow:hidden;
  box-shadow:0 10px 20px rgba(0,0,0,.12);
  transition:transform .15s ease;
}
.card:hover{ transform:translateY(-2px); }
.thumb{display:block;position:relative;aspect-ratio:4/3;overflow:hidden}
.thumb img{width:100%;height:100%;object-fit:cover;display:block;transition:transform .35s ease}
.card:hover img{transform:scale(1.06)}
.card .meta{padding:12px 14px}
.title{font-size:16px;line-height:1.5;margin:0}
.title a{color:var(--fg);text-decoration:none}
.title a:hover{color:var(--accent)}
.owner{margin:6px 0 0;font-size:14px;color:var(--muted)}
.empty{opacity:.7;text-align:center;padding:64px}

footer.site{max-width:1100px;margin:32px auto;padding:0 16px;color:var(--muted);font-size:13px}


/* ========= PAGE ========= */
.wrap{max-width:900px;margin:0 auto;padding:20px 16px}
.hero{background:var(--card);border:1px solid var(--border);border-radius:18px;overflow:hidden;box-shadow:0 10px 20px rgba(0,0,0,.12)}
.hero img{width:100%;height:auto;display:block}
.content{padding:18px 18px 22px}
h1{margin:0 0 8px;font-size:26px}
.meta-line{color:var(--muted);font-size:13px;margin:6px 0 14px}
.badge{display:inline-flex;align-items:center;gap:6px;background:var(--card);border:1px solid var(--border);color:var(--fg);padding:6px 10px;border-radius:10px}
.desc{white-space:pre-wrap;line-height:1.8;background:var(--card);border:1px solid var(--border);padding:14px;border-radius:12px}
.row{display:flex;gap:10px;margin-top:12px;flex-wrap:wrap}
.copy-btn{cursor:pointer;border:1px solid var(--border);background:#00abff;color:#050505;padding:10px 14px;border-radius:12px;font-size:18px;}
.copy-btn:hover{background:rgba(0,0,0,.04)}
.msg{color:var(--muted);font-size:13px;margin-top:6px;min-height:1em}

/* ========= RELATED GRID ========= */
.section{max-width:1100px;margin:24px auto;padding:0 16px}
.section h2{margin:0 0 12px;font-size:20px}
.grid{display:grid;gap:14px;/*! grid-template-columns:repeat(auto-fill,minmax(220px,1fr)) */}
.card{background:var(--card);border:1px solid var(--border);border-radius:14px;overflow:hidden;box-shadow:0 6px 16px rgba(0,0,0,.08)}
.thumb{display:block;position:relative;aspect-ratio:4/3;overflow:hidden}
.thumb img{width:100%;height:100%;object-fit:cover;display:block;transition:transform .35s ease}
.card:hover img{transform:scale(1.06)}
.card .meta{padding:10px 12px}
.title{font-size:15px;margin:0}
.title a{color:var(--fg)}
.title a:hover{color:var(--accent)}

/* ========= FOOTER ========= */
footer.site{max-width:1100px;margin:32px auto;padding:0 16px;color:var(--muted);font-size:13px}
.cat-strip{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px}
.cat-strip a{font-size:13px;padding:6px 10px;border:1px solid var(--border);border-radius:10px;background:var(--card);color:var(--fg)}


/* ========= SMALL UTIL ========= */
.hide{display:none !important}
	.card-title {
  background-color: rgba(0, 0, 0, 0);
  background-image: -webkit-gradient(linear, left top, left bottom, from(rgba(0, 0, 0, 0)), to(rgba(0, 0, 0, 0.4)));
  background-image: -webkit-linear-gradient(top, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.4));
  background-image: -moz-linear-gradient(top, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.4));
  background-image: -ms-linear-gradient(top, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.4));
  background-image: -o-linear-gradient(top, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.4));
  background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.4));
  -pie-background: linear-gradient(top, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.4));
  padding: 30px 24px 10px 10px;
  font-size: 16px;
  line-height: 1;
  color: #fff;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.7);
  margin-bottom: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  z-index: 10;
}

 .card-title {
  position: absolute;
  bottom: 0;
  left: 0;
  padding: 20px;
}


.album-wrap{background:var(--bg, #fff);border-bottom:1px solid var(--border, #e5e7eb);}
.album-slider{max-width:1100px;margin:8px auto 18px;padding:10px 56px;position:relative}
.album-track{direction:ltr;display:flex;gap:18px;overflow:hidden;scroll-behavior:smooth}
.album-frame{flex:0 0 auto;width:240px;position:relative;transition:transform .2s ease}
@media (max-width:700px){.album-frame{width:180px}}
.polaroid{display:block;position:relative;background:#fff;border-radius:14px;padding:10px;border:1px solid var(--border, #e5e7eb);}
.polaroid .ph{display:block;position:relative;aspect-ratio:4/3;overflow:hidden;border-radius:8px}
.polaroid img{width:100%;height:100%;object-fit:cover;display:block;transition:transform .35s ease}
.album-frame:hover img{transform:scale(1.06)}
.polaroid .cap{display:block;margin-top:8px;font-size:12px;color:#344}
:root[data-theme="dark"] .polaroid{background:#0f172a;border-color:#1f2937}
:root[data-theme="dark"] .polaroid .cap{color:#cfd8dc}
/* شريط لاصق تجميلي */
.polaroid::before{content:"";position:absolute;top:6px;left:18px;width:64px;height:14px;background:rgba(217, 217, 217, 0.9);transform:rotate(-6deg);border-radius:2px;box-shadow:0 2px 2px rgb(36, 32, 32);}
/* أزرار */
.album-nav{position:absolute;top:50%;transform:translateY(-50%);height:40px;width:40px;border:1px solid var(--border, #e5e7eb);background:var(--card, #f7f8fa);color:var(--fg, #0f172a);border-radius:50%;display:flex;align-items:center;justify-content:center;cursor:pointer;box-shadow:0 4px 16px rgba(0,0,0,.12)}
.album-nav svg{width:18px;height:18px}
.album-prev{inset-inline-start:8px}
.album-next{inset-inline-end:8px}
/* ميلان خفيف يعطي طابع ألبوم صور */
.album-frame:nth-child(5n+1){transform:rotate(-1.2deg)}
.album-frame:nth-child(5n+2){transform:rotate(.8deg)}
.album-frame:nth-child(5n+3){transform:rotate(-.6deg)}
.album-frame:nth-child(5n+4){transform:rotate(1deg)}
.album-frame:nth-child(5n+5){transform:rotate(-.4deg)}
.desc span {
  color: red;
  font-weight: bold;
}

.album-frame img,
.card img {
  width: 100%;
  height: 100%;
    
  object-position: center; 
  background: #fff;       
  border-radius: 8px;    
}
/* 1) خلي الكروت متساوية ومرتبة عموديًا */
.card{
  display:flex;
  flex-direction:column;
  height:100%;
}

/* 2) خلي الصورة بالطول (عمودي) وتملأ المساحة كاملاً */
.thumb{
  aspect-ratio: 3 / 4;           /* طولاني */
  overflow:hidden;
}
.card .thumb img{
  width:100%;
  height:100%;
  object-fit: cover !important;   /* يلغي أي تعارض سابق */
  object-position: center;
  display:block;
}


.meta{
  padding:12px 14px;
  display:flex;
  flex-direction:column;
  gap:8px;
}
.title{
  margin:0;
  line-height:1.4;
}
.title a{
  display:-webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;         
  overflow:hidden;              
}


.owner:empty{ display:none; }
.owner{ margin:4px 0 0; }


.grid{ align-items: stretch; }


.card-title{
  inset-inline:0;
  padding:14px 16px;
  pointer-events:none;
}



.copy-btn {
  cursor: pointer;
  border: 1px solid var(--border);
  color: #fff;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 18px;
}
.copy-btn.red   { background:#e11d48; border-color:#e11d48; } /* أحمر */
.copy-btn.green { background:#16a34a; border-color:#16a34a; } /* أخضر */
/* Overlay عام للمودال */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  display: none;                 /* افتراضيًا مخفي */
  align-items: center;           /* تمركز عمودي */
  justify-content: center;       /* تمركز أفقي */
  z-index: 2000;                 /* أعلى من النافبار */
}
.overlay.active { display: flex; }

.modal-box {
  /*! width: min(900px, 92vw); */
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 18px;
  box-shadow: 0 20px 50px rgba(0,0,0,.35);
  position: fixed;
  gap: 14px;
  top: 25px;
  /*! height: 168px; */
}


/* Dropzone كبير مدوّر */
.dropzone-big {
  border: 2px dashed var(--border);
  background: var(--card);
  border-radius: 22px;
  padding: 18px;
  text-align: center;
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease;
  min-height: 280px;                /* كبير */
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 14px;
}
.dropzone-big:hover { background: #f9fafb; }
.dropzone-big.drag  { background: #eefaff; border-color: #06b6d4; }
.dropzone-big .dz-icon {
  width: 72px; height: 72px;
  border-radius: 50%;
  border: 1px dashed var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 34px; color: var(--muted);
}
.dropzone-big .dz-text { color: var(--muted); }
.dropzone-big .preview {
  margin-top: 8px; display: flex; gap: 10px; flex-wrap: wrap; justify-content: center;
}
.dropzone-big .preview img {
  width: 220px; height: 220px; object-fit: cover; border: 1px solid var(--border); border-radius: 16px;
}

/* شاشة انتظار */
.wait-screen {
  position: fixed; inset: 0; background-color: #fff1f2 !important;
  display: none;
  z-index: 2200;
  align-items: center; justify-content: center; flex-direction: column; gap: 14px;
  top: 83px;
  height: 168px;
}
.wait-screen.active { display: flex; }


.sections-wrap{width:100%;max-width:1200px;margin:24px auto;padding:0 12px}
.section-head{
  display:flex;align-items:center;justify-content:space-between;
  margin:14px 0 10px
}
.section-head h2{
  font-size:1.125rem;margin:0;line-height:1.4
}
.more-btn{
  display:inline-flex;align-items:center;gap:8px;
  padding:8px 12px;border:1px solid var(--border,#e5e7eb);
  border-radius:10px;text-decoration:none;color:var(--fg,#0f172a);
  font-size:.9rem
}
.more-btn:hover{background:var(--card,#f7f8fa)}
.cat-grid{
  display:grid;grid-template-columns:repeat(4,1fr);gap:14px
}
@media (max-width:1024px){.cat-grid{grid-template-columns:repeat(3,1fr)}}
@media (max-width:720px){.cat-grid{grid-template-columns:repeat(2,1fr)}}
.cat-card{
  background:var(--card,#f7f8fa);border:1px solid var(--border,#e5e7eb);
  border-radius:14px;overflow:hidden
}
.cat-card a.thumb{display:block;position:relative;aspect-ratio:1/1;overflow:hidden}
.cat-card img{width:100%;height:100%;object-fit:cover;display:block}
.cat-meta{padding:10px}
.cat-title{font-size:.95rem;margin:0 0 6px}
.cat-sub{font-size:.8rem;color:var(--muted,#64748b);display:flex;gap:10px}
.cat-sub .pill{display:inline-block;padding:2px 8px;border-radius:999px;border:1px solid var(--border,#e5e7eb)}



/* ====== تنسيقات بسيطة للواجهة الجديدة ====== */
.engage-wrap{margin-top:18px}
.share-row{
  display:flex; flex-wrap:wrap; gap:10px; align-items:center;
  border:1px solid var(--border,#e5e7eb); padding:10px; border-radius:10px; background:var(--card,#f7f8fa)
}
.share-row .btn-share{
  display:inline-flex; align-items:center; gap:6px;
  padding:8px 12px; border:1px solid var(--border,#e5e7eb);
  border-radius:999px; background:#fff; cursor:pointer; font-size:.95rem
}
.vote-row{ display:flex; justify-content:center; align-items:center; gap:16px; margin:14px 0 }
.vote-row button{
  min-width:120px; padding:10px 16px; border-radius:999px; font-size:1rem; cursor:pointer;
  border:1px solid var(--border,#e5e7eb); background:#fff; transition:transform .05s ease
}
.vote-row button:active{ transform:scale(.98) }
.vote-row .active{ outline:2px solid var(--accent,#06b6d4) }
.counters{
  display:flex; gap:14px; justify-content:center; color:var(--muted,#64748b); font-size:.95rem
}
.counters .dot{width:4px;height:4px;border-radius:50%;background:currentColor;display:inline-block;margin:0 4px}
.copy-btn{margin-top:8px}
.cat-section {
  padding: 20px;
}