@import url("https://fonts.googleapis.com/css2?family=Tajawal:wght@400;500;700;800;900&display=swap");

:root {
  --background: #f8fafc;
  --foreground: #0f172a;
  --primary: #1e3a5f;
  --primary-light: #2563eb;
  --primary-foreground: #ffffff;
  --accent: #25d366;
  --accent-hover: #1faa54;
  --gold: #d4a853;
  --footer: #0f172a;
  --font-tajawal: "Tajawal", sans-serif;
  --font-cairo-fallback: "Segoe UI", "Tahoma", "Arial", system-ui, sans-serif;
  --font-sans: var(--font-tajawal), var(--font-cairo-fallback);
  --ink: var(--foreground);
  --ink-soft: #334155;
  --green: var(--primary);
  --green-deep: var(--footer);
  --green-light: #eaf1f8;
  --paper: #ffffff;
  --muted: #64748b;
  --line: rgba(30, 58, 95, 0.14);
  --shadow: 0 22px 70px rgba(15, 23, 42, 0.12);
}

html,
body {
  font-family: var(--font-sans);
  height: 100%;
  margin: 0;
  direction: rtl;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  background: var(--background);
  color: var(--foreground);
  overflow-x: hidden;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.hero-grid > *,
.about-grid > *,
.whatsapp-grid > *,
.contact-grid > *,
.footer-grid > *,
.cards-grid > *,
.certifications-grid > * {
  min-width: 0;
}

h1 {
  font-size: 1.875rem;
  line-height: 1.2;
  font-weight: 700;
  margin-bottom: 1rem;
}

@media (min-width: 768px) {
  h1 {
    font-size: 2.25rem;
  }
}

@media (min-width: 1024px) {
  h1 {
    font-size: 3rem;
  }
}

h2 {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.33;
  margin-bottom: 0.875rem;
}

@media (min-width: 768px) {
  h2 {
    font-size: 1.875rem;
  }
}

@media (min-width: 1024px) {
  h2 {
    font-size: 2.25rem;
  }
}

h3 {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.4;
}

@media (min-width: 768px) {
  h3 {
    font-size: 1.5rem;
  }
}

h4 {
  font-size: 1.125rem;
  font-weight: 600;
}

p {
  font-size: 0.875rem;
  line-height: 1.6;
}

@media (min-width: 768px) {
  p {
    font-size: 1rem;
  }
}

small {
  font-size: 0.75rem;
}

@media (min-width: 768px) {
  small {
    font-size: 0.875rem;
  }
}

input,
textarea,
select {
  min-height: 3rem;
  padding: 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  font-size: 1rem;
  transition: all 0.2s ease;
  font-family: inherit;
}

@media (min-width: 768px) {
  input,
  textarea,
  select {
    min-height: 3rem;
    padding: 0.75rem 1rem;
  }
}

input::placeholder,
textarea::placeholder {
  color: #9ca3af;
}

textarea {
  padding: 0.5rem;
  resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(30, 58, 95, 0.1);
}

button {
  min-height: 3rem;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

@media (min-width: 768px) {
  button {
    min-height: 2.75rem;
    padding: 0.5rem 1.5rem;
  }
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

button:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

button[type='submit'],
button.btn-primary {
  background-color: var(--primary);
  color: white;
}

button[type='submit']:hover,
button.btn-primary:hover {
  background-color: rgba(30, 58, 95, 0.9);
}

button[type='submit']:active,
button.btn-primary:active {
  transform: scale(0.98);
}

.container-px {
  padding-left: 1rem;
  padding-right: 1rem;
}

@media (min-width: 768px) {
  .container-px {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .container-px {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

.section-py {
  padding-top: 2rem;
  padding-bottom: 2rem;
}

@media (min-width: 768px) {
  .section-py {
    padding-top: 3rem;
    padding-bottom: 3rem;
  }
}

@media (min-width: 1024px) {
  .section-py {
    padding-top: 4rem;
    padding-bottom: 4rem;
  }
}

.card-spacing {
  padding: 1rem;
  border-radius: 0.5rem;
  border: 1px solid #e5e7eb;
}

@media (min-width: 768px) {
  .card-spacing {
    padding: 1.5rem;
  }
}

.error-text {
  color: #dc2626;
  font-size: 0.75rem;
  font-weight: 600;
  display: block;
  margin-top: 0.25rem;
}

@media (min-width: 768px) {
  .error-text {
    font-size: 0.875rem;
  }
}

.error-field {
  border-color: #dc2626 !important;
}

.error-field:focus {
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1) !important;
}

.success-text {
  color: #16a34a;
  font-size: 0.75rem;
  font-weight: 600;
  display: block;
  margin-top: 0.25rem;
}

@media (min-width: 768px) {
  .success-text {
    font-size: 0.875rem;
  }
}

.mobile-sticky-cta {
  margin-inline: -1rem;
  padding: 0.75rem 1rem max(0.75rem, env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid #e5e7eb;
  box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.08);
  position: sticky;
  bottom: 0;
  z-index: 20;
}

.mobile-sticky-cta > button,
.mobile-sticky-cta > a {
  flex: 1 1 0;
  min-height: 2.75rem;
  white-space: normal;
  text-align: center;
}

@media (min-width: 640px) {
  .mobile-sticky-cta {
    margin-inline: 0;
    padding: 1rem 0 0;
    background: transparent;
    border-top: 0;
    box-shadow: none;
    position: static;
  }

  .mobile-sticky-cta > button,
  .mobile-sticky-cta > a {
    flex: initial;
  }
}

input:focus-visible,
textarea:focus-visible,
select:focus-visible,
button:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

@keyframes floatBtnPulse {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-3px) scale(1.05);
  }
}

.floating-pulse {
  animation: floatBtnPulse 2.4s ease-in-out infinite;
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.swiper-pagination-bullet {
  background: var(--primary);
  opacity: 0.3;
}

.swiper-pagination-bullet-active {
  background: var(--primary);
  opacity: 1;
  width: 24px;
  border-radius: 4px;
}

.muted {
  color: #64748b;
}

.disclaimer {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.78);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.125rem;
  margin-top: 2rem;
}

.policy-card {
  max-width: 920px;
  margin: 0 auto;
  padding: clamp(1.5rem, 4vw, 3rem);
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.08);
}

.policy-card h1 {
  margin-top: 0;
  color: var(--primary);
}

.policy-card h2 {
  margin-top: 2rem;
  color: var(--primary);
  font-size: clamp(1.25rem, 2vw, 1.65rem);
}

.policy-card p,
.policy-card li {
  color: #475569;
  line-height: 1.9;
}

.policy-card a {
  color: var(--primary-light);
  font-weight: 700;
}

a[href^="tel:"] {
  direction: ltr;
  unicode-bidi: isolate;
  display: inline-block;
}

.footer {
  padding: 2.5rem 0;
  color: rgba(255, 255, 255, 0.78);
  background: var(--footer);
}

.footer .muted,
.site-footer .muted {
  color: rgba(255, 255, 255, 0.72);
}

.site-header {
  border-bottom-color: var(--line);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.brand,
.nav-links a,
.section-head h2,
.about-copy h2,
.whatsapp-panel h3,
.contact-card h2,
.card h3,
.form-card label,
.form-card input,
.form-card textarea,
.form-card select {
  color: var(--foreground);
}

.nav-links a:hover,
.trust-strip span {
  color: var(--primary);
  background: var(--green-light);
}

.hero {
  background-image:
    linear-gradient(90deg, rgba(15, 23, 42, 0.94), rgba(30, 58, 95, 0.86)),
    url("../assets/images/hero-bg.jpg");
}

.hero-visual {
  background: #ffffff;
  border-color: rgba(226, 232, 240, 0.95);
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.16);
}

.hero-visual img {
  margin-inline: auto;
  background: #ffffff;
}

.section-secondary {
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.94), rgba(30, 58, 95, 0.96)),
    url("../assets/images/why-us.jpg") center/cover fixed;
}

