/* ============================================
   شركة الوقاية للتأمين - ملف الأنماط الرئيسي
   ============================================ */

/* استيراد الخطوط العربية الحديثة */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;600;700;900&display=swap');

/* متغيرات الألوان والأنماط */
:root {
  --primary-color: #0b4ea2;
  --secondary-color: #ff8c00;
  --accent-color: #00bcd4;
  --dark-bg: #0a1e3e;
  --light-bg: #f5f7fb;
  --white: #ffffff;
  --text-dark: #1a1a1a;
  --text-light: #666666;
  --border-radius: 12px;
  --shadow-light: 0 4px 15px rgba(0, 0, 0, 0.1);
  --shadow-medium: 0 8px 25px rgba(0, 0, 0, 0.15);
  --transition: all 0.3s ease;
}

/* إعادة تعيين عام */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Cairo', sans-serif;
  background-color: var(--light-bg);
  color: var(--text-dark);
  line-height: 1.6;
  direction: rtl;
  overflow-x: hidden;
}

/* ============================================
   الرأس (Header)
   ============================================ */
header {
  position: fixed;
  top: 0;
  width: 100%;
  background: linear-gradient(135deg, var(--primary-color) 0%, #0d3d7a 100%);
  color: var(--white);
  padding: 10px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 999;
  box-shadow: var(--shadow-medium);
  height: 80px;
}

header .logo {
  display: flex;
  align-items: center;
  gap: 15px;
  font-size: 24px;
  font-weight: 700;
  text-decoration: none;
  color: var(--white);
  flex-shrink: 0;
  order: 1;
}

header .logo img {
  height: 50px;
  width: auto;
}

header .logo span {
  display: none;
}

nav {
  display: flex;
  gap: 40px;
  align-items: center;
  margin-left: auto;
  margin-right: auto;
  order: 2;
}

nav a {
  color: var(--white);
  text-decoration: none;
  font-size: 16px;
  font-weight: 600;
  transition: var(--transition);
  position: relative;
}

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

nav a:hover::after {
  width: 100%;
}

.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--white);
  font-size: 24px;
  cursor: pointer;
}

/* ============================================
   القسم الرئيسي (Hero Section)
   ============================================ */
.hero {
  height: 100vh;
  position: relative;
  overflow: hidden;
  margin-top: 80px;
}

.hero-slider {
  position: relative;
  width: 100%;
  height: 100%;
}

.slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

.slide.active {
  opacity: 1;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(11, 78, 162, 0.7) 0%, rgba(13, 61, 122, 0.5) 100%);
  z-index: 1;
}

.hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  text-align: center;
  z-index: 2;
}

.hero-content h1 {
  font-size: 56px;
  font-weight: 900;
  margin-bottom: 15px;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3);
  animation: slideInDown 0.8s ease;
}

.hero-content p {
  font-size: 24px;
  font-weight: 300;
  margin-bottom: 30px;
  text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.3);
  animation: slideInUp 0.8s ease 0.2s both;
}

.hero-cta {
  display: inline-block;
  padding: 15px 40px;
  background-color: var(--secondary-color);
  color: var(--white);
  text-decoration: none;
  border-radius: var(--border-radius);
  font-weight: 700;
  font-size: 16px;
  transition: var(--transition);
  box-shadow: 0 4px 15px rgba(255, 140, 0, 0.3);
  animation: slideInUp 0.8s ease 0.4s both;
}

.hero-cta:hover {
  background-color: #ff7600;
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(255, 140, 0, 0.4);
}

.slider-dots {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 12px;
  z-index: 3;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: var(--transition);
}

.dot.active {
  background-color: var(--secondary-color);
  width: 30px;
  border-radius: 6px;
}

/* ============================================
   الأقسام العامة
   ============================================ */
section {
  scroll-margin-top: 100px;
}

.section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 80px 30px;
}

.section-title {
  font-size: 42px;
  font-weight: 900;
  color: var(--primary-color);
  margin-bottom: 50px;
  text-align: center;
  position: relative;
  padding-bottom: 20px;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, var(--secondary-color), var(--accent-color));
  border-radius: 2px;
}

.section-subtitle {
  font-size: 18px;
  color: var(--text-light);
  text-align: center;
  margin-bottom: 60px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* ============================================
   قسم من نحن (About Section)
   ============================================ */
#about {
  background-color: var(--white);
}

.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.about-text h3 {
  font-size: 28px;
  color: var(--primary-color);
  margin-bottom: 20px;
}

