/* Blog CSS - Matching main site (index.php) styling */

:root {
  --primary: #9333ea;
  --secondary: #ec4899;
  --text: #0f172a;
  --muted: #475569;
  --bg: #ffffff;
  --card: #f8fafc;
}

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

body {
  font-family: 'Cairo', 'Heebo', 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #faf5ff 0%, #f3e8ff 30%, #ede9fe 60%, #f5f3ff 100%);
  min-height: 100vh;
  line-height: 1.7;
}

/* RTL Support */
[dir="rtl"] body {
  font-family: 'Cairo', 'Heebo', system-ui, -apple-system, sans-serif;
}

[dir="ltr"] body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

/* Header - Matching index.php exactly */
header {
  background: rgba(250, 245, 255, 0.8);
  backdrop-filter: blur(10px);
  padding: 15px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid rgba(233, 213, 255, 0.5);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: 900;
  font-size: 24px;
}

.logo img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
}

/* Nav links matching index.php style */
.nav-links {
  display: flex;
  gap: 16px;
  align-items: center;
}

.nav-links a {
  text-decoration: none;
  color: #475569;
  font-weight: 600;
  font-size: 15px;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--primary);
}

/* Language selector matching index.php */
.lang-switcher {
  display: inline-block;
}

.lang-switcher select {
  padding: 8px 14px;
  border: 1px solid #e9d5ff;
  border-radius: 999px;
  background: white;
  color: #4c1d95;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  font-family: inherit;
}

/* CTA Button matching index.php */
.cta-button {
  background: linear-gradient(135deg, #9333ea 0%, #7c3aed 100%);
  color: white;
  padding: 12px 28px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 700;
  font-size: 16px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(147, 51, 234, 0.3);
}

.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(147, 51, 234, 0.4);
  color: white;
}

/* Hero Section */
.hero {
  background: transparent;
  padding: 60px 0 40px;
  border-bottom: none;
  margin-bottom: 0;
}

.hero h1 {
  font-size: 38px;
  font-weight: 800;
  margin: 12px 0;
  line-height: 1.3;
  color: #1a202c;
}

.hero p {
  color: var(--muted);
  font-size: 18px;
  max-width: 700px;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: white;
  border: 1px solid #e9d5ff;
  padding: 10px 24px;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 600;
  color: #7c3aed;
  box-shadow: 0 2px 10px rgba(147, 51, 234, 0.1);
}

.breadcrumbs {
  font-size: 14px;
  color: #64748b;
  margin: 16px 0 0;
}

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

.breadcrumbs a:hover {
  text-decoration: underline;
}

/* Article Content */
.article {
  padding: 40px 0 50px;
  max-width: 800px;
  background: transparent;
}

.article h2 {
  font-size: 26px;
  font-weight: 700;
  margin: 40px 0 16px;
  color: var(--text);
}

.article h3 {
  font-size: 20px;
  font-weight: 600;
  margin: 28px 0 12px;
  color: var(--text);
}

.article p {
  margin-bottom: 16px;
  color: #374151;
}

.article ul, .article ol {
  margin: 16px 0;
  padding-inline-start: 24px;
}

.article li {
  margin-bottom: 10px;
  color: #374151;
}

.article a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

.article a:hover {
  text-decoration: underline;
}