#whatsapp.section-secondary .section-label,
#whatsapp.section-secondary .section-head h2,
#whatsapp.section-secondary .section-head p,
#whatsapp.section-secondary .whatsapp-panel h3,
#whatsapp.section-secondary .whatsapp-panel p,
#whatsapp.section-secondary .check-list li {
  color: #ffffff;
}

  #whatsapp.section-secondary .section-label-light {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.28);
  }

.section-light {
  background:
    linear-gradient(180deg, rgba(234, 241, 248, 0.72), rgba(255, 255, 255, 0)),
    var(--background);
}

.section-label,
.contact-item strong {
  color: var(--primary);
}

.button-primary,
.button-outline,
.hero-flow span,
.card-icon {
  color: var(--footer);
}

.hero-flow div {
  background: rgba(30, 58, 95, 0.34);
}

.about-image {
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.02), rgba(30, 58, 95, 0.2)),
    url("../assets/images/why-us.jpg") center/cover no-repeat;
}

.form-card input,
.form-card textarea,
.form-card select {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.form-card input:focus,
.form-card textarea:focus,
.form-card select:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.14);
}

.site-footer {
  background: var(--footer);
}

.badge-whatsapp,
.floating-whatsapp {
  background: var(--accent);
}

.badge-whatsapp:hover,
.floating-whatsapp:hover {
  background: var(--accent-hover);
}

.floating-whatsapp {
  gap: 0.55rem;
  box-shadow: 0 18px 45px rgba(37, 211, 102, 0.28);
}

.floating-whatsapp .whatsapp-icon {
  width: 1.35rem;
  height: 1.35rem;
  fill: currentColor;
  flex: 0 0 auto;
}

.section-cta {
  display: flex;
  margin-top: 1.5rem;
}

.section-inline-cta {
  margin-top: 1.5rem;
}

.whatsapp-cta {
  gap: 0.6rem;
  color: #ffffff;
  background: var(--accent);
  border: 1px solid rgba(37, 211, 102, 0.22);
  box-shadow: 0 16px 34px rgba(37, 211, 102, 0.24);
}

