/* ========================================
   Tahfeez AI - Stylesheet (matches PDF design)
   ======================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=IBM+Plex+Sans+Arabic:wght@400;500;600;700&display=swap');

:root {
  --bg: #ffffff;
  --text-dark: #1a1a1a;
  --text-body: #5c5c5c;
  --text-muted: #9a9a9a;
  --link-blue: #2f6bff;
  --gold-btn: #fdeec2;
  --input-bg: #f4f4f4;
  --border-light: #efefef;
  --radius-img: 26px;
  --radius-input: 12px;
  --maxw: 1400px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', 'IBM Plex Sans Arabic', sans-serif;
  background: var(--bg);
  color: var(--text-dark);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

body.rtl { direction: rtl; }

/* RTL (Arabic) — right-aligned text & flipped positions */
body.rtl .navbar-inner { direction: ltr; }
body.rtl .hero-content,
body.rtl .section-content { text-align: right; }
body.rtl .contact-section { text-align: center; }
body.rtl .form-group { text-align: right; }
body.rtl .form-group input,
body.rtl .form-group textarea { text-align: right; }
body.rtl .footer-inner { text-align: right; }
body.rtl .footer-contact-item { direction: ltr; text-align: right; }
body.rtl .footer-socials { justify-content: flex-start; }
body.rtl .navbar-center { justify-self: center; }

/* ========================================
   NAVBAR
   ======================================== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(10px);
  height: 80px;
  display: flex;
  align-items: center;
}
.navbar-inner {
  max-width: var(--maxw);
  width: 100%;
  margin: 0 auto;
  padding: 0 60px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}
.navbar-logo { display: flex; align-items: center; text-decoration: none; }
.navbar-logo-img { height: 30px; width: auto; display: block; }

.navbar-center { display: flex; align-items: center; gap: 14px; justify-self: center; }
.lang-btn {
  background: none; border: none;
  font-family: 'Inter', 'IBM Plex Sans Arabic', sans-serif;
  font-size: 15px; font-weight: 500;
  color: var(--text-dark);
  cursor: pointer; padding: 0;
  transition: color 0.2s;
}
.lang-btn:hover { color: var(--link-blue); }
.lang-btn.active { color: var(--link-blue); font-weight: 600; }

.navbar-right { justify-self: end; }
.nav-about {
  font-size: 16px; font-weight: 600;
  color: var(--text-dark); text-decoration: none;
  transition: color 0.2s;
}
.nav-about:hover { color: var(--link-blue); }

/* ========================================
   SECTIONS / HERO
   ======================================== */
.section, .hero {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 70px 60px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 90px;
  align-items: center;
}
.hero { padding-top: 60px; padding-bottom: 90px; }

/* image on the right (default), text left */
.section .section-image, .hero .hero-image { order: 2; }
.section .section-content, .hero .hero-content { order: 1; }

/* reverse: image left, text right */
.section.reverse .section-image { order: 1; }
.section.reverse .section-content { order: 2; }

.hero-title {
  font-size: 32px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0;
  color: var(--text-dark);
  margin-bottom: 22px;
}
.section-title {
  font-size: 32px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0;
  color: var(--text-dark);
  margin-bottom: 20px;
}
.hero-text, .section-text {
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0;
  color: var(--text-body);
}

.section-image, .hero-image {
  border-radius: var(--radius-img);
  overflow: hidden;
  box-shadow: 0 18px 50px rgba(0,0,0,0.07);
}
.section-image img, .hero-image img {
  width: 100%; height: auto; display: block; border-radius: var(--radius-img);
}

/* ========================================
   CONTACT FORM
   ======================================== */