.about-text p {
  font-size: 16px;
  color: var(--text-light);
  margin-bottom: 15px;
  line-height: 1.8;
}

.about-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 30px;
}

.feature-item {
  display: flex;
  gap: 15px;
  align-items: flex-start;
}

.feature-icon {
  width: 40px;
  height: 40px;
  background-color: var(--secondary-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-weight: 700;
  flex-shrink: 0;
}

.feature-item h4 {
  color: var(--primary-color);
  font-size: 16px;
  margin-bottom: 5px;
}

.feature-item p {
  font-size: 14px;
  color: var(--text-light);
}

/* ============================================
   قسم الإحصائيات
   ============================================ */
#stats {
  background: linear-gradient(135deg, var(--primary-color) 0%, #0d3d7a 100%);
  color: var(--white);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
}

.stat-card {
  text-align: center;
  padding: 30px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--border-radius);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: var(--transition);
}

.stat-card:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.15);
}

.stat-number {
  font-size: 48px;
  font-weight: 900;
  color: var(--secondary-color);
  margin-bottom: 10px;
}

.stat-label {
  font-size: 18px;
  font-weight: 600;
}

.stat-description {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
  margin-top: 10px;
}

/* ============================================
   قسم الخدمات
   ============================================ */
#services {
  background-color: var(--light-bg);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
  gap: 60px;
  max-width: 1100px;
  margin: 0 auto;
}

.service-card {
  background: var(--white);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow-light);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 1px solid rgba(11, 78, 162, 0.08);
}

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


.service-image{
    width:100%;
    height:auto;
    min-height:280px;
    max-height:520px;
    object-fit:contain;
    object-position:center;
    display:block;
    padding:0;
}


.service-content {
  padding: 35px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.service-content h3 {
  font-size: 24px;
  color: var(--primary-color);
  margin-bottom: 18px;
  font-weight: 700;
}

.service-content p {
  font-size: 16px;
  color: var(--text-light);
  margin-bottom: 25px;
  flex-grow: 1;
  line-height: 1.8;
}

.service-btn {
  display: inline-block;
  padding: 14px 32px;
  background-color: var(--secondary-color);
  color: var(--white);
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 16px;
  transition: var(--transition);
  text-align: center;
  align-self: flex-start;
}

.service-btn:hover {
  background-color: #ff7600;
  transform: translateX(-5px);
}

/* ============================================
   قسم التواصل
   ============================================ */
#contact {
  background: linear-gradient(135deg, var(--primary-color) 0%, #0d3d7a 100%);
  color: var(--white);
}

.contact-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

.contact-info h3 {
  font-size: 28px;
  margin-bottom: 30px;
  font-weight: 700;
}

.contact-method {
  display: flex;
  gap: 20px;
  margin-bottom: 30px;
  align-items: flex-start;
}

.contact-icon {
  width: 50px;
  height: 50px;
  background-color: var(--secondary-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}

.contact-details h4 {
  font-size: 18px;
  margin-bottom: 5px;
}

.contact-details p {
  font-size: 16px;
  opacity: 0.9;
}

.contact-details a {
  color: var(--secondary-color);
  text-decoration: none;
  transition: var(--transition);
}

.contact-details a:hover {
  text-decoration: underline;
}

.contact-form {
  background: rgba(255, 255, 255, 0.1);
  padding: 30px;
  border-radius: var(--border-radius);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.contact-form h3 {
  margin-bottom: 20px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  font-size: 14px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
  font-family: 'Cairo', sans-serif;
  font-size: 14px;
  transition: var(--transition);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--secondary-color);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.submit-btn {
  width: 100%;
  padding: 14px;
  background-color: var(--secondary-color);
  color: var(--white);
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  font-family: 'Cairo', sans-serif;
}

.submit-btn:hover {
  background-color: #ff7600;
  transform: translateY(-2px);
}

/* ============================================
   الخريطة
   ============================================ */
.map-container {
  margin-top: 40px;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow-medium);
}

.map-container iframe {
  width: 100%;
  height: 400px;
  border: none;
}

/* ============================================
   الفوتر (Footer)
   ============================================ */
footer {
  background: var(--dark-bg);
  color: var(--white);
  text-align: center;
  padding: 40px 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

footer p {
  margin-bottom: 10px;
  font-size: 14px;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--secondary-color);
  text-decoration: none;
  transition: var(--transition);
}

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

/* ============================================
   زر تبديل اللغة
   ============================================ */
.language-toggle-container {
  display: flex;
  align-items: center;
  margin-right: 20px;
  margin-left: 20px;
  order: 2;
}

.language-toggle-btn {
  background-color: rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.4);
  color: var(--white);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  font-family: 'Cairo', sans-serif;
  display: flex;
  align-items: center;
  gap: 8px;
}

.language-toggle-btn:hover {
  background-color: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.6);
  transform: scale(1.05);
}

