/* Learn by Heart - Documentation Styles */
/* Matching Flutter app theme: Coral/Orange */

:root {
  /* Primary Colors - Coral Pink */
  --primary: #FF7675;
  --primary-dark: #E17055;
  --primary-light: #FFAB91;

  /* Secondary - Warm Orange */
  --secondary: #E17055;
  --secondary-light: #FFCCBC;

  /* Accent - Peach */
  --accent: #FFB74D;

  /* Light Mode */
  --background: #FFFBFA;
  --surface: #FFFFFF;
  --text-primary: #1A1A1A;
  --text-secondary: #757575;
  --text-hint: #BDBDBD;
  --border: #E0E0E0;

  /* Feedback */
  --correct: #4CAF50;
  --wrong: #E53935;
}

/* Dark Mode */
@media (prefers-color-scheme: dark) {
  :root {
    --background: #1A1A1A;
    --surface: #2A2A2A;
    --text-primary: #F5F5F5;
    --text-secondary: #B0B0B0;
    --text-hint: #757575;
    --border: #404040;
  }
}

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

/* Base */
html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Noto Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--background);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}

/* Container */
.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 24px;
}

/* Header */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--border);
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

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

.logo h1 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--primary);
}

/* Language Selector */
.lang-selector {
  position: relative;
}

.lang-dropdown {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 0.875rem;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
}

.lang-dropdown:hover {
  border-color: var(--primary);
}

.lang-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  min-width: 160px;
  max-height: 300px;
  overflow-y: auto;
  z-index: 100;
}

.lang-menu.show {
  display: block;
}

.lang-option {
  padding: 10px 16px;
  cursor: pointer;
  font-size: 0.875rem;
  color: var(--text-primary);
  transition: background 0.2s;
}

.lang-option:hover {
  background: var(--primary-light);
}

.lang-option.active {
  background: var(--primary);
  color: white;
}

/* Content Sections */
.content-section {
  display: none;
}

.content-section.active {
  display: block;
}

/* Typography */
h2 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 24px;
}

h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-top: 32px;
  margin-bottom: 16px;
}

h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-top: 24px;
  margin-bottom: 12px;
}

p {
  color: var(--text-secondary);
  margin-bottom: 16px;
}

/* Lists */
ul, ol {
  margin-left: 24px;
  margin-bottom: 16px;
  color: var(--text-secondary);
}

li {
  margin-bottom: 8px;
}

/* Links */
a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

/* Cards */
.info-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 24px;
}

.info-card.highlight {
  border-color: var(--primary-light);
  background: linear-gradient(135deg, var(--surface) 0%, rgba(255, 118, 117, 0.05) 100%);
}

/* Contact Card */
.contact-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 16px;
}

.contact-icon {
  width: 48px;
  height: 48px;
  background: var(--primary-light);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.contact-info h4 {
  margin: 0 0 4px 0;
  font-size: 1rem;
}

.contact-info p {
  margin: 0;
  font-size: 0.875rem;
}

/* FAQ */
.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 12px;
  overflow: hidden;
}

.faq-question {
  padding: 16px 20px;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.2s;
}

.faq-question:hover {
  background: rgba(255, 118, 117, 0.05);
}

.faq-question::after {
  content: '+';
  font-size: 1.25rem;
  color: var(--primary);
  transition: transform 0.2s;
}

.faq-item.open .faq-question::after {
  transform: rotate(45deg);
}

.faq-answer {
  display: none;
  padding: 0 20px 16px;
  color: var(--text-secondary);
}

.faq-item.open .faq-answer {
  display: block;
}

/* Effective Date */
.effective-date {
  display: inline-block;
  background: var(--primary-light);
  color: var(--primary-dark);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 24px;
}

/* Footer */
footer {
  margin-top: 48px;
  padding: 24px 0;
  border-top: 1px solid var(--border);
  text-align: center;
}

footer p {
  font-size: 0.875rem;
  color: var(--text-hint);
  margin: 0;
}

/* App Info */
.app-info {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  margin-bottom: 32px;
}

.app-icon {
  width: 80px;
  height: 80px;
  border-radius: 20px;
}

.app-details h3 {
  margin: 0 0 4px 0;
  color: var(--text-primary);
}

.app-details p {
  margin: 0;
  font-size: 0.875rem;
}

/* Responsive */
@media (max-width: 640px) {
  .container {
    padding: 16px;
  }

  header {
    flex-direction: column;
    gap: 16px;
    align-items: flex-start;
  }

  h2 {
    font-size: 1.5rem;
  }

  h3 {
    font-size: 1.125rem;
  }

  .app-info {
    flex-direction: column;
    text-align: center;
  }

  .contact-card {
    flex-direction: column;
    text-align: center;
  }

  .lang-menu {
    right: auto;
    left: 0;
  }
}

/* RTL Support for Arabic */
[dir="rtl"] {
  text-align: right;
}

[dir="rtl"] ul,
[dir="rtl"] ol {
  margin-left: 0;
  margin-right: 24px;
}

[dir="rtl"] .lang-menu {
  right: auto;
  left: 0;
}
