/* ===== Reset & Variables ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --primary:       #e8231a;
  --primary-light: #f07820;
  --primary-dark:  #c01a12;
  --green:         #7dc242;
  --green-dark:    #5a9e2f;
  --orange:        #f07820;
  --text:          #1e293b;
  --muted:         #64748b;
  --light-bg:      #fafafa;
  --white:         #ffffff;
  --border:        #e2e8f0;
  --shadow-sm:     0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md:     0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg:     0 20px 40px rgba(0,0,0,0.12);
  --transition:    0.3s cubic-bezier(0.4,0,0.2,1);
}

html { overflow-x: hidden; }

body {
  font-family: 'Cairo', sans-serif;
  background: var(--light-bg);
  color: var(--text);
  overflow-x: hidden;
  padding-top: 0;
}

body[dir="ltr"] { font-family: 'Roboto', 'Arial', sans-serif; }

/* Fix lang switcher position */
.lang-switcher-5 {
  position: fixed !important;
  bottom: 30px !important;
  top: auto !important;
  z-index: 998 !important;
}

body[dir="rtl"] .lang-switcher-5 { left: 20px !important; right: auto !important; }
body[dir="ltr"] .lang-switcher-5 { right: 20px !important; left: auto !important; }

/* ===== Slider ===== */
.swiper { width: 100%; height: 520px; overflow: hidden; }
.swiper-wrapper { height: 100%; }
.swiper-slide { overflow: hidden; position: relative; height: 520px; width: 100%; }
.swiper-slide img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: brightness(0.95);
  display: block;
}
.swiper-slide.swiper-slide-active img { transform: scale(1); }

