﻿/*
 * JUSTAGAIN— main stylesheet
 *
 * RTL layout, Rubik (body) + Zain (headings / buttons).
 * Sections below follow the page structure: layout → nav → components → pages → footer → breakpoints.
 */

/*  ===== Reset =====*/

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

/*  ===== Design tokens — colors, radii, shadows, max content width =====*/

:root {
  --blue: #1967D2;
  --blue-dark: #174EA6;
  --blue-light: #E8F0FE;
  --green: #34A853;
  --green-dark: #137333;
  --green-light: #E6F4EA;
  --amber: #F9AB00;
  --amber-light: #FEF7E0;
  --text: #202124;
  --text-2: #3C4043;
  --text-3: #5F6368;
  --bg: #FFFFFF;
  --surface: #F8F9FA;
  --surface-2: #F1F3F4;
  --border: #DADCE0;
  --shadow-sm: 0 1px 2px rgba(60,64,67,.3), 0 1px 3px 1px rgba(60,64,67,.12);
  --shadow-md: 0 1px 3px rgba(60,64,67,.3), 0 4px 8px 3px rgba(60,64,67,.12);
  --radius: 16px;
  --radius-sm: 8px;
  --radius-pill: 100px;
  --container: 1200px;
  --nav-h: 64px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Rubik', 'Segoe UI', sans-serif;
  font-weight: 500;
  color: var(--text);
  background: var(--bg);
  direction: rtl;
  line-height: 1.7;
  font-size: 16px;
}

img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }

/*  ===== Layout — centered column, vertical section spacing =====*/

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.section { padding: 88px 0; }
.section-alt { background: var(--surface); }

/*  ===== Flash messages — built in PHP (master.html), success / error banners =====*/

.flash-messages {
  padding: 12px 24px;
  text-align: center;
  font-size: 15px;
}
.flash-notify {
  background: var(--green-light);
  color: var(--green-dark);
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  margin: 8px auto;
  max-width: var(--container);
}
.flash-error {
  background: #FCE8E6;
  color: #C5221F;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  margin: 8px auto;
  max-width: var(--container);
}

/*  ===== Navigation — sticky bar =====*/

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-h);
  gap: 16px;
}
.nav-brand {
  font-size: 20px;
  color: var(--text);
  letter-spacing: -0.5px;
  flex-shrink: 0;
}
.nav-brand span { color: var(--blue); }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-link {
  font-size: 14px;
  color: var(--text-3);
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  transition: background 0.15s, color 0.15s;
}
.nav-link:hover {
  background: var(--surface-2);
  color: var(--text);
}
.nav-link-with-icon {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/*  ===== Buttons — .btn-* variants, .btn-lg, .btn-row for horizontal groups =====*/

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: 'Zain', sans-serif;
  font-size: 14px;
  padding: 10px 24px;
  border-radius: var(--radius-pill);
  border: 2px solid transparent;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s, border-color 0.2s, transform 0.15s;
  white-space: nowrap;
  line-height: 1.4;
}
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: var(--blue);
  color: white;
  border-color: var(--blue);
}
.btn-primary:hover {
  background: var(--blue-dark);
  border-color: var(--blue-dark);
  box-shadow: var(--shadow-sm);
}
.btn-outline {
  background: transparent;
  color: var(--blue);
  border-color: var(--blue);
}
.btn-outline:hover { background: var(--blue-light); }
.btn-green {
  background: var(--green);
  color: white;
  border-color: var(--green);
}
.btn-green:hover {
  background: var(--green-dark);
  border-color: var(--green-dark);
  box-shadow: var(--shadow-sm);
}
.btn-lg { font-size: 15px; padding: 13px 32px; }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; }

/*  ===== Home — hero (landing headline) =====*/

.hero {
  padding: 96px 0 112px;
  background: linear-gradient(155deg, #EEF4FF 0%, #F5F8FF 40%, var(--bg) 70%);
  text-align: center;
  overflow: hidden;
}
.hero-eyebrow {
  display: inline-block;
  background: var(--blue-light);
  color: var(--blue);
  font-size: 12px;
  padding: 5px 16px;
  border-radius: var(--radius-pill);
  margin-bottom: 28px;
  letter-spacing: 0.5px;
}
h1, h2 { font-family: 'Zain', sans-serif; }
.hero h1 {
  font-size: clamp(38px, 6vw, 68px);
  line-height: 1.1;
  color: var(--text);
  margin-bottom: 24px;
  letter-spacing: -1.5px;
}
.hero h1 em { font-style: normal; color: var(--blue); }
.hero-sub {
  font-size: clamp(16px, 2vw, 19px);
  color: var(--text-3);
  max-width: 580px;
  margin: 0 auto 44px;
  line-height: 1.9;
}
.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/*  ===== Section header — label + title + description (features block on home) =====*/

.section-header { text-align: center; margin-bottom: 56px; }
.section-label {
  display: inline-block;
  font-size: 12px;
  color: var(--blue);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.section-title {
  font-size: clamp(26px, 3.5vw, 40px);
  color: var(--text);
  line-height: 1.2;
  letter-spacing: -0.5px;
  margin-bottom: 16px;
}
.section-desc {
  font-size: 17px;
  color: var(--text-3);
  max-width: 540px;
  margin: 0 auto;
  line-height: 1.9;
}

/*  ===== Feature cards — three-column grid on home =====*/

.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  transition: box-shadow 0.2s, transform 0.2s;
}
.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}
.card-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin-bottom: 20px;
}
.card-icon.blue { background: var(--blue-light); }
.card-icon.green { background: var(--green-light); }
.card-icon.amber { background: var(--amber-light); }
.card-icon.blue .fa-solid { color: var(--blue); }
.card-icon.green .fa-solid { color: var(--green-dark); }
.card-icon.amber .fa-solid { color: #C77500; }
.card-icon .fa-solid { line-height: 1; }
.card h3 {
  font-size: 18px;
  color: var(--text);
  margin-bottom: 10px;
  line-height: 1.4;
}
.card p {
  font-size: 15px;
  color: var(--text-3);
  line-height: 1.85;
}

/*  ===== Product — Sahl promo row (text + visual) =====*/

.product-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
  align-items: center;
}
.product-content .badge {
  display: inline-block;
  background: var(--green-light);
  color: var(--green-dark);
  font-size: 12px;
  padding: 4px 14px;
  border-radius: var(--radius-pill);
  margin-bottom: 20px;
  letter-spacing: 0.5px;
}
.product-content h2 {
  font-size: clamp(26px, 3.5vw, 40px);
  color: var(--text);
  line-height: 1.2;
  letter-spacing: -0.5px;
  margin-bottom: 16px;
}
.product-content p {
  font-size: 16px;
  color: var(--text-3);
  line-height: 1.9;
  margin-bottom: 32px;
}
.product-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}
.product-visual img {
  max-width: 340px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}

