/* =====================
   ROOT + RESET
===================== */
:root{
  --bg:#0b1a12;
  --bg-dark:#07140e;
  --card:#0f2419;
  --text:#e5e7eb;
  --muted:#9ca3af;
  --green:#22c55e;
  --red:#ef4444;
  --border:#1f3a2a;
}

*{
  box-sizing:border-box;
  font-family:Inter,system-ui,Arial;
}

html{font-size:16px}
body{
  margin:0;
  background:var(--bg);
  color:var(--text);
}

a{text-decoration:none;color:inherit}

/* =====================
   HEADER
===================== */
header{
  background:var(--bg-dark);
  border-bottom:1px solid var(--border);
}

.nav{
  max-width:1200px;
  margin:auto;
  padding:14px 16px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  flex-wrap:wrap;
  gap:10px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px; /* مسافة بين الصورة والنص */
  font-size: 18px;
  font-weight: bold;
}
.logo-img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.logo-text {
  white-space: nowrap;
}
.menu{
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
}

.menu a{
  margin:4px 8px;
  color:var(--muted);
  font-size:14px;
}

.menu a.active,
.menu a:hover{
  color:#fff;
}

.cta{
  background:var(--red);
  color:#fff;
  padding:8px 14px;
  border-radius:8px;
  font-size:14px;
}

/* =====================
   HERO
===================== */
.hero{
  background:url('https://images.unsplash.com/photo-1550751827-4bd374c3f58b') center/cover no-repeat;
}

.hero-inner{
  backdrop-filter:blur(2px);
  background:rgba(0,0,0,.55);
}

.hero-content{
  max-width:1200px;
  margin:auto;
  padding:80px 16px;
  text-align:center;
}

.hero h1{
  margin:0;
  font-size:clamp(24px,5vw,40px);
}

.hero p{
  margin-top:10px;
  color:var(--muted);
  font-size:clamp(14px,2.5vw,16px);
}

/* =====================
   ARTICLES
===================== */
.container{
  max-width:1200px;
  margin:40px auto;
  padding:0 16px;
}

.section-title{
  font-size:20px;
  margin-bottom:6px;
}

.section-sub{
  font-size:13px;
  color:var(--green);
  margin-bottom:20px;
}

.grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(260px,1fr));
  gap:20px;
}

.card{
  background:var(--card);
  border:1px solid var(--border);
  border-radius:14px;
  overflow:hidden;
  display:flex;
  flex-direction:column;
}

.card img{
  width:100%;
  height:clamp(140px,30vw,180px);
  object-fit:cover;
}

.card-body{
  padding:14px;
  display:flex;
  flex-direction:column;
  flex:1;
}

.tag{
  font-size:12px;
  color:#f97316;
  margin-bottom:6px;
}

.card h3{
  margin:0 0 8px;
  font-size:clamp(15px,3vw,17px);
  line-height:1.4;
}

.card p{
  color:var(--muted);
  font-size:clamp(13px,2.8vw,14px);
  line-height:1.6;
  flex:1;
}

.meta{
  margin-top:12px;
  font-size:12px;
  color:var(--green);
}

/* ===== FIX SINGLE ARTICLE SIZE ===== */
.grid {
  justify-items: center;
}

.card {
  width: 100%;
  max-width: 360px;
}

/* =====================
   ARTICLE CONTENT
===================== */
.article-content{
  max-width:800px;
  margin:auto;
  padding:0 10px;
  font-size:clamp(15px,2.8vw,18px);
  line-height:1.9;
}

.article-content h2{
  margin-top:30px;
  font-size:clamp(20px,4vw,26px);
}

.article-content img{
  width:100%;
  max-height:420px;
  object-fit:cover;
  border-radius:12px;
  margin:20px 0;
}

/* =====================
   BUTTONS
===================== */
.lang-btn{
  background:#1f2937;
  color:#fff;
  border:1px solid #374151;
  padding:6px 12px;
  border-radius:8px;
  cursor:pointer;
  font-size:13px;
}

/* =====================
   FOOTER (التصميم الأساسي للكمبيوتر)
===================== */
footer {
  margin-top: 60px;
  background: #000;
  border-top: 1px solid var(--border);
}

.footer-inner {
  max-width: 1200px;
  margin: auto;
  padding: 30px 16px;
  display: grid;
  /* على الكمبيوتر: العناصر بجانب بعضها طالما العرض يسمح بـ 220px */
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); 
  gap: 30px;
  text-align: center;
}

footer h4 {
  margin: 0 0 10px;
  font-size: 15px;
}

footer p,
footer a {
  font-size: 13px;
  color: var(--muted);
  /* نزيل الـ block هنا ليبقى التصميم عرضياً في الشاشات الكبيرة */
  text-decoration: none; 
}

.copy {
  text-align: center;
  border-top: 1px solid var(--border);
  padding: 14px;
  font-size: 12px;
  color: var(--muted);
}

/* =====================
   MEDIA QUERIES (إصلاحات الموبايل)
===================== */
@media (max-width: 900px) {
  .hero-content { padding: 60px 16px; }
}

@media (max-width: 600px) {
  html { font-size: 14px; }
  .cta { padding: 6px 12px; font-size: 13px; }
  .container { margin: 30px auto; }

  /* الحل الجذري لمشكلة السطور المتداخلة في الموبايل */
  .footer-inner {
    grid-template-columns: 1fr; /* تحويل الفوتر لعمود واحد فقط */
    gap: 40px; /* مسافة كبيرة بين كل قسم (Section) والآخر */
  }

  footer h4 {
    font-size: 16px;
    margin-bottom: 15px;
  }

  footer p, 
  footer a {
    display: block;  /* الآن نجعلها Block فقط في الموبايل لسهولة اللمس */
    font-size: 14px;
    margin-bottom: 12px;
    padding: 5px 0; /* مساحة إضافية للضغط بالإصبع */
  }
}
/* =====================
   TABS (DESKTOP + MOBILE)
===================== */
.tab-btn{
  cursor:pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.tab-content{
  display:none;
}

.tab-content.active{
  display:block;
}
img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto; /* لتوسيط الصورة إذا كانت أصغر من العرض الكامل */
}