.contact-section {
  max-width: 660px;
  margin: 40px auto 90px;
  padding: 0 24px;
  text-align: center;
}
.contact-title {
  font-size: 34px;
  font-weight: 700;
  margin-bottom: 14px;
  color: var(--text-dark);
}
.contact-subtitle {
  font-size: 16px;
  color: var(--text-body);
  margin-bottom: 40px;
  line-height: 1.55;
  max-width: 480px;
  margin-left: auto; margin-right: auto;
}
.form-group { margin-bottom: 22px; text-align: left; }
.form-group label {
  display: block;
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 8px;
  font-weight: 500;
}
.form-group input, .form-group textarea {
  width: 100%;
  padding: 15px 18px;
  border: none;
  border-radius: var(--radius-input);
  background: var(--input-bg);
  font-family: 'Inter', 'IBM Plex Sans Arabic', sans-serif;
  font-size: 15px;
  color: var(--text-dark);
  outline: none;
  transition: box-shadow 0.2s, background 0.2s;
}
.form-group input::placeholder, .form-group textarea::placeholder { color: #b0b0b0; }
.form-group input:focus, .form-group textarea:focus {
  background: #eee;
  box-shadow: 0 0 0 2px rgba(47,107,255,0.15);
}
.form-group textarea { resize: vertical; min-height: 56px; }

.btn-submit {
  width: 100%;
  padding: 16px;
  background: var(--gold-btn);
  color: #9a8a55;
  border: none;
  border-radius: var(--radius-input);
  font-family: 'Inter', 'IBM Plex Sans Arabic', sans-serif;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: filter 0.2s, transform 0.15s;
  margin-top: 6px;
}
.btn-submit:hover { filter: brightness(0.96); transform: translateY(-1px); }

/* ========================================
   FOOTER
   ======================================== */
.footer {
  border-top: 1px solid var(--border-light);
  padding: 56px 60px 40px;
}
.footer-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 40px;
}
.footer-col-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 22px;
}
.footer-contact-item {
  font-size: 15px;
  color: var(--text-body);
  margin-bottom: 16px;
  line-height: 1.5;
}
.footer-link {
  display: block;
  font-size: 15px;
  color: var(--link-blue);
  text-decoration: none;
  margin-bottom: 14px;
  transition: opacity 0.2s;
}
.footer-link:hover { opacity: 0.7; }

.footer-socials {
  display: flex;
  gap: 16px;
  margin-top: 22px;
}
.social-icon {
  width: 22px; height: 22px;
  color: #b5b5b5;
  transition: color 0.2s;
}
.social-icon:hover { color: var(--text-dark); }
.social-icon svg { width: 100%; height: 100%; display: block; fill: currentColor; }

/* ========================================
   ANIMATIONS
   ======================================== */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ========================================
   RESPONSIVE — TABLET
   ======================================== */
@media (max-width: 900px) {
  .navbar-inner { padding: 0 28px; }
  .section, .hero { grid-template-columns: 1fr; gap: 36px; padding: 48px 28px; }
  /* on mobile: text first, then image — for every section */
  .section .section-content, .section.reverse .section-content,
  .hero .hero-content { order: 1; }
  .section .section-image, .section.reverse .section-image,
  .hero .hero-image { order: 2; }
  .footer { padding: 48px 28px 32px; }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 32px; }
}

/* ========================================
   RESPONSIVE — MOBILE
   ======================================== */
@media (max-width: 600px) {
  .navbar { height: auto; padding: 14px 0; }
  .navbar-inner {
    grid-template-columns: 1fr auto;
    grid-template-areas: "lang lang" "logo about";
    gap: 14px 0;
    padding: 0 20px;
    row-gap: 16px;
  }
  .navbar-center { grid-area: lang; justify-self: start; }
  .navbar-logo { grid-area: logo; }
  .navbar-right { grid-area: about; }

  .hero-title { font-size: 30px; }
  .section-title { font-size: 30px; }
  .hero-text, .section-text { font-size: 16px; }

  .section, .hero { padding: 40px 20px; gap: 28px; }

  .contact-title { font-size: 30px; }
  .contact-section { margin: 24px auto 60px; }

  .footer { padding: 44px 20px 28px; }
  .footer-inner { grid-template-columns: 1fr; gap: 36px; }
}
.form-success {
  padding: 24px;
  font-size: 20px;
  font-weight: 600;
  color: #5a9a6a;
  text-align: center;
}

.footer-copyright {
  max-width: var(--maxw);
  margin: 28px auto 0;
  padding-top: 24px;
  border-top: 1px solid var(--border-light);
  font-size: 14px;
  color: var(--text-muted);
  text-align: center;
}