* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  overflow-x: hidden;
}

body {
  font-family: "Cairo", Arial, sans-serif;
  direction: rtl;
  text-align: right;
  padding-top: 80px;
  background-color: #f5f5f5;
  overflow-y: auto !important;
}

.news-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.news-card {
  position: relative;
  border-radius: 15px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  min-height: 250px;
  display: flex;
  align-items: flex-end;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.news-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.news-card.large {
  grid-column: span 2;
  min-height: 350px;
}

/* Overlay for better text readability */
.news-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.8) 0%,
    rgba(0, 0, 0, 0.3) 50%,
    rgba(0, 0, 0, 0.1) 100%
  );
  z-index: 1;
}

.news-label {
  position: absolute;
  top: 15px;
  right: 15px;
  background-color: #e74c3c;
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: bold;
  z-index: 3;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.news-content {
  position: relative;
  padding: 25px;
  width: 100%;
  color: white;
  z-index: 2;
  overflow-y: hidden;
}

.news-content span {
  overflow-y: hidden;
}

.news-title {
  font-size: 18px;
  font-weight: bold;
  line-height: 1.4;
  margin-bottom: 10px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
  color: white;
  overflow-y: hidden;
}

.large .news-title {
  font-size: 24px;
}

.news-meta {
  font-size: 12px;
  opacity: 0.9;
  display: flex;
  align-items: center;
  gap: 10px;
  color: white;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

/* Main content styles */
.main-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 20px;
}

.sidebar {
  background: white;
  padding: 20px;
  border-radius: 10px;
  height: fit-content;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}
#sidebarPhones {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.sidebar h3 {
  font-size: 18px;
  margin-bottom: 20px;
  color: #333;
  overflow-y: hidden;
}

.sidebar-phones {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.sidebar-phone {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 8px;
  background: #fafafa;
  border: 1px solid #eee;
  transition: background-color 0.3s ease, transform 0.2s ease;
  cursor: pointer;
}

.sidebar-phone:hover {
  background-color: #f1f5f9;
  transform: translateY(-3px);
}

.sidebar-phone-img img {
  width: 55px;
  height: 55px;
  border-radius: 6px;
  object-fit: cover;
  border: 1px solid #ddd;
}

/* معلومات الموبايل */
.sidebar-phone-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: hidden;
}

.sidebar-phone-name {
  font-size: 14px;
  font-weight: 600;
  color: #222;
  margin-bottom: 4px;
  overflow-y: hidden;
}

.sidebar-phone-desc {
  font-size: 12px;
  color: #666;
  overflow-y: hidden;
}

.products-section {
  background: white;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 40px;
}

.product-card {
  border: 1px solid #eee;
  border-radius: 10px;
  padding: 20px;
  text-align: center;
  transition: all 0.3s ease;
  cursor: pointer;
  margin-top: 20px;
}

.product-card:hover {
  border-color: #1f4e8c;
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.product-image {
  width: 120px;
  height: 150px;
  margin: 0 auto 15px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 14px;
  text-align: center;
  position: relative;
}

.product-image img {
  width: 90%;
  height: 90%;
  object-fit: contain;
  border-radius: 8px;
}

.product-category {
  color: #666;
  font-size: 14px;
  margin-bottom: 5px;
  overflow-y: hidden;
}

.product-name {
  font-size: 16px;
  font-weight: bold;
  color: #333;
  margin-bottom: 10px;
  overflow-y: hidden;
}

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 5px;
  margin-top: 30px;
}

.pagination button {
  padding: 10px 15px;
  border: 1px solid #ddd;
  background: white;
  cursor: pointer;
  border-radius: 5px;
  transition: all 0.3s ease;
}

.pagination button.active {
  background: #1f4e8c;
  color: white;
  border-color: #1f4e8c;
}

.pagination button:hover:not(.active) {
  background: #f8f9fa;
}

.news-section {
  margin-top: 30px;
  padding: 20px;
  background: white;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.news-section .news-title {
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 20px;
  color: #333;
}

.news-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px;
  border-bottom: 1px solid #eee;
  transition: background-color 0.3s ease;
  cursor: pointer;
}

.news-item:hover {
  background-color: #f8f9fa;
}

.news-item:last-child {
  border-bottom: none;
}

.news-image {
  width: 80px;
  height: 60px;
  border-radius: 8px;
  background: linear-gradient(45deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 12px;
}

.news-item .news-content {
  flex-grow: 1;
  color: #333;
}

.news-item .news-content h4 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 5px;
  color: #333;
  overflow-y: hidden;
}

/* Color schemes */
.galaxy-z {
  background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
}
.galaxy-a {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}
.galaxy-s {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}
.iphone {
  background: linear-gradient(135deg, #333 0%, #666 100%);
}

.news-card {
  animation: fadeInUp 0.6s ease-out;
}

.news-card:nth-child(2) {
  animation-delay: 0.1s;
}
.news-card:nth-child(3) {
  animation-delay: 0.2s;
}
.news-card:nth-child(4) {
  animation-delay: 0.3s;
}
.news-card:nth-child(5) {
  animation-delay: 0.4s;
}
.news-card:nth-child(6) {
  animation-delay: 0.5s;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 992px) {
  .main-content {
    grid-template-columns: 250px 1fr;
    gap: 15px;
  }

  .products-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  body {
    padding-top: 72px;
  }

  .main-content {
    grid-template-columns: 1fr;
    padding: 10px;
  }

  .sidebar {
    margin-bottom: 20px;
  }

  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }

  .news-grid {
    grid-template-columns: 1fr;
  }

  .news-card.large {
    grid-column: span 1;
    min-height: 280px;
  }

  .news-title {
    font-size: 16px;
  }

  .large .news-title {
    font-size: 20px;
  }
}

@media (max-width: 576px) {
  .products-grid {
    grid-template-columns: 1fr;
  }

  .sidebar-phone {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .sidebar-phone-img {
    width: 100%;
    height: auto;
  }

  .news-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .news-image {
    width: 100%;
    height: 160px;
  }
}

@media (max-width: 480px) {
  .sidebar-phone {
    flex: 1 1 100%;
    display: flex;
  }

  .sidebar-phone img {
    flex: 1 1 100%;
    position: absolute;
    left: 50px;
  }

  .sidebar-phone-img img {
    width: 45px;
    height: 45px;
  }
}
