/* 
 * مطابع النخبة للدعاية والإعلان - ملف التنسيقات
 * تم تحسينه وتنظيمه لأداء أفضل وتجربة مستخدم متميزة
 */

/* === التنسيقات الأساسية === */
:root {
  --primary-color: #007bff;
  --primary-dark: #0056b3;
  --secondary-color: #004e92;
  --dark-color: #000428;
  --success-color: #2b4bfd;
  --whatsapp-color: #2b4bfd;
  --light-color: #f5f5f5;
  --white-color: #ffffff;
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.3);
  --border-radius-sm: 8px;
  --border-radius-md: 12px;
  --border-radius-lg: 16px;
  --border-radius-full: 50%;
  --transition-speed: 0.3s ease;
  --container-width: 1200px;
  --section-spacing: 4rem;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  margin: 0;
  font-family: 'Arial', sans-serif;
  background-color: var(--light-color);
  direction: rtl;
  line-height: 1.6;
  color: #333;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}

.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 1rem;
}

/* === تنسيقات الهيدر === */
.header {
  background: linear-gradient(to left, var(--secondary-color), var(--dark-color));
  color: var(--white-color);
  padding: 2rem 1rem;
  text-align: center;
  box-shadow: var(--shadow-md);
  position: relative;
}

.logo-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 1.5rem;
}

.logo {
  width: 150px;
  height: auto;
  margin-bottom: 1rem;
  transition: transform var(--transition-speed);
}

.logo:hover {
  transform: scale(1.05);
}

.title-section h1 {
  margin: 0;
  font-size: 2rem;
  font-weight: 700;
}

.title-section p {
  margin: 0.5rem 0;
  font-size: 1rem;
  opacity: 0.9;
}

/* === تنسيقات القائمة === */
.main-nav {
  width: 100%;
}

