/*
 * Global styles for the Istiqtab bilingual consulting website.
 * The site uses the Tajawal font and brand colours as defined in the brand guidelines.
 */
@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@400;500;700;800&display=swap');

:root {
  /* Brand palette from the visual identity */
  --purple: #6D30FE;
  --green: #14D17D;
  --blue:  #009AFF;
  --cyan:  #02B6F1;
  --dark:  #0b1020;
  --text:  #0f172a;
  --muted: #6b7280;
  --light-bg: #f7f8fc;
  --border: #e5e7eb;
}

* { box-sizing: border-box; }

html {
  font-family: 'Tajawal', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.75;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: #fff;
  color: var(--text);
  direction: rtl;
}

body.en {
  direction: ltr;
}

.container {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 16px;
  padding-right: 16px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #ffffffee;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--dark);
  font-weight: 800;
  font-size: 1.2rem;
}

.logo-shape {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  background: linear-gradient(135deg, var(--purple), var(--green));
}

nav.links a {
  margin-inline: 8px;
  text-decoration: none;
  font-weight: 700;
  color: var(--dark);
  position: relative;
  padding: 4px 0;
}
nav.links a:hover::after {
  content: '';
  position: absolute;
  inset-inline-start: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: var(--purple);
}

.lang-toggle {
  border: 1px solid var(--purple);
  background: transparent;
  color: var(--purple);
  padding: 6px 12px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 700;
}

/* Hero Section */
.hero {
  padding: 72px 0;
  background:
    radial-gradient(60% 50% at 100% 0%, rgba(109, 48, 254, 0.1), transparent 70%),
    radial-gradient(60% 50% at 0% 10%, rgba(2, 182, 241, 0.1), transparent 70%);
  text-align: center;
}

.hero h1 {
  font-size: clamp(28px, 5vw, 44px);
  margin: 0 0 16px;
  font-weight: 800;
}

.hero p {
  font-size: clamp(16px, 2vw, 20px);
  margin: 0 0 24px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.btn {
  display: inline-block;
  padding: 12px 20px;
  border-radius: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}
.btn-primary {
  background: var(--purple);
  color: #fff;
}
.btn-primary:hover {
  background: #5a26d8;
}
.btn-outline {
  border: 2px solid var(--purple);
  color: var(--purple);
  background: transparent;
}
.btn-outline:hover {
  background: var(--purple);
  color: #fff;
}

/* Sections */
.section {
  padding: 56px 0;
}
.section h2 {
  font-size: clamp(22px, 4vw, 32px);
  margin-bottom: 24px;
  font-weight: 800;
  text-align: center;
  color: var(--purple);
}

.section p.lead {
  text-align: center;
  font-size: clamp(16px, 2vw, 20px);
  color: var(--muted);
  margin-bottom: 36px;
}

.grid {
  display: grid;
  gap: 24px;
}

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

.service-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.service-card h3 {
  margin: 0;
  font-size: 1.3rem;
  color: var(--purple);
  font-weight: 700;
}
.service-card p {
  margin: 0;
  color: var(--text);
  flex-grow: 1;
}
.service-card a {
  align-self: flex-start;
}

/* Slider */
.slider {
  position: relative;
  overflow: hidden;
}
.slides {
  display: flex;
  transition: transform 0.6s ease-in-out;
  width: 100%;
}
.slide {
  min-width: 100%;
  flex-shrink: 0;
  padding: 40px 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  background: var(--light-bg);
  border-radius: 20px;
}
.slide img {
  max-width: 45%;
  border-radius: 16px;
  object-fit: cover;
}
.slide .content {
  flex: 1;
  min-width: 280px;
  padding: 0 20px;
}
.slide .content h3 {
  margin-top: 0;
  font-size: clamp(20px, 3vw, 28px);
  color: var(--purple);
  font-weight: 800;
}
.slide .content p {
  font-size: clamp(14px, 2vw, 18px);
  margin-bottom: 16px;
  color: var(--text);
}
.slider-controls {
  display: flex;
  justify-content: center;
  margin-top: 12px;
  gap: 8px;
}
.slider-controls button {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: none;
  background: var(--border);
  cursor: pointer;
}
.slider-controls button.active {
  background: var(--purple);
}

/* Partners grid */
.partners-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 28px;
  align-items: center;
  justify-items: center;
  padding: 0;
}
.partners-grid img {
  max-width: 100%;
  max-height: 60px;
  object-fit: contain;
  filter: grayscale(0%);
}

/* Investor highlights */
.investor-list {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.investor-item {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
}
.investor-item h4 {
  margin-top: 0;
  color: var(--green);
  font-weight: 700;
}
.investor-item p { margin: 0; }

/* Forms */
form .row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}
form input, form select, form textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-family: inherit;
}
form button {
  padding: 12px 20px;
  border-radius: 12px;
  background: var(--purple);
  color: #fff;
  border: none;
  cursor: pointer;
  font-weight: 700;
}
form button:hover {
  background: #5a26d8;
}

/* Footer */
.site-footer {
  background: var(--dark);
  color: #e5e7eb;
  padding: 40px 0;
  margin-top: 60px;
}
.site-footer .grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.site-footer a {
  color: #e5e7eb;
  text-decoration: none;
}
.site-footer a:hover {
  text-decoration: underline;
}

/* Language toggling */
.lang-wrapper .ar { display: inline; }
.lang-wrapper .en { display: none; }
body.en .lang-wrapper .ar { display: none; }
body.en .lang-wrapper .en { display: inline; }

/* Responsive adjustments */
@media (max-width: 768px) {
  .nav { flex-wrap: wrap; gap: 10px; }
  .slide { flex-direction: column; text-align: center; }
  .slide img { max-width: 90%; margin-bottom: 20px; }
}