.whatsapp-cta:hover {
  color: #ffffff;
  background: var(--accent-hover);
}

.whatsapp-cta-light {
  color: var(--footer);
  background: #ffffff;
  border-color: rgba(255, 255, 255, 0.68);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.18);
}

.whatsapp-cta-light:hover {
  color: var(--footer);
  background: #f8fafc;
}

.whatsapp-mark {
  width: 1.35rem;
  height: 1.35rem;
  fill: currentColor;
  flex: 0 0 auto;
}

@media (max-width: 760px) {
  .site-header .nav-links {
    display: flex;
    width: 100%;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 0.5rem;
    overflow-x: auto;
    padding: 0.25rem 0 0.5rem;
    scrollbar-width: none;
  }

  .site-header .nav-links::-webkit-scrollbar {
    display: none;
  }

  .site-header .nav-links a {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .policy-card {
    border-radius: 0.875rem;
  }
}

@media (max-width: 640px) {
  html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
  }

  body {
    width: 100%;
  }

  .container {
    width: min(100% - 24px, 1160px);
  }

  .site-header {
    position: sticky;
  }

  .header-inner {
    min-height: 68px;
    gap: 0.75rem;
  }

  .brand {
    min-width: 0;
    gap: 0.55rem;
  }

  .brand span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .brand-logo {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
  }

  .site-header .nav-links {
    margin-inline: -12px;
    padding-inline: 12px;
  }

  .site-header .nav-links a {
    min-height: 42px;
    padding: 0.55rem 0.85rem;
  }

  .hero {
    min-height: auto;
    padding: 48px 0 44px;
    background-attachment: scroll;
  }

  #whatsapp.section-secondary {
    background-attachment: scroll;
  }

  .hero-copy h1,
  .section-head h2 {
    font-size: clamp(2rem, 10vw, 2.55rem);
    line-height: 1.18;
  }

  .hero-copy,
  .section-head,
  .about-copy,
  .whatsapp-panel,
  .contact-card,
  .card,
  .cert-card,
  #certifications .container > div {
    text-align: center !important;
  }

  .hero-copy p,
  .section-head p,
  .about-copy p,
  .whatsapp-panel p,
  .contact-card p {
    font-size: 0.98rem;
    line-height: 1.85;
  }

  .hero .muted {
    color: rgba(255, 255, 255, 0.88);
  }

  .hero-badge,
  .section-label,
  .section-cta,
  .section-inline-cta {
    margin-inline: auto;
  }

  .feature-list,
  .check-list,
  .trust-strip,
  .contact-badges {
    justify-items: center;
    justify-content: center;
    text-align: center;
  }

  .feature-list li,
  .check-list li {
    padding-right: 0;
    padding-top: 1.35rem;
  }

  .feature-list li::before,
  .check-list li::before {
    top: 0;
    right: 50%;
    transform: translateX(50%);
  }

  .hero-visual {
    padding: 16px;
  }

  .hero-visual img {
    width: 100%;
    max-width: 100% !important;
    height: auto;
  }

  .hero-actions,
  .form-actions,
  .contact-badges,
  .section-cta {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .button,
  .badge,
  .form-actions .button,
  .whatsapp-cta {
    width: 100%;
    min-height: 48px;
    padding-inline: 1rem;
    white-space: normal;
    text-align: center;
  }

  .whatsapp-cta {
    min-height: 54px;
    font-size: 1.05rem;
    border-radius: 16px;
  }

  .whatsapp-mark {
    width: 1.55rem;
    height: 1.55rem;
  }

  .section {
    padding: 52px 0;
  }

  .cards-grid,
  .about-grid,
  .whatsapp-grid,
  .contact-grid,
  .footer-grid,
  .certifications-grid {
    grid-template-columns: 1fr !important;
  }

  .card,
  .whatsapp-panel,
  .form-card,
  .contact-card {
    padding: 20px;
    border-radius: 16px;
  }

  .form-card label {
    gap: 0.45rem;
    margin-bottom: 1rem;
  }

  .form-card input,
  .form-card textarea,
  .form-card select {
    min-height: 48px;
    padding: 0.78rem 0.9rem;
    font-size: 1rem;
  }

  .contact-item {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .contact-map iframe {
    min-height: 300px;
    border-radius: 16px;
  }

  .floating-whatsapp {
    left: max(12px, env(safe-area-inset-left));
    right: auto;
    bottom: max(12px, env(safe-area-inset-bottom));
    max-width: calc(100vw - 24px);
    min-height: 52px;
    padding: 0.78rem 1rem;
    border-radius: 999px;
    font-size: 1rem;
    font-weight: 900;
  }
}

@media (max-width: 380px) {
  .container {
    width: min(100% - 18px, 1160px);
  }

  .hero-copy h1,
  .section-head h2 {
    font-size: 1.85rem;
  }

  .about-copy h2,
  .whatsapp-panel h3,
  .contact-card h2 {
    font-size: 1.55rem;
  }

  .card,
  .whatsapp-panel,
  .form-card,
  .contact-card {
    padding: 16px;
  }

  .brand span {
    max-width: 11rem;
  }
}
