/* عمران العرب - تصميم الموقع */
@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@300;400;500;700&display=swap');

:root {
  --primary-color: #174358;
  --secondary-color: #d4a762;
  --light-color: #f8f9fa;
  --dark-color: #343a40;
  --transition: all 0.3s ease-in-out;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Tajawal', sans-serif;
  direction: rtl;
  line-height: 1.6;
  color: var(--dark-color);
  background-color: #f5f5f5;
  overflow-x: hidden;
  margin: 0;
  padding: 0;
  width: 100%;
  min-height: 100vh;
}

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

ul {
  list-style: none;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
  box-sizing: border-box;
}

/* Header */
.header {
  background-color: var(--primary-color);
  color: white;
  padding: 1.5rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--light-color);
  display: flex;
  align-items: center;
}

.logo img {
  height: 50px;
  margin-left: 10px;
}

.nav-links {
  display: flex;
}

.nav-links li {
  margin-right: 20px;
}

.nav-links a {
  color: var(--light-color);
  position: relative;
  padding: 5px 0;
  font-weight: 500;
  transition: var(--transition);
}

.nav-links a:hover {
  color: var(--secondary-color);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 0;
  height: 2px;
  background-color: var(--secondary-color);
  transition: var(--transition);
}

.nav-links a:hover::after {
  width: 100%;
}

.menu-toggle {
  display: none;
  cursor: pointer;
  font-size: 1.5rem;
}

/* Hero Section */
.hero {
  height: 90vh;
  background-image: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('IMG-20250402-WA0121.jpg');
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  color: white;
  position: relative;
}

.hero-content {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px;
}

.hero-content h1 {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  animation: fadeInDown 1s ease;
}

.hero-content p {
  font-size: 1.3rem;
  margin-bottom: 2rem;
  animation: fadeInUp 1s ease;
}

.hero-btn {
  display: inline-block;
  background-color: var(--secondary-color);
  color: var(--dark-color);
  padding: 12px 30px;
  border-radius: 50px;
  font-weight: 600;
  transition: var(--transition);
  animation: fadeInUp 1.2s ease;
}

.hero-btn:hover {
  background-color: #c69c55;
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.scroll-down {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 2rem;
  animation: bounce 2s infinite;
  color: var(--light-color);
}

/* About Section */
.section {
  padding: 5rem 0;
}

.section-title {
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
}

.section-title h2 {
  display: inline-block;
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.section-title::after {
  content: '';
  position: absolute;
  width: 80px;
  height: 3px;
  background-color: var(--secondary-color);
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
}

.about-content {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2rem;
}

.about-text {
  flex: 1;
  min-width: 300px;
}

.about-text h3 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

.about-image {
  flex: 1;
  min-width: 300px;
  position: relative;
}

.about-image img {
  width: 100%;
  border-radius: 10px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.about-image::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  border: 3px solid var(--secondary-color);
  top: -15px;
  right: -15px;
  border-radius: 10px;
  z-index: -1;
}

/* Services Section */
.services {
  background-color: #f8f9fa;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.service-card {
  background-color: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transition: var(--transition);
}

.service-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.service-img {
  height: 200px;
  overflow: hidden;
}

.service-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.service-card:hover .service-img img {
  transform: scale(1.1);
}

.service-content {
  padding: 1.5rem;
}

.service-content h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--primary-color);
}

/* Portfolio Section */
.portfolio-filter {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.filter-btn {
  background-color: transparent;
  border: 2px solid var(--primary-color);
  padding: 8px 20px;
  margin: 0 5px 10px;
  cursor: pointer;
  border-radius: 5px;
  font-family: 'Tajawal', sans-serif;
  font-weight: 600;
  transition: var(--transition);
}

.filter-btn.active, .filter-btn:hover {
  background-color: var(--primary-color);
  color: white;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.portfolio-item {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  height: 250px;
}

.portfolio-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.portfolio-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: var(--transition);
}

.portfolio-item:hover .portfolio-overlay {
  opacity: 1;
}

.portfolio-item:hover .portfolio-img {
  transform: scale(1.1);
}

.portfolio-overlay h3 {
  color: white;
  margin-bottom: 10px;
  transform: translateY(-20px);
  transition: var(--transition);
}

.portfolio-item:hover .portfolio-overlay h3 {
  transform: translateY(0);
}

.portfolio-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--secondary-color);
  display: flex;
  justify-content: center;
  align-items: center;
  color: white;
  transform: translateY(20px);
  transition: var(--transition);
}

.portfolio-item:hover .portfolio-icon {
  transform: translateY(0);
}

/* Contact Section */
.contact {
  background-color: #f8f9fa;
}

.contact-content {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
}

.contact-info {
  flex: 1;
  min-width: 300px;
}

.contact-info h3 {
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  color: var(--primary-color);
}

.contact-item {
  display: flex;
  margin-bottom: 1.5rem;
}

.contact-icon {
  font-size: 1.5rem;
  color: var(--secondary-color);
  margin-left: 1rem;
}

.contact-details h4 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.contact-map {
  flex: 1;
  min-width: 300px;
  height: 350px;
  border-radius: 10px;
  overflow: hidden;
}

