/* ===== Husam's App Global — Shared Styles ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, sans-serif;
  background: #f5f7fa;
  color: #1a1a2e;
  line-height: 1.6;
}

a { color: #1a73e8; text-decoration: none; }
a:hover { text-decoration: underline; }

/* ===== Navigation ===== */
.site-nav {
  background: #1a73e8;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.site-nav .nav-brand {
  color: white;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.05rem;
}

.site-nav .nav-links {
  display: flex;
  gap: 1.25rem;
}

.site-nav .nav-links a {
  color: white;
  text-decoration: none;
  font-size: 0.9rem;
  opacity: 0.8;
  transition: opacity 0.2s;
  padding: 0.25rem 0;
}

.site-nav .nav-links a:hover,
.site-nav .nav-links a.active {
  opacity: 1;
  text-decoration: none;
}

.site-nav .nav-links a.nav-repo {
  background: #e53935;
  color: white;
  opacity: 1;
  padding: 0.25rem 0.75rem;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.82rem;
  transition: background 0.2s;
}

.site-nav .nav-links a.nav-repo:hover {
  background: #c62828;
}

/* ===== Hero ===== */
.hero {
  background: linear-gradient(135deg, #1a73e8 0%, #0d47a1 100%);
  color: white;
  text-align: center;
  padding: 2.5rem 1.5rem 2rem;
}

.hero h1 {
  font-size: 1.85rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.hero p {
  font-size: 1rem;
  opacity: 0.9;
  max-width: 550px;
  margin: 0 auto;
}

/* ===== Container ===== */
.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

/* ===== Section Title ===== */
.section-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: #1a1a2e;
}

/* ===== Cards ===== */
.card {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  margin-bottom: 1.5rem;
}

/* ===== Badges ===== */
.badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-blue { background: #e8f0fe; color: #1a73e8; }
.badge-green { background: #e6f4ea; color: #137333; }
.badge-gray { background: #f0f0f0; color: #555; }
.badge-orange { background: #fef3e2; color: #c65d00; }

/* ===== Steps ===== */
.steps { list-style: none; }

.step {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  align-items: flex-start;
}

.step:last-child { margin-bottom: 0; }

.step-number {
  width: 36px;
  height: 36px;
  background: #1a73e8;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.step-content h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.step-content p {
  font-size: 0.9rem;
  color: #555;
}

.step-content code {
  background: #f0f4f8;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.82rem;
  color: #1a73e8;
  word-break: break-all;
  font-family: 'SF Mono', 'Fira Code', monospace;
}

/* ===== Tip box ===== */
.tip-box {
  background: #e8f0fe;
  border-left: 4px solid #1a73e8;
  border-radius: 0 8px 8px 0;
  padding: 1rem 1.25rem;
  margin: 1rem 0;
  font-size: 0.9rem;
  color: #1a1a2e;
}

.tip-box strong {
  color: #1a73e8;
}

/* ===== Screenshot placeholder ===== */
.screenshot {
  background: #e0e5ec;
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
  color: #888;
  font-size: 0.85rem;
  margin: 0.75rem 0;
  border: 2px dashed #c0c8d4;
}

.screenshot svg {
  display: block;
  margin: 0 auto 0.5rem;
}

/* ===== Contact section ===== */
.contact-section {
  text-align: center;
  padding: 2rem 1.5rem 1rem;
}

.contact-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #1a73e8;
  color: white;
  text-decoration: none;
  padding: 0.75rem 1.75rem;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  box-shadow: 0 2px 12px rgba(26,115,232,0.3);
  transition: background 0.2s, transform 0.1s;
}

.contact-btn:hover {
  background: #1565c0;
  text-decoration: none;
  transform: translateY(-1px);
}

.contact-email {
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: #888;
}

/* ===== Footer ===== */
footer {
  text-align: center;
  padding: 2rem 1.5rem;
  color: #888;
  font-size: 0.8rem;
  border-top: 1px solid #e0e0e0;
}

footer a {
  color: #1a73e8;
  text-decoration: none;
}

/* ===== Mono text ===== */
.mono {
  font-family: 'SF Mono', 'Fira Code', monospace;
}

/* ===== Language Switcher ===== */
.lang-switcher {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  margin-left: 1rem;
}

.lang-flag {
  cursor: pointer;
  width: 26px;
  height: 18px;
  border-radius: 3px;
  border: 2px solid transparent;
  opacity: 0.6;
  transition: opacity 0.2s, border-color 0.2s, transform 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 0;
  background: none;
}
.lang-flag .lang-flag-img {
  width: 100%;
  height: 100%;
  display: block;
}

.lang-flag:hover { opacity: 1; transform: scale(1.1); }
.lang-flag.active { opacity: 1; border-color: white; }

/* ===== RTL Support ===== */
html[dir="rtl"] body {
  direction: rtl;
  text-align: right;
}

html[dir="rtl"] .site-nav { flex-direction: row-reverse; }
html[dir="rtl"] .nav-links { flex-direction: row-reverse; }
html[dir="rtl"] .lang-switcher { margin-left: 0; margin-right: 1rem; }
html[dir="rtl"] .step { flex-direction: row-reverse; }
html[dir="rtl"] .step-visual { flex-direction: row-reverse; }
html[dir="rtl"] .tip-box { border-left: none; border-right: 4px solid #1a73e8; border-radius: 8px 0 0 8px; }
html[dir="rtl"] .error-msg { border-left: none; border-right: 4px solid #c65d00; border-radius: 8px 0 0 8px; }
html[dir="rtl"] .contact-btn { flex-direction: row-reverse; }
html[dir="rtl"] .app-name-cell { flex-direction: row-reverse; }
html[dir="rtl"] .profile-link { flex-direction: row-reverse; }
html[dir="rtl"] .profile-link:hover { transform: translateX(-4px); }
html[dir="rtl"] .profile-link .link-info { text-align: right; }
html[dir="rtl"] .profile-link .arrow { margin-left: 0; margin-right: auto; }
html[dir="rtl"] .intro-section { flex-direction: row-reverse; }
html[dir="rtl"] .dl-btn { flex-direction: row-reverse; }
html[dir="rtl"] .role-tag { flex-direction: row-reverse; }
html[dir="rtl"] .about-card blockquote { border-left: none; border-right: 3px solid #1a73e8; padding-left: 0; padding-right: 1rem; }
html[dir="rtl"] .app-table thead th { text-align: right; }

/* ===== Responsive ===== */
@media (max-width: 600px) {
  .hero h1 { font-size: 1.4rem; }
  .site-nav { flex-direction: column; gap: 0.5rem; }
  html[dir="rtl"] .site-nav { flex-direction: column; }
  .container { padding: 1.5rem 1rem; }
  .lang-switcher { margin-left: 0; }
  html[dir="rtl"] .lang-switcher { margin-right: 0; }
}