.language-toggle-btn:active {
  transform: scale(0.98);
}

.language-text {
  display: inline-block;
}

/* تأثيرات اللغة على الموقع */
body.lang-en {
  direction: ltr;
}

body.lang-en header {
  flex-direction: row;
}

body.lang-en .language-toggle-container {
  margin-left: 20px;
  margin-right: 20px;
}

body.lang-en nav {
  gap: 40px;
}

body.lang-en nav a::after {
  right: auto;
  left: 0;
}

body.lang-en .whatsapp-btn {
  left: auto;
  right: 30px;
}

/* ============================================
   زر WhatsApp العائم
   ============================================ */
.whatsapp-btn {
  position: fixed;
  bottom: 30px;
  left: 30px;
  width: 60px;
  height: 60px;
  background-color: #25D366;
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 28px;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
  transition: var(--transition);
  z-index: 100;
}

.whatsapp-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6);
}

/* ============================================
   الرسوم المتحركة
   ============================================ */
@keyframes slideInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* ============================================
   التجاوب مع الأجهزة المختلفة
   ============================================ */
@media (max-width: 768px) {
  header {
    padding: 10px 20px;
    height: 70px;
    justify-content: space-between;
    flex-wrap: nowrap;
  }

  header .logo img {
    height: 35px;
  }

  .language-toggle-container {
    margin-right: 10px;
    margin-left: auto;
    order: 2;
  }

  .language-toggle-btn {
    padding: 6px 12px;
    font-size: 12px;
  }

  nav {
    gap: 20px;
    flex-direction: column;
    position: absolute;
    top: 70px;
    right: 0;
    background: var(--primary-color);
    width: 100%;
    padding: 20px;
    display: none;
  }

  nav.active {
    display: flex;
  }

  .mobile-menu-toggle {
    display: block;
    order: 3;
    margin-left: 10px;
  }

  body.lang-en nav {
    right: auto;
    left: 0;
  }

  .hero {
    margin-top: 60px;
    height: 70vh;
  }

  .hero-content h1 {
    font-size: 36px;
  }

  .hero-content p {
    font-size: 18px;
  }

  .section {
    padding: 50px 20px;
  }

  .section-title {
    font-size: 32px;
  }

  .about-content {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .about-features {
    grid-template-columns: 1fr;
  }

  .services-grid {
    grid-template-columns: 1fr;
    min-width: 280px;
  }

  .contact-container {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .whatsapp-btn {
    width: 50px;
    height: 50px;
    bottom: 20px;
    left: 20px;
    font-size: 24px;
  }
}

@media (max-width: 480px) {
  header {
    flex-direction: row;
    padding: 10px 15px;
  }

  .language-toggle-container {
    margin: 0 5px;
    width: auto;
  }

  header .logo span {
    display: none;
  }

  .hero-content h1 {
    font-size: 28px;
  }

  .hero-content p {
    font-size: 16px;
  }

  .hero-cta {
    padding: 12px 30px;
    font-size: 14px;
  }

  .section-title {
    font-size: 26px;
  }

  .section {
    padding: 40px 15px;
  }

  nav {
    gap: 15px;
  }

  nav a {
    font-size: 14px;
  }

  .stat-number {
    font-size: 36px;
  }

  
.service-image{
    width:100%;
    height:auto;
    min-height:280px;
    max-height:520px;
    object-fit:contain;
    object-position:center;
    display:block;
    padding:0;
}

}


@media (min-width: 992px){
    .service-image{
        width:100%;
        height:420px;
        object-fit:contain;
    }
}

@media (max-width: 991px){
    .service-image{
        height:320px;
        object-fit:contain;
    }
}

/* تأثيرات التحميل المتتابع */
.lazy-load {
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.lazy-load.loaded {
    opacity: 1;
}

.slide {
    transition: opacity 1s ease-in-out, background-image 0.5s ease-in-out;
}

.slide[data-bg] {
    background-color: #f0f0f0; /* لون مؤقت قبل تحميل الخلفية */
}