.social-links {
  display: flex;
  margin-top: 1.5rem;
}

.social-link {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--primary-color);
  display: flex;
  justify-content: center;
  align-items: center;
  color: white;
  margin-left: 1rem;
  transition: var(--transition);
}

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

/* Footer */
.footer {
  background-color: var(--primary-color);
  color: white;
  padding: 2rem 0;
  text-align: center;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.footer-logo {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  margin: 1rem 0;
}

.footer-links a {
  margin: 0 15px;
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--secondary-color);
}

.footer-bottom {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  width: 100%;
}

/* Animations */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0) translateX(-50%);
  }
  40% {
    transform: translateY(-20px) translateX(-50%);
  }
  60% {
    transform: translateY(-10px) translateX(-50%);
  }
}

/* Responsive Design */
@media screen and (max-width: 768px) {
  .menu-toggle {
    display: block;
  }
  
  .nav-links {
    position: fixed;
    top: 80px;
    right: -100%;
    width: 80%;
    height: calc(100vh - 80px);
    background-color: var(--primary-color);
    flex-direction: column;
    align-items: center;
    padding-top: 2rem;
    transition: var(--transition);
  }
  
  .nav-links.active {
    right: 0;
  }
  
  .nav-links li {
    margin: 1.5rem 0;
  }
  
  .hero-content h1 {
    font-size: 2.5rem;
  }
  
  .hero-content p {
    font-size: 1.1rem;
  }
  
  .about-content, .contact-content {
    flex-direction: column;
  }
  
  .about-image::before {
    display: none;
  }

  /* تحسين توافق الشاشات المحمولة */
  section {
    padding: 50px 0;
  }
  
  .section-title {
    margin-bottom: 30px;
  }
  
  .section-title h2 {
    font-size: 2rem;
  }
  
  .services-grid {
    grid-template-columns: 1fr;
  }
  
  .portfolio-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  
  .portfolio-filters {
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .filter-btn {
    margin: 5px;
    padding: 6px 15px;
    font-size: 0.9rem;
  }
  
  .footer-content {
    flex-direction: column;
    text-align: center;
  }
  
  .footer-links {
    margin: 20px 0;
  }
  
  .contact-item {
    margin-bottom: 25px;
  }
  
  .social-links {
    justify-content: center;
    margin-top: 25px;
    margin-bottom: 25px;
  }
}

/* إضافة قواعد للأجهزة الصغيرة جداً */
@media screen and (max-width: 480px) {
  .container {
    padding: 0 10px;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }
  
  html, body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
  }
  
  .hero-content h1 {
    font-size: 2rem;
  }
  
  .hero-content p {
    font-size: 1rem;
  }
  
  .btn {
    padding: 8px 16px;
    font-size: 0.9rem;
  }
  
  .portfolio-grid {
    grid-template-columns: 1fr;
  }
  
  .lightbox-content {
    max-width: 95%;
  }
  
  .video-container {
    height: 200px;
  }
  
  .section-title h2 {
    font-size: 1.8rem;
  }
  
  .service-item {
    padding: 15px;
  }
  
  .service-item h3 {
    font-size: 1.2rem;
  }
}

/* إضافة قواعد للأجهزة المتوسطة */
@media screen and (min-width: 481px) and (max-width: 768px) {
  .hero-content {
    width: 90%;
  }
  
  .portfolio-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }
  
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }
  
  .video-container {
    height: 250px;
  }
}

/* إضافة قواعد توافق خاصة بالاتجاه الأفقي للأجهزة المحمولة */
@media screen and (max-height: 500px) and (orientation: landscape) {
  .nav-links {
    overflow-y: auto;
  }
  
  .hero {
    height: auto;
    min-height: 100vh;
  }
  
  .hero-content {
    padding: 50px 0;
  }
  
  .lightbox-img {
    max-height: 80vh;
  }
}

/* Loader */
.loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: white;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.5s, visibility 0.5s;
}

.loader.fade {
  opacity: 0;
  visibility: hidden;
}

.spinner {
  width: 60px;
  height: 60px;
  border: 5px solid var(--primary-color);
  border-radius: 50%;
  border-top-color: var(--secondary-color);
  animation: spin 1s linear infinite;
}

@keyframes spin {
  100% {
    transform: rotate(360deg);
  }
}

/* Back to top button */
.back-to-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  background-color: var(--primary-color);
  color: white;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  z-index: 999;
}

.back-to-top.active {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background-color: var(--secondary-color);
}

/* Image gallery lightbox */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.lightbox.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-content {
  position: relative;
  max-width: 80%;
  max-height: 80%;
}

.lightbox-img {
  max-width: 100%;
  max-height: 100vh;
  border: 5px solid white;
}

.lightbox-close {
  position: absolute;
  top: -40px;
  right: 0;
  font-size: 2rem;
  color: white;
  cursor: pointer;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  width: 100%;
  display: flex;
  justify-content: space-between;
  transform: translateY(-50%);
}

.lightbox-prev,
.lightbox-next {
  font-size: 2rem;
  color: white;
  cursor: pointer;
  padding: 10px;
}

.lightbox-prev {
  margin-right: 20px;
}

.lightbox-next {
  margin-left: 20px;
}