.slide-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(to bottom, rgba(0,0,0,0.05) 0%, rgba(0,0,0,0.3) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.slide-text-center {
  text-align: center;
  max-width: 700px;
  padding: 0 30px;
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.slide-text-center .slide-tag {
  display: inline-block;
  background: rgba(255,255,255,0.2);
  border: 1px solid rgba(255,255,255,0.4);
  color: #fff;
  padding: 5px 18px; border-radius: 50px;
  font-size: 0.78rem; font-weight: 700;
  letter-spacing: 2px; text-transform: uppercase;
  margin-bottom: 16px; backdrop-filter: blur(8px);
}

.slide-text-center h5 {
  font-size: 2.6rem; font-weight: 800; color: #fff;
  margin: 0; line-height: 1.25;
  text-shadow: 0 2px 12px rgba(0,0,0,0.3);
}

.slide-text-center p {
  font-size: 1rem; color: rgba(255,255,255,0.88);
  margin: 0; line-height: 1.7;
}

.slide-text-center a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #ffffff !important;
  color: var(--primary) !important;
  padding: 13px 30px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none !important;
  transition: var(--transition);
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
  position: relative;
  z-index: 10;
  margin-top: 10px;
  border: none !important;
  outline: none;
}

.slide-text-center a:hover {
  background: var(--primary) !important;
  color: #fff !important;
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(0,0,0,0.25);
}

.slide-btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.slide-btn-primary {
  background: #fff; color: var(--primary);
  padding: 12px 28px; border-radius: 50px;
  font-weight: 700; font-size: 0.93rem;
  text-decoration: none; transition: var(--transition);
  display: inline-flex; align-items: center; gap: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}
.slide-btn-primary:hover { transform: translateY(-3px); box-shadow: 0 8px 25px rgba(0,0,0,0.2); }

.slide-btn-outline {
  background: transparent; color: #fff;
  padding: 12px 28px; border-radius: 50px;
  font-weight: 700; font-size: 0.93rem;
  text-decoration: none; border: 2px solid rgba(255,255,255,0.6);
  transition: var(--transition);
  display: inline-flex; align-items: center; gap: 8px;
}
.slide-btn-outline:hover { background: rgba(255,255,255,0.15); border-color: #fff; transform: translateY(-3px); }

.swiper-pagination-bullet { background: rgba(255,255,255,0.5); width: 8px; height: 8px; }
.swiper-pagination-bullet-active { background: #fff; width: 24px; border-radius: 4px; }
.swiper-button-next, .swiper-button-prev { color: #fff; }
.swiper-button-next::after, .swiper-button-prev::after { font-size: 1.2rem; font-weight: 900; }

/* ===== Stats Bar ===== */
.stats-bar {
  background: var(--white);
  border-bottom: 3px solid var(--primary);
  display: flex; justify-content: center; flex-wrap: wrap;
  box-shadow: var(--shadow-sm);
}

.stat-item {
  text-align: center; padding: 26px 45px;
  flex: 1; min-width: 130px;
  border-inline-end: 1px solid var(--border);
  transition: var(--transition);
}
.stat-item:last-child { border-inline-end: none; }
.stat-item:hover { background: #f1f5f9; }

.stat-item i {
  font-size: 1.5rem; margin-bottom: 7px; display: block;
  color: var(--orange);
  color: var(--primary);
}
.stat-item .num {
  font-size: 1.9rem; font-weight: 800;
  color: var(--text); display: block; line-height: 1; margin-bottom: 4px;
}
.stat-item .lbl { font-size: 0.78rem; color: var(--muted); font-weight: 600; }

/* ===== Search ===== */
.search-section {
  background: var(--white);
  padding: 32px 20px; text-align: center;
  border-bottom: 1px solid var(--border);
}
.search-section h3 {
  font-size: 0.85rem; color: var(--muted);
  margin-bottom: 14px; font-weight: 600;
  letter-spacing: 0.5px; text-transform: uppercase;
}
.search-container {
  display: flex; max-width: 560px; margin: 0 auto;
  border-radius: 50px; overflow: hidden;
  border: 2px solid var(--border);
  background: var(--light-bg);
  transition: var(--transition);
}
.search-container:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(232,35,26,0.12);
}
.search-container input {
  flex: 1; padding: 13px 22px;
  border: none; background: transparent;
  font-size: 0.93rem; color: var(--text);
  font-family: inherit; outline: none;
}
.search-container input::placeholder { color: var(--muted); }
[dir="rtl"] .search-container input { text-align: right; }
[dir="ltr"] .search-container input { text-align: left; }
.search-container button {
  padding: 13px 24px; border: none;
  background: var(--primary); color: #fff;
  font-size: 0.93rem; font-weight: 700;
  cursor: pointer; transition: var(--transition);
  font-family: inherit;
  display: flex; align-items: center; gap: 7px;
  white-space: nowrap; border-radius: 0 50px 50px 0;
}
[dir="rtl"] .search-container button { border-radius: 50px 0 0 50px; }
.search-container button:hover { background: var(--primary-light); }

/* ===== Departments Section ===== */
.departments-section {
  padding: 65px 5%;
  max-width: 1350px; margin: 0 auto;
}

.section-header { text-align: center; margin-bottom: 50px; }

.section-header .tag {
  display: inline-flex; align-items: center; gap: 6px;
  background: #fff0ef; color: var(--primary);
  border: 1px solid #bfdbfe;
  padding: 5px 16px; border-radius: 50px;
  font-size: 0.78rem; font-weight: 700;
  letter-spacing: 1px; text-transform: uppercase;
  margin-bottom: 14px;
}

.section-header h2 {
  font-size: 2.2rem; font-weight: 800;
  color: var(--text); margin-bottom: 12px; line-height: 1.3;
}

.section-header h2 span { color: var(--primary); }

.section-header p {
  color: var(--muted); font-size: 0.97rem;
  max-width: 460px; margin: 0 auto; line-height: 1.7;
}

/* ===== Cards Grid ===== */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 26px;
}

/* ===== Card - Overlay Style ===== */
.card {
  border-radius: 18px;
  overflow: hidden;
  position: relative;
  height: 320px;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  border: none;
  display: block;
  text-decoration: none;
  transition: var(--transition);
}

.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }

.card-img-wrap {
  position: absolute; inset: 0; z-index: 0;
}

.card-img-wrap img {
  width: 100%; height: 100%; object-fit: cover;
  object-position: top center;
  filter: brightness(.6);
  transition: transform .6s ease, filter .6s ease;
}

.card:hover .card-img-wrap img {
  transform: scale(1.05);
  filter: brightness(.45);
}

.card-no-img {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, var(--green-dark), var(--green));
}

.card-gradient {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(to top, rgba(0,0,0,.85) 0%, rgba(0,0,0,.3) 55%, rgba(0,0,0,.05) 100%);
}

/* Badge */
.card-badge {
  position: absolute; top: 14px; inset-inline-end: 14px;
  z-index: 3;
  background: #e8231a; color: #fff;
  padding: 5px 14px; border-radius: 50px;
  font-size: .8rem; font-weight: 700;
  box-shadow: 0 3px 10px rgba(232,35,26,.4);
}

/* Body */
.card-body {
  position: absolute; bottom: 0; left: 0; right: 0;
  z-index: 2; padding: 20px 22px 22px;
  display: flex; flex-direction: column; gap: 10px;
}

.card-body h3 {
  font-size: 1.1rem; font-weight: 800;
  color: #fff; margin: 0; line-height: 1.35;
  text-shadow: 0 2px 8px rgba(0,0,0,.4);
}

.card-desc {
  font-size: .85rem; color: rgba(255,255,255,.88);
  line-height: 1.65; margin: 0;
  display: -webkit-box; -webkit-line-clamp: 3;
  -webkit-box-orient: vertical; overflow: hidden;
}

.card-btn {
  display: inline-flex; align-items: center; gap: 7px;
  background: #fff; color: var(--primary);
  padding: 9px 20px; border-radius: 50px;
  font-size: .84rem; font-weight: 700;
  align-self: flex-start;
  transition: var(--transition);
  box-shadow: 0 3px 12px rgba(0,0,0,.2);
}

.card:hover .card-btn {
  background: var(--green); color: #fff;
}

/* No Results */
.no-results {
  display: none; text-align: center;
  padding: 70px 20px; color: var(--muted);
  grid-column: 1 / -1;
}
.no-results i { font-size: 3rem; margin-bottom: 12px; display: block; color: var(--border); }

/* ===== CTA ===== */
.cta-section {
  background: linear-gradient(135deg, #2563eb 0%, #0891b2 100%);
  padding: 65px 5%; text-align: center;
  position: relative; overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute; top: -80px; inset-inline-end: -80px;
  width: 300px; height: 300px;
  background: rgba(255,255,255,0.07);
  border-radius: 50%;
}

.cta-section::after {
  content: '';
  position: absolute; bottom: -60px; inset-inline-start: -60px;
  width: 220px; height: 220px;
  background: rgba(255,255,255,0.05);
  border-radius: 50%;
}

.cta-section h2 {
  font-size: 2rem; font-weight: 800;
  color: #fff; margin-bottom: 12px; position: relative;
}

.cta-section p {
  color: rgba(255,255,255,0.85); font-size: 1rem;
  max-width: 450px; margin-inline: auto;
  margin-bottom: 30px; line-height: 1.7; position: relative;
}

.cta-btns {
  display: flex; gap: 14px;
  justify-content: center; flex-wrap: wrap; position: relative;
}

.cta-btn-primary {
  background: #fff; color: var(--primary);
  padding: 13px 30px; border-radius: 50px;
  font-weight: 700; font-size: 0.95rem;
  text-decoration: none; transition: var(--transition);
  display: inline-flex; align-items: center; gap: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}
.cta-btn-primary:hover { transform: translateY(-3px); box-shadow: 0 8px 25px rgba(0,0,0,0.2); }

.cta-btn-outline {
  background: transparent; color: #fff;
  padding: 13px 30px; border-radius: 50px;
  font-weight: 700; font-size: 0.95rem;
  text-decoration: none; border: 2px solid rgba(255,255,255,0.5);
  transition: var(--transition);
  display: inline-flex; align-items: center; gap: 8px;
}
.cta-btn-outline:hover { background: rgba(255,255,255,0.15); border-color: #fff; transform: translateY(-3px); }

/* ===== Footer ===== */
footer {
  background: #1a0a0a;
  color: #cbd5e1;
  padding: 60px 0 0;
  font-family: inherit;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 50px;
  max-width: 1200px; margin: 0 auto; padding: 0 5%;
}

.footer-col h4 {
  color: #fff; font-size: 0.88rem; font-weight: 700;
  margin-bottom: 20px; text-transform: uppercase; letter-spacing: 1px;
  padding-bottom: 10px; border-bottom: 2px solid #2563eb;
  display: inline-block;
}

.footer-brand h3 { color: #fff; font-size: 1.2rem; font-weight: 800; margin-bottom: 6px; }

.footer-brand .tagline {
  color: #60a5fa; font-size: 0.82rem; font-weight: 600;
  display: block; margin-bottom: 14px;
}

.footer-brand p {
  font-size: 0.86rem; color: #94a3b8;
  line-height: 1.8; margin-bottom: 20px; max-width: 290px;
}

.social-icons { display: flex; gap: 9px; flex-wrap: wrap; }

.social-icons a {
  width: 38px; height: 38px; border-radius: 10px;
  background: #334155; color: #94a3b8;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem; transition: var(--transition); text-decoration: none;
}

.social-icons a:hover {
  background: var(--primary); color: #fff;
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(37,99,235,0.35);
}

.footer-links { list-style: none; }
.footer-links li { margin-bottom: 10px; }
.footer-links li a {
  color: #94a3b8; text-decoration: none;
  font-size: 0.86rem; transition: var(--transition);
  display: flex; align-items: center; gap: 8px;
}
.footer-links li a i { color: #2563eb; font-size: 0.65rem; }
.footer-links li a:hover { color: #fff; padding-inline-start: 4px; }

.footer-contact-item {
  display: flex; align-items: flex-start; gap: 11px;
  margin-bottom: 13px; font-size: 0.86rem; color: #94a3b8;
}
.footer-contact-item i { color: #60a5fa; font-size: 0.95rem; margin-top: 2px; flex-shrink: 0; }

.footer-bottom {
  border-top: 1px solid #334155;
  padding: 18px 5%;
  display: flex; justify-content: space-between;
  align-items: center; flex-wrap: wrap; gap: 10px;
  max-width: 1200px; margin: 50px auto 0;
}

.rights { font-size: 0.82rem; color: #64748b; }

.footer-bottom-links { display: flex; gap: 18px; }
.footer-bottom-links a {
  color: #64748b; font-size: 0.82rem;
  text-decoration: none; transition: var(--transition);
}
.footer-bottom-links a:hover { color: #60a5fa; }

/* ===== Responsive ===== */
@media (max-width: 992px) {
  .swiper, .swiper-slide img { height: 420px; }
  .slide-text-center h5 { font-size: 2rem; }
  .stat-item { padding: 22px 28px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 768px) {
  body { padding-top: 0; }
  .swiper, .swiper-slide img { height: 320px; }
  .slide-text-center h5 { font-size: 1.5rem; }
  .slide-text-center p { font-size: 0.88rem; }
  .stat-item { padding: 18px 18px; min-width: 110px; }
  .stat-item .num { font-size: 1.5rem; }
  .departments-section { padding: 45px 4%; }
  .section-header h2 { font-size: 1.7rem; }
  .cards { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; }
  .footer-grid { grid-template-columns: 1fr; gap: 26px; }
  .footer-bottom { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
  .swiper, .swiper-slide img { height: 240px; }
  .slide-text-center h5 { font-size: 1.15rem; }
  .slide-text-center p { display: none; }
  .cards { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .card { height: 260px; }
  .cta-section h2 { font-size: 1.5rem; }
  .footer-bottom-links { flex-wrap: wrap; justify-content: center; }
}

/* ===== Pagination ===== */
.pagination-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin: 40px 0 20px;
  flex-wrap: wrap;
}

.pg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  padding: 0 14px;
  border-radius: 12px;
  background: var(--white);
  color: var(--text);
  font-size: .92rem;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid var(--border);
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.pg-btn:hover {
  background: var(--green);
  color: var(--white);
  border-color: var(--green);
  transform: translateY(-2px);
}

.pg-btn.active {
  background: var(--green);
  color: var(--white);
  border-color: var(--green);
  box-shadow: 0 4px 14px rgba(125,194,66,.35);
}

.pg-btn.disabled {
  opacity: .4;
  cursor: not-allowed;
  pointer-events: none;
}

.pg-dots {
  color: var(--muted);
  font-size: .9rem;
  padding: 0 4px;
}
