/* ── common.css – Shared styles for all DullubApps pages ──
   Per-page accent variables are defined in each page's own <style> block:
   --accent, --accent-dark, --accent-light, --tip, --tip-bg, --green, --green-light */

:root {
  --accent:       #b85c0a;
  --accent-dark:  #7a3a04;
  --accent-light: #fdefd8;
  --text:         #1a1a1a;
  --muted:        #6b7280;
  --border:       #e0e4ea;
  --bg:           #ffffff;
  --sidebar-bg:   #f7f8fa;
  --code-bg:      #f3f4f6;
  --warning:      #f59e0b;
  --warning-bg:   #fffbeb;
  --blue:         #2563eb;
  --blue-light:   #dbeafe;
  --orange:       #ea580c;
  --orange-light: #fff7ed;
  --purple:       #7c3aed;
  --purple-light: #ede9fe;
  --green:        #16a34a;
  --green-light:  #dcfce7;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-padding-top: 90px; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 15px; line-height: 1.7; color: var(--text); background: var(--bg);
}

/* ════════════════════════════════════════════════════════
   HEADER (App-Seiten + Manual)
   ════════════════════════════════════════════════════════ */

header {
  background: #fff;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}
.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.logo-title { display: flex; align-items: center; gap: 1rem; }
.logo-link  { display: flex; align-items: center; gap: 0.75rem; text-decoration: none; }
.logo-link h1 { color: #2c3e50; font-size: 1.6rem; transition: color .3s; }
.logo-link:hover h1 { color: var(--accent); }
.logo { height: 44px; width: auto; border-radius: 10px; }

.back-link {
  font-size: 0.85rem; color: #888; text-decoration: none;
  padding: 4px 8px; border-radius: 6px; transition: background .2s;
}
.back-link:hover { background: #f0f0f0; color: #555; }

/* ── Top Navigation ── */
header nav ul { display: flex; list-style: none; gap: 2rem; align-items: center; }
header nav a  { text-decoration: none; color: #2c3e50; font-weight: 500; font-size: 1rem; transition: color .3s; }
header nav a:hover { color: var(--accent); }

/* ── Language Toggle ── */
.language-toggle { display: flex; gap: 0.5rem; }
.lang-btn {
  background: #f0f0f0; border: 1px solid #ddd; color: #2c3e50;
  padding: 0.4rem 0.9rem; cursor: pointer; font-weight: 500;
  font-size: 0.85rem; border-radius: 5px; transition: all .3s;
}
.lang-btn:hover { background: #e8e8e8; }
.lang-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ── Mobile Menu Toggle ── */
.menu-toggle {
  display: none; background: none; border: none;
  font-size: 1.5rem; cursor: pointer; color: #2c3e50;
}

/* ── News Banner ── */
.news-banner {
  display: flex; align-items: center; gap: 1rem;
  padding: 0.85rem 2rem;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  color: #fff; border-radius: 8px; margin: 1rem 2rem;
}
.news-tag {
  background: #fff; color: var(--accent);
  padding: 0.2rem 0.65rem; border-radius: 4px;
  font-weight: 700; font-size: 0.78rem; flex-shrink: 0;
}
.news-banner p { margin: 0; font-size: 0.95rem; font-weight: 500; }

/* ════════════════════════════════════════════════════════
   APP LANDING PAGES
   ════════════════════════════════════════════════════════ */

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

.content-section { background: #fff; padding: 2rem; margin-bottom: 0; }
.section-title { color: #444; font-size: 1.4rem; font-weight: 600; margin-bottom: 1.5rem; }

.image-text-section {
  display: grid; grid-template-columns: auto 1fr;
  gap: 2rem; align-items: start; max-width: 900px; margin: 0 auto;
}
.image-container { width: 200px; flex-shrink: 0; text-align: center; }
.image-container img { width: 100%; height: auto; display: block; }
.image-container.mac { width: 320px; }

.text-content { padding: 0.5rem 0; }
.text-content p {
  color: #333; line-height: 1.8; font-size: 1.05rem;
  margin-bottom: 1rem; text-align: justify; text-justify: inter-word;
}
.text-content ul { color: #444; font-size: 1rem; line-height: 1.8; padding-left: 1.4rem; margin-bottom: 1.2rem; }

/* ── App Store Button ── */
.appstore-btn {
  display: inline-flex; align-items: center; gap: 10px;
  background: #000; color: #fff; padding: 11px 22px;
  border-radius: 10px; text-decoration: none; margin-top: 1.2rem;
  font-size: 0.9rem; transition: opacity .2s;
}
.appstore-btn:hover { opacity: 0.82; }
.appstore-btn .store-icon { font-size: 1.3rem; line-height: 1; }
.appstore-btn .store-label { display: flex; flex-direction: column; line-height: 1.2; }
.appstore-btn .store-sub  { font-size: 0.68rem; opacity: 0.8; }
.appstore-btn .store-name { font-size: 1rem; font-weight: 600; }

.request-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--accent); color: #fff; padding: 11px 22px;
  border-radius: 10px; text-decoration: none; margin-top: 1.2rem;
  font-size: 1rem; font-weight: 600; border: none; cursor: pointer; transition: opacity .2s;
}
.request-btn:hover { opacity: 0.85; }

.bottom-text { text-align: center; padding: 1.5rem 1rem 0.5rem; }
.bottom-text h3 { color: var(--accent); font-size: 1.5rem; }

/* ── Footer ── */
footer {
  text-align: center; padding: 1.5rem 2rem;
  background: #fff; color: #888; font-size: 0.82rem;
  border-top: 1px solid #eee; margin-top: 2rem;
}
footer a { color: #888; text-decoration: none; }
footer a:hover { color: var(--accent); }
.footer-links { display: flex; justify-content: center; gap: 1.5rem; margin-top: 0.5rem; }

/* ════════════════════════════════════════════════════════
   MANUAL PAGES
   ════════════════════════════════════════════════════════ */

body.manual-page {
  display: grid;
  grid-template-columns: 240px 1fr;
  grid-template-rows: auto 1fr;
  min-height: 100vh;
}
body.manual-page header    { grid-column: 1 / -1; }
body.manual-page .sidebar  { grid-column: 1; grid-row: 2; }
body.manual-page main      { grid-column: 2; grid-row: 2; max-width: 900px; padding: 44px 52px 80px; }

/* ── Sidebar ── */
.sidebar {
  position: sticky; top: 0; width: 240px;
  height: 100vh; overflow-y: auto;
  background: var(--sidebar-bg); border-right: 1px solid var(--border); padding: 24px 0 40px;
  z-index: 100;
}
.sidebar .logo {
  padding: 0 18px 18px; border-bottom: 1px solid var(--border); margin-bottom: 14px;
  display: flex; align-items: center; gap: 10px;
}
.sidebar .logo img { width: 40px; height: 40px; border-radius: 9px; flex-shrink: 0; }
.sidebar .logo h1  { font-size: 16px; font-weight: 700; color: var(--accent); }
.sidebar .logo p   { font-size: 11px; color: var(--muted); margin-top: 2px; }
.sidebar ul { list-style: none; }
.sidebar ul li a {
  display: block; padding: 5px 18px; font-size: 13px; color: var(--text);
  text-decoration: none; border-left: 3px solid transparent;
}
.sidebar ul li a:hover { background: var(--accent-light); border-left-color: var(--accent); color: var(--accent); }
.sidebar .section-label {
  padding: 14px 18px 3px; font-size: 10px; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted);
}

/* ── Manual Typography ── */
h2 {
  font-size: 24px; font-weight: 700; margin-top: 52px; margin-bottom: 10px;
  padding-bottom: 10px; border-bottom: 2px solid var(--border); scroll-margin-top: 90px;
}
h2:first-of-type { margin-top: 0; }
h3 { font-size: 17px; font-weight: 600; margin-top: 28px; margin-bottom: 8px; color: var(--accent); scroll-margin-top: 90px; }
h4 { font-size: 13px; font-weight: 600; margin-top: 18px; margin-bottom: 4px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
p  { margin-bottom: 12px; }
ul, ol { margin: 8px 0 14px 22px; }
ul li, ol li { margin-bottom: 4px; }

/* ── Hero ── */
.hero {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  color: #fff; border-radius: 12px; padding: 32px 38px; margin-bottom: 44px;
  display: flex; gap: 28px; align-items: center;
}
.hero-icon { flex-shrink: 0; }
.hero-icon img { width: 80px; height: 80px; border-radius: 18px; box-shadow: 0 4px 16px rgba(0,0,0,0.25); }
.hero h1, .hero-text h1 { font-size: 30px; font-weight: 800; letter-spacing: -0.5px; }
.hero > p, .hero-text p  { font-size: 15px; opacity: 0.85; margin-top: 8px; margin-bottom: 0; }
.hero .meta, .hero-text .meta { margin-top: 18px; display: flex; gap: 18px; font-size: 12px; opacity: 0.7; flex-wrap: wrap; }

/* ── Callouts ── */
.callout {
  border-radius: 8px; padding: 12px 16px; margin: 14px 0;
  display: flex; gap: 10px; align-items: flex-start;
}
.callout.tip  { background: var(--tip-bg);     border-left: 4px solid var(--tip); }
.callout.warn { background: var(--warning-bg); border-left: 4px solid var(--warning); }
.callout.info { background: var(--blue-light); border-left: 4px solid var(--blue); }
.callout .icon { font-size: 17px; flex-shrink: 0; line-height: 1.6; }
.callout p { margin: 0; font-size: 14px; }

/* ── Steps ── */
.steps { counter-reset: step; margin: 14px 0 18px; }
.steps li { counter-increment: step; display: flex; gap: 12px; margin-bottom: 10px; list-style: none; }
.steps li::before {
  content: counter(step); flex-shrink: 0; width: 24px; height: 24px;
  border-radius: 50%; background: var(--accent); color: #fff; font-size: 12px;
  font-weight: 700; display: flex; align-items: center; justify-content: center; margin-top: 3px;
}

/* ── Code / KBD / HR ── */
kbd {
  display: inline-block; padding: 2px 6px; background: var(--code-bg);
  border: 1px solid var(--border); border-radius: 4px;
  font-family: "SF Mono", Menlo, monospace; font-size: 12px; color: var(--text);
}
code { background: var(--code-bg); padding: 1px 5px; border-radius: 4px; font-family: "SF Mono", Menlo, monospace; font-size: 13px; }
hr   { border: none; border-top: 1px solid var(--border); margin: 32px 0; }

/* ── Tables ── */
table { width: 100%; border-collapse: collapse; margin: 12px 0 18px; font-size: 14px; }
th { background: var(--sidebar-bg); text-align: left; padding: 7px 11px; border: 1px solid var(--border); font-weight: 600; }
td { padding: 7px 11px; border: 1px solid var(--border); vertical-align: top; }
tr:nth-child(even) td { background: #fafbfc; }

/* ── Card Grid ── */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin: 14px 0 22px; }
.card { border: 1px solid var(--border); border-radius: 10px; padding: 16px; background: var(--sidebar-bg); }
.card .card-icon { font-size: 24px; margin-bottom: 7px; }
.card h4 { margin: 0 0 3px; text-transform: none; letter-spacing: 0; color: var(--text); font-size: 13px; font-weight: 600; }
.card p  { font-size: 12px; color: var(--muted); margin: 0; }

/* ════════════════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  .header-container { padding: 1rem; }
  .menu-toggle { display: block; order: 3; }
  .logo-title  { order: 1; }
  .language-toggle { order: 2; }

  header nav {
    position: absolute; top: 100%; left: 0; right: 0;
    background: #fff; box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    max-height: 0; overflow: hidden; transition: max-height .3s;
    order: 4; width: 100%;
  }
  header nav.active { max-height: 300px; overflow-y: auto; }
  header nav ul { flex-direction: column; padding: 1rem; gap: 1rem; }

  .news-banner { margin: 0.5rem 1rem; padding: 0.75rem 1rem; }
  .image-text-section { grid-template-columns: 1fr; gap: 1.5rem; }
  .image-container, .image-container.mac { width: 220px; margin: 0 auto; }

  body.manual-page { grid-template-columns: 1fr; }
  body.manual-page .sidebar { display: none; }
  body.manual-page main { grid-column: 1; padding: 20px 16px; }
}

@media print {
  body.manual-page .sidebar { display: none; }
  body.manual-page main { padding: 24px; }
  h2 { page-break-before: always; }
  h2:first-of-type { page-break-before: avoid; }
}
