/* ===========================
   RESET & BASE
=========================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Cairo", sans-serif;
}

body {
  background: #fafafa;
  color: #262626;
  font-size: 14px;
}

/* ===========================
   PROFILE HEADER
=========================== */
.profile-header {
  display: flex;
  max-width: 935px;
  margin: 40px auto;
  padding: 0 20px;
  flex-wrap: wrap; /* يسمح بالتفاف العناصر على شاشات صغيرة */
  gap: 20px;
}

/* صورة البروفايل */
.profile-pic {
  flex: 0 0 150px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.profile-pic img {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #dbdbdb;
}

/* معلومات البروفايل */
.profile-info {
  flex: 1;
  min-width: 200px;
}

/* ====== اسم المستخدم والأزرار ====== */
.top-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 15px;
}

.top-row h1 {
  font-size: 22px;
  font-weight: 600;
}

.top-row button {
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  transition: 0.2s;
}

/* أزرار المتابعة والرسالة */
.follow-btn {
  background: #0095f6;
  color: #fff;
}

.follow-btn:hover {
  background: #0077c2;
}

.msg-btn {
  background: #efefef;
  color: #262626;
}

.msg-btn:hover {
  background: #dbdbdb;
}

/* ====== الإحصائيات ====== */
.stats {
  display: flex;
  gap: 15px;
  margin-bottom: 10px;
  list-style: none;
  flex-wrap: wrap;
}

.stats li {
  font-size: 14px;
}

.stats strong {
  font-weight: 600;
}

/* ====== البايو ====== */
.bio h2 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
}

.bio p {
  margin-bottom: 4px;
  line-height: 1.4;
}

.bio a {
  color: #00376b;
  text-decoration: none;
  font-weight: 600;
}

/* ===========================
   TABS
=========================== */
.tabs {
  display: flex;
  justify-content: center;
  border-top: 1px solid #dbdbdb;
  border-bottom: 1px solid #dbdbdb;
  margin-top: 20px;
  background: #fff;
  flex-wrap: wrap;
}

.tabs a {
  padding: 12px 18px;
  text-decoration: none;
  color: #8e8e8e;
  font-weight: 600;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 5px;
  border-top: 2px solid transparent;
}

.tabs a.active {
  color: #262626;
  border-top: 2px solid #262626;
}

/* ===========================
   GALLERY
=========================== */
.gallery {
  max-width: 935px;
  margin: 20px auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
}

.gallery .post {
  background: #fff;
  position: relative;
}

.gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ===========================
   MEDIA QUERIES
=========================== */

/* شاشات تابلت */
@media (max-width: 768px) {
  .profile-header {
    justify-content: center;
    text-align: center;
  }

  .top-row {
    justify-content: center;
  }

  .stats {
    justify-content: center;
  }

  .gallery {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* شاشات صغيرة جدًا (موبايل) */
@media (max-width: 480px) {
  .profile-pic {
    flex: 0 0 100px;
  }

  .profile-pic img {
    width: 100px;
    height: 100px;
  }

  .top-row h1 {
    font-size: 18px;
  }

  .tabs a {
    padding: 10px 12px;
    font-size: 13px;
  }

  .gallery {
    grid-template-columns: 1fr;
  }
}
