/* ============================
   Zingsentek - GitHub Pages
   Shared Stylesheet
   ============================ */

:root {
  --primary: #1a73e8;
  --primary-dark: #1557b0;
  --bg: #f8f9fa;
  --card-bg: #ffffff;
  --text: #202124;
  --text-secondary: #5f6368;
  --border: #dadce0;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.15);
  --max-width: 1100px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Header */
.site-header {
  background: var(--primary);
  color: #fff;
  padding: 1.5rem 1rem;
  text-align: center;
}

.site-header h1 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.site-header p {
  font-size: 0.95rem;
  opacity: 0.9;
}

.site-header a {
  color: #fff;
  text-decoration: underline;
}

/* Navigation breadcrumb */
.breadcrumb {
  max-width: var(--max-width);
  margin: 1rem auto 0;
  padding: 0 1rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.breadcrumb a {
  color: var(--primary);
}

/* Main content */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1rem;
  flex: 1;
}

/* App card grid */
.app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.app-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.app-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.app-card h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.app-card .links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.app-card .links a {
  display: inline-block;
  padding: 0.4rem 0.85rem;
  font-size: 0.85rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  color: var(--primary);
  background: #fff;
  transition: background 0.15s, color 0.15s;
}

.app-card .links a:hover {
  background: var(--primary);
  color: #fff;
  text-decoration: none;
  border-color: var(--primary);
}

.store-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.store-badge {
  display: inline-block;
  line-height: 0;
  transition: opacity 0.15s;
}

.store-badge:hover {
  opacity: 0.8;
  text-decoration: none;
}

.store-badge img {
  height: 40px;
  width: auto;
}

/* Content pages (privacy policy, support) */
.page-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1rem;
  flex: 1;
}

.page-content h1 {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
}

.page-content .last-updated {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin-bottom: 2rem;
}

.page-content h2 {
  font-size: 1.25rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.35rem;
}

.page-content p,
.page-content ul,
.page-content ol {
  margin-bottom: 1rem;
  color: var(--text);
}

.page-content ul,
.page-content ol {
  padding-left: 1.5rem;
}

.page-content li {
  margin-bottom: 0.35rem;
}

/* Support page specifics */
.contact-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow);
}

.contact-card h3 {
  margin-bottom: 0.5rem;
}

.faq-item {
  margin-bottom: 1.5rem;
}

.faq-item h3 {
  font-size: 1rem;
  margin-bottom: 0.35rem;
  color: var(--text);
}

.faq-item p {
  color: var(--text-secondary);
}

/* Back to top / navigation */
.back-link {
  display: inline-block;
  margin-top: 2rem;
  padding: 0.5rem 1rem;
  background: var(--primary);
  color: #fff;
  border-radius: 6px;
  font-size: 0.9rem;
}

.back-link:hover {
  background: var(--primary-dark);
  text-decoration: none;
}

/* Footer */
.site-footer {
  text-align: center;
  padding: 1.5rem 1rem;
  color: var(--text-secondary);
  font-size: 0.85rem;
  border-top: 1px solid var(--border);
  margin-top: auto;
}

.site-footer a {
  color: var(--primary);
}

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

html[dir="rtl"] .breadcrumb {
  direction: rtl;
}

html[dir="rtl"] .page-content ul,
html[dir="rtl"] .page-content ol {
  padding-left: 0;
  padding-right: 1.5rem;
}

html[dir="rtl"] .back-link {
  direction: ltr;
  unicode-bidi: bidi-override;
}

/* Responsive */
@media (max-width: 600px) {
  .site-header h1 {
    font-size: 1.35rem;
  }

  .app-grid {
    grid-template-columns: 1fr;
  }

  .app-card .links {
    flex-direction: column;
  }

  .app-card .links a {
    text-align: center;
  }

  .page-content h1 {
    font-size: 1.4rem;
  }
}