/* Cards */
.card {
  background: linear-gradient(135deg, #faf5ff 0%, #f5f3ff 100%);
  padding: 24px;
  border-radius: 16px;
  margin: 24px 0;
  border: 1px solid #e9d5ff;
}

.card h3 {
  margin-top: 0;
  font-size: 18px;
  color: #4c1d95;
}

.card ul {
  margin-bottom: 0;
}

.bullets {
  margin: 0;
  padding-inline-start: 20px;
}

/* CTA Box */
.cta {
  margin: 40px 0;
  padding: 28px;
  border-radius: 16px;
  background: linear-gradient(135deg, #9333ea 0%, #ec4899 100%);
  color: white;
  font-size: 17px;
}

.cta strong {
  display: block;
  margin-bottom: 8px;
  font-size: 18px;
}

.cta a {
  color: white;
  font-weight: 700;
  text-decoration: none;
  border-bottom: 2px solid rgba(255,255,255,0.5);
}

.cta a:hover {
  border-bottom-color: white;
}

/* FAQ Accordion */
.faq {
  margin-top: 30px;
}

.faq details {
  background: linear-gradient(135deg, #faf5ff 0%, #fff 100%);
  border: 1px solid #e9d5ff;
  padding: 16px 20px;
  border-radius: 12px;
  margin-bottom: 12px;
  transition: box-shadow 0.2s;
}

.faq details:hover {
  box-shadow: 0 4px 12px rgba(147, 51, 234, 0.1);
}

.faq summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 16px;
  color: var(--text);
}

.faq details div {
  margin-top: 12px;
  color: var(--muted);
  line-height: 1.7;
}

/* Grid for Blog Index */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin: 30px 0;
}

.feature-card {
  background: linear-gradient(135deg, #fff 0%, #faf5ff 100%);
  border: 1px solid #e9d5ff;
  padding: 24px;
  border-radius: 16px;
  transition: box-shadow 0.2s, transform 0.2s;
}

.feature-card:hover {
  box-shadow: 0 8px 24px rgba(147, 51, 234, 0.15);
  transform: translateY(-2px);
}

.feature-card h3 {
  margin: 0 0 10px;
  font-size: 18px;
  color: #4c1d95;
}

.feature-card p {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 12px;
}

.feature-card a {
  color: var(--primary);
  font-weight: 700;
  text-decoration: none;
}

.feature-card a:hover {
  text-decoration: underline;
}

/* Language Switcher for blog index */
.lang-switch {
  font-size: 14px;
  color: #475569;
  margin-bottom: 20px;
}

.lang-switch a {
  margin-inline: 8px;
  text-decoration: none;
  color: var(--primary);
  font-weight: 700;
}

.lang-switch a:hover {
  text-decoration: underline;
}

/* Footer - Matching index.php dark footer EXACTLY */
.footer {
  background: #1a202c;
  color: white;
  padding: 60px 0 30px;
  margin-top: 0;
}

.footer .container {
  max-width: 1400px;
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand h3 {
  font-size: 32px;
  font-weight: 900;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-logo-img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.footer-brand p {
  color: #94a3b8;
  line-height: 1.8;
}

.footer-col h4 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 15px;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-col a {
  color: #94a3b8;
  text-decoration: none;
  display: block;
  padding: 8px 0;
  transition: color 0.3s ease;
}

.footer-col a:hover {
  color: var(--secondary);
}

.footer-bottom {
  text-align: center;
  padding-top: 30px;
  border-top: 1px solid #334155;
  color: #64748b;
}

/* Legacy simple footer support */
.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
  margin-bottom: 24px;
}

.footer-links a {
  color: #e2e8f0;
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--secondary);
}

.footer-legal {
  border-top: 1px solid #334155;
  padding-top: 20px;
  margin-top: 20px;
  text-align: center;
}

.footer p {
  color: #94a3b8;
  font-size: 14px;
}

.footer a {
  color: #94a3b8;
  text-decoration: none;
  transition: color 0.2s;
}

.footer a:hover {
  color: var(--secondary);
}

@media (max-width: 900px) {
  .footer-content {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 600px) {
  .footer-content {
    grid-template-columns: 1fr;
  }
}

/* Table styling */
.article table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
}

.article th, .article td {
  text-align: left;
  padding: 12px;
  border-bottom: 1px solid #e2e8f0;
}

/* RTL table alignment */
[dir="rtl"] .article th,
[dir="rtl"] .article td {
  text-align: right;
}

.article th {
  font-weight: 600;
  background: var(--card);
}

/* Responsive */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 28px;
  }
  
  .hero p {
    font-size: 16px;
  }
  
  .article h2 {
    font-size: 22px;
  }
  
  .header-content {
    flex-wrap: wrap;
    gap: 12px;
  }
  
  .nav-links {
    gap: 12px;
  }
  
  .nav-links a {
    font-size: 14px;
  }
  
  .cta {
    padding: 20px;
  }
  
  .cta-button {
    padding: 10px 20px;
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 24px;
  }
  
  .grid {
    grid-template-columns: 1fr;
  }
  
  .nav-links {
    display: none;
  }
}
