/* ===== إعدادات عامة ===== */
:root {
  --primary: #1f5a7a;
  --primary-dark: #143f57;
  --primary-light: #e8f2f7;
  --text: #1f2937;
  --muted: #64748b;
  --white: #ffffff;
  --bg: #f7fafc;
  --whatsapp: #25D366;
  --shadow: 0 10px 30px rgba(31, 90, 122, 0.12);
  --shadow-hover: 0 18px 40px rgba(31, 90, 122, 0.22);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Cairo", sans-serif;
  color: var(--text);
  background-color: var(--bg);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

a {
  text-decoration: none;
}

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

.container {
  width: 100%;
  max-width: 1140px;
  margin-inline: auto;
  padding-inline: 20px;
}

/* ===== قسم الترحيب ===== */
.hero {
  position: relative;
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 55%, #2b789f 100%);
  color: var(--white);
  padding: 110px 0 130px;
  overflow: hidden;
  text-align: center;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.09) 1px, transparent 1px);
  background-size: 26px 26px;
}

.hero-shape {
  position: absolute;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  border: 60px solid rgba(255, 255, 255, 0.05);
  top: -180px;
  left: -140px;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-block;
  padding: 8px 22px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 24px;
  background: rgba(255, 255, 255, 0.08);
}

.hero-title {
  font-size: clamp(2.2rem, 6vw, 3.8rem);
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 10px;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

.hero-subtitle {
  font-size: clamp(1.1rem, 3vw, 1.5rem);
  font-weight: 600;
  opacity: 0.95;
  margin-bottom: 22px;
}

.hero-desc {
  max-width: 620px;
  margin-inline: auto;
  font-size: 1.02rem;
  opacity: 0.85;
  margin-bottom: 32px;
}

.hero-btn {
  display: inline-block;
  background: var(--white);
  color: var(--primary);
  font-weight: 700;
  padding: 13px 36px;
  border-radius: 50px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.hero-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

/* ===== قسم الأعمال ===== */
.works {
  padding: 90px 0;
}

.section-heading {
  text-align: center;
  margin-bottom: 50px;
}

.section-tag,
.contact-tag {
  display: inline-block;
  color: var(--primary);
  background: var(--primary-light);
  font-size: 0.9rem;
  font-weight: 700;
  padding: 6px 18px;
  border-radius: 50px;
  margin-bottom: 14px;
}

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  color: var(--primary-dark);
}

.section-subtitle {
  color: var(--muted);
  font-size: 1.05rem;
  margin-top: 8px;
}

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

.work-card {
  background: var(--white);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid rgba(31, 90, 122, 0.07);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.work-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-hover);
}

.work-image {
  height: 220px;
  background: var(--primary-light);
  overflow: hidden;
}

.work-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.work-card:hover .work-image img {
  transform: scale(1.05);
}

.work-body {
  padding: 26px 24px 30px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.work-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--primary-dark);
  margin-bottom: 10px;
}

.work-desc {
  color: var(--muted);
  font-size: 0.97rem;
  margin-bottom: 18px;
}

.work-result {
  background: var(--primary-light);
  border-right: 4px solid var(--primary);
  border-radius: 10px;
  padding: 14px 16px;
  margin-top: auto;
}

.result-label {
  display: block;
  color: var(--primary);
  font-size: 0.85rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.work-result p {
  font-size: 0.92rem;
  color: var(--text);
  line-height: 1.7;
}

/* زر معاينة المشروع */
.work-preview {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  align-self: flex-start;
  margin-top: 20px;
  background: var(--primary);
  color: var(--white);
  font-weight: 700;
  font-size: 0.92rem;
  padding: 10px 22px;
  border-radius: 8px;
  transition: background 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.work-preview svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}

.work-preview:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(31, 90, 122, 0.28);
}

.work-preview:focus-visible {
  outline: 3px solid rgba(31, 90, 122, 0.35);
  outline-offset: 3px;
}

/* ===== قسم التواصل ===== */
.contact {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: var(--white);
  padding: 80px 0;
  text-align: center;
}

.contact .contact-tag {
  background: rgba(255, 255, 255, 0.15);
  color: var(--white);
}

.contact-title {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 800;
}

.contact-desc {
  max-width: 600px;
  margin: 12px auto 30px;
  opacity: 0.85;
}

.email-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--white);
  color: var(--primary-dark);
  font-weight: 700;
  font-size: 1.05rem;
  padding: 14px 28px;
  border-radius: 50px;
  direction: ltr;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.email-link:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.email-icon {
  width: 22px;
  height: 22px;
  color: var(--primary);
}

.whatsapp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 18px;
  background: var(--whatsapp);
  color: var(--white);
  font-weight: 700;
  font-size: 1.05rem;
  padding: 14px 32px;
  border-radius: 50px;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.whatsapp-btn:hover {
  transform: translateY(-3px);
  background: #1ebe5d;
  box-shadow: 0 10px 25px rgba(37, 211, 102, 0.4);
}

.whatsapp-icon {
  width: 26px;
  height: 26px;
}

/* ===== التذييل ===== */
.footer {
  background: var(--primary-dark);
  color: rgba(255, 255, 255, 0.75);
  text-align: center;
  padding: 22px 0;
  font-size: 0.9rem;
}

/* ===== الاستجابة للجوال ===== */
@media (max-width: 768px) {
  .hero {
    padding: 80px 0 100px;
  }

  .works {
    padding: 65px 0;
  }

  .work-image {
    height: 200px;
  }

  .contact {
    padding: 65px 0;
  }

  .email-link {
    font-size: 0.9rem;
    padding: 12px 20px;
  }
}

@media (max-width: 480px) {
  .hero-badge {
    font-size: 0.8rem;
    padding: 6px 16px;
  }

  .hero-desc {
    font-size: 0.92rem;
  }

  .work-body {
    padding: 22px 18px 26px;
  }

  .email-link {
    width: 100%;
    justify-content: center;
  }

  .whatsapp-btn {
    width: 100%;
  }
}