/*  ===== Intro — story column + "read more" expandable (#more) =====*/

.intro-section { padding: 88px 0; }
.intro-row {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 80px;
  align-items: start;
}
.intro-icon-visual {
  width: 100%;
  max-width: 256px;
  margin: 0 auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  background: linear-gradient(160deg, var(--blue-light) 0%, var(--bg) 55%, var(--amber-light) 100%);
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(72px, 18vw, 112px);
  color: var(--amber);
}
.intro-icon-visual .fa-lightbulb { opacity: 0.92; }
.intro-content .kicker {
  display: inline-block;
  font-size: 12px;
  color: var(--blue);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.intro-content h2 {
  font-size: clamp(26px, 3.5vw, 40px);
  color: var(--text);
  line-height: 1.2;
  letter-spacing: -0.5px;
  margin-bottom: 16px;
}
.intro-content > p {
  font-size: 16px;
  color: var(--text-3);
  line-height: 1.9;
  margin-bottom: 24px;
}
.more-content { display: none; margin-top: 20px; }
.more-content p {
  font-size: 15px;
  color: var(--text-3);
  line-height: 1.9;
  margin-bottom: 14px;
}
.more-content p:last-child { margin-bottom: 0; }
.intro-actions {
  display: flex;
  gap: 12px;
  margin-top: 28px;
  flex-wrap: wrap;
}

/*  ===== About page — hero strip + prose column =====*/

.about-hero {
  padding: 72px 0 56px;
  background: linear-gradient(155deg, #EEF4FF 0%, var(--bg) 70%);
  border-bottom: 1px solid var(--border);
}
.about-hero h1 {
  font-size: clamp(32px, 5vw, 52px);
  color: var(--text);
  letter-spacing: -1px;
  margin-bottom: 16px;
}
.about-hero p {
  font-size: 18px;
  color: var(--text-3);
  max-width: 560px;
  line-height: 1.9;
}
.about-body { max-width: 720px; padding: 64px 0; }
.about-body p {
  font-size: 17px;
  color: var(--text-2);
  line-height: 2;
  margin-bottom: 24px;
}
.about-body p:last-child { margin-bottom: 0; }

/*  ===== Footer — dark strip, contact + social =====*/

.footer {
  background: var(--text);
  color: var(--bg);
  padding: 64px 0 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.footer-col h4 {
  font-size: 13px;
  color: white;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.footer-col p,
.footer-col a {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
  line-height: 2.2;
  display: block;
  transition: color 0.15s;
}
.footer-col a:hover { color: white; }
.footer-inline-icon {
  display: inline-block;
  margin-inline-end: 6px;
  vertical-align: -0.1em;
  width: 1.15em;
  text-align: center;
  color: currentColor;
}
.footer-address { margin-top: 12px; }
.footer-map-link {
  margin-top: 12px;
  display: block;
}
.footer-map-fa {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 180px;
  max-width: 100%;
  min-height: 100px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.45);
  font-size: 2.75rem;
  transition: background 0.2s, color 0.2s;
}
.footer-map-link:hover .footer-map-fa {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.65);
}
.footer-col .social-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.8);
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  margin-top: 8px;
  transition: background 0.2s, color 0.2s;
}
.footer-col .social-link:hover {
  background: rgba(255, 255, 255, 0.16);
  color: white;
}
.footer-bottom {
  text-align: center;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.35);
  padding: 20px 0;
}

/*  ===== Responsive — tablet / phone breakpoints =====*/

/* ≤1024px: narrower grids, stack product + intro columns */
@media (max-width: 1024px) {
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
  .product-row { grid-template-columns: 1fr; gap: 48px; }
  .product-visual { order: -1; }
  .intro-row { grid-template-columns: 1fr; gap: 40px; }
  .intro-image { order: -1; }
}

/* ≤768px: single-column cards, tighter vertical rhythm */
@media (max-width: 768px) {
  .section, .intro-section { padding: 64px 0; }
  .hero { padding: 72px 0 88px; }
  .cards-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .product-visual img { max-width: 100%; }
  .about-body { padding: 48px 0; }
}

/* ≤480px: full-width CTAs, hide nav links (brand only) */
@media (max-width: 480px) {
  .hero-actions { flex-direction: column; align-items: center; }
  .btn-lg { width: 100%; max-width: 300px; }
  .intro-actions { flex-direction: column; }
  .intro-actions .btn { width: 100%; justify-content: center; }
  .nav-link { display: none; }
}