.nav-list {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.nav-link {
  color: var(--white-color);
  font-weight: 600;
  padding: 0.5rem 0;
  position: relative;
  transition: all var(--transition-speed);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background-color: var(--white-color);
  transform: scaleX(0);
  transition: transform var(--transition-speed);
}

.nav-link:hover::after,
.nav-link:focus::after {
  transform: scaleX(1);
}

.buttons {
  margin-top: 1rem;
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn {
  background-color: var(--primary-color);
  color: var(--white-color);
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: var(--border-radius-sm);
  text-decoration: none;
  font-size: 1rem;
  font-weight: 600;
  transition: all var(--transition-speed);
  cursor: pointer;
  display: inline-block;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.btn-large {
  padding: 1rem 2rem;
  font-size: 1.1rem;
}

.btn:hover {
  transform: translateY(-3px) scale(1.05);
  background-color: var(--primary-dark);
  box-shadow: var(--shadow-md);
}

.btn:active {
  transform: translateY(1px);
}

/* === تنسيقات المحتوى الرئيسي === */
main {
  padding: 1rem 0;
}

/* === تنسيقات قسم البطل (Hero) === */
.hero {
  background: linear-gradient(to left, var(--dark-color) , var(--secondary-color));
  background-size: cover;
  background-position: center;
  color: var(--white-color);
  text-align: center;
  padding: 5rem 1rem;
  margin-bottom: var(--section-spacing);
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
}

.hero h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  opacity: 0.9;
}

/* === تنسيقات قسم من نحن === */
.about {
  padding: 3rem 0;
  margin-bottom: var(--section-spacing);
}

.about h2,
.services h2,
.products h2 {
  font-size: 2.2rem;
  margin-bottom: 2rem;
  text-align: center;
  position: relative;
  display: inline-block;
  padding-bottom: 0.5rem;
}

.about h2::after,
.services h2::after,
.products h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 25%;
  right: 25%;
  height: 3px;
  background: linear-gradient(to left, var(--secondary-color), var(--primary-color));
  border-radius: 3px;
}

.about-content {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  max-width: 800px;
  margin: 0 auto;
}

.about-text p {
  margin-bottom: 1rem;
  text-align: center;
  font-size: 1.1rem;
}

/* === تنسيقات قسم الخدمات === */
.services {
  padding: 3rem 0;
  background-color: #f9f9f9;
  margin-bottom: var(--section-spacing);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.service-card {
  background-color: var(--white-color);
  padding: 2rem;
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-sm);
  text-align: center;
  transition: transform var(--transition-speed), box-shadow var(--transition-speed);
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.service-icon {
  width: 60px;
  height: 60px;
  background-color: var(--primary-color);
  color: var(--white-color);
  border-radius: var(--border-radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
}

.service-card h3 {
  margin-bottom: 1rem;
  color: var(--dark-color);
}

.service-card p {
  color: #666;
}

/* === تنسيقات قسم المنتجات === */
.products {
  padding: 3rem 0;
  text-align: center;
}

.products h2 {
  margin-left: auto;
  margin-right: auto;
}

/* شبكة المنتجات المتجاوبة */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.product {
  background-color: var(--white-color);
  padding: 1.5rem;
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-speed), box-shadow var(--transition-speed);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.product:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.product img {
  width: 100%;
  height: auto;
  border-radius: var(--border-radius-sm);
  margin: 0 auto 1rem;
  object-fit: cover;
  aspect-ratio: 1 / 1;
}

.product h3 {
  margin: 0.5rem 0 1rem;
  font-size: 1.2rem;
  color: var(--dark-color);
}

.product .btn {
  margin-top: auto;
}

/* === تنسيقات الفوتر === */
.footer {
  background: linear-gradient(to left, var(--secondary-color), var(--dark-color));
  color: var(--white-color);
  padding: 3rem 0 1.5rem;
  margin-top: 3rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h3 {
  margin-bottom: 1.5rem;
  position: relative;
  display: inline-block;
  padding-bottom: 0.5rem;
}

.footer-section h3::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 50px;
  height: 2px;
  background-color: var(--primary-color);
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: 0.75rem;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: var(--border-radius-sm);
  transition: transform var(--transition-speed);
}

.contact-item:hover {
  transform: translateY(-3px);
}

.contact-icon {
  color: var(--white-color);
  display: flex;
  align-items: center;
  justify-content: center;
}

.contact-icon svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.75rem;
}

.footer-link {
  color: var(--white-color);
  opacity: 0.8;
  transition: opacity var(--transition-speed);
}

.footer-link:hover {
  opacity: 1;
  text-decoration: underline;
}

.social-links {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.social-link {
  width: 40px;
  height: 40px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: var(--border-radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-speed);
}

.social-link:hover {
  background-color: var(--primary-color);
  transform: translateY(-3px);
}

.qr-code-container {
  margin-top: 1.5rem;
}

.qr-code {
  width: 100px;
  height: auto;
  margin-top: 0.5rem;
  border-radius: var(--border-radius-sm);
  background-color: var(--white-color);
  padding: 0.25rem;
}

.copyright {
  text-align: center;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 0.9rem;
  opacity: 0.8;
}

/* === تنسيقات الأزرار العائمة === */
.floating-buttons {
 
  position: fixed;
  bottom: 20px;
  left: 20px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  z-index: 1000;
}

.floating-btn {
  width: 60px;
  height: 60px;
  border-radius: var(--border-radius-full);
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: var(--shadow-lg);
  text-decoration: none;
  color: var(--white-color);
  transition: all var(--transition-speed);
}

.floating-btn svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
}

.floating-btn:hover {
  transform: scale(1.1);
}

.call-btn {
  background-color: var(--success-color);
}

.whatsapp-btn {
  background-color: var(--whatsapp-color);
}

/* === تنسيقات الطباعة === */
@media print {
  .floating-buttons,
  .buttons,
  .btn,
  .nav-list {
    display: none !important;
  }
  
  body {
    background-color: var(--white-color);
    color: #000;
  }
  
  .header,
  .footer {
    background: none !important;
    color: #000 !important;
    box-shadow: none !important;
  }
  
  .product {
    break-inside: avoid;
    page-break-inside: avoid;
    box-shadow: none !important;
    border: 1px solid #ddd;
  }
  
  .hero {
    background: none !important;
    color: #000 !important;
    padding: 1rem 0;
  }
  
  .service-card {
    break-inside: avoid;
    page-break-inside: avoid;
    box-shadow: none !important;
    border: 1px solid #ddd;
  }
  
  .service-icon {
    background-color: #ddd !important;
    color: #000 !important;
  }
}

/* === تنسيقات التجاوب === */
@media (max-width: 1200px) {
  .product-grid,
  .services-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  }
  
  .hero h2 {
    font-size: 2.2rem;
  }
}

@media (max-width: 992px) {
  .products h2,
  .services h2,
  .about h2 {
    font-size: 2rem;
  }
  
  .hero h2 {
    font-size: 2rem;
  }
  
  .hero p {
    font-size: 1.1rem;
  }
  
  .service-icon {
    width: 50px;
    height: 50px;
  }
}

@media (max-width: 768px) {
  .header {
    padding: 1.5rem 1rem;
  }
  
  .title-section h1 {
    font-size: 1.8rem;
  }
  
  .product-grid,
  .services-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.5rem;
  }
  
  .hero {
    padding: 3rem 1rem;
  }
  
  .hero h2 {
    font-size: 1.8rem;
  }
  
  .hero p {
    font-size: 1rem;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
  }
  
  .floating-buttons {
    bottom: 15px;
    left: 15px;
  }
  
  .floating-btn {
    width: 50px;
    height: 50px;
  }
  
  .floating-btn svg {
    width: 20px;
    height: 20px;
  }
  
  .about-content,
  .services-grid {
    gap: 1.5rem;
  }
  
  :root {
    --section-spacing: 3rem;
  }
}

@media (max-width: 576px) {
  .product-grid {
    grid-template-columns: 1fr;
    max-width: 350px;
    margin-left: auto;
    margin-right: auto;
  }
  
  .services-grid {
    grid-template-columns: 1fr;
    max-width: 350px;
    margin-left: auto;
    margin-right: auto;
  }
  
  .title-section h1 {
    font-size: 1.5rem;
  }
  
  .products h2,
  .services h2,
  .about h2 {
    font-size: 1.8rem;
  }
  
  .logo {
    width: 120px;
  }
  
  .hero h2 {
    font-size: 1.6rem;
  }
  
  .btn-large {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
  }
  
  .nav-list {
    gap: 1rem;
  }
  
  :root {
    --section-spacing: 2.5rem;
  }
}

/* === تحسينات إمكانية الوصول === */
:focus {
  outline: 3px solid var(--primary-color);
  outline-offset: 2px;
}

.btn:focus,
.floating-btn:focus,
.nav-link:focus,
.footer-link:focus,
.social-link:focus {
  outline: 3px solid #fff;
  outline-offset: 2px;
}

/* === تأثيرات حركية === */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.product {
  animation: fadeIn 0.5s ease forwards;
}

.product:nth-child(2n) {
  animation-delay: 0.1s;
}

.product:nth-child(3n) {
  animation-delay: 0.2s;
}

.service-card {
  animation: fadeIn 0.5s ease forwards;
}

.service-card:nth-child(2n) {
  animation-delay: 0.1s;
}

.service-card:nth-child(3n) {
  animation-delay: 0.2s;
}

/* === تحسينات إضافية === */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--primary-color);
  color: white;
  padding: 8px;
  z-index: 100;
  transition: top 0.3s;
}

.skip-link:focus {
  top: 0;
}
