/* ============================================================
   TextSplit Pro — style.css
   Aesthetic: Clean industrial-utility with warm amber accents
   Fonts: Syne (display) + DM Sans (body)
   ============================================================ */

/* ---------- CSS Variables ---------- */
:root {
  --bg: #f5f3ef;
  --bg-card: #ffffff;
  --bg-card-alt: #faf9f7;
  --bg-input: #f0ede8;
  --border: #e2ddd6;
  --border-focus: #d4a853;
  --text-primary: #1a1714;
  --text-secondary: #6b6057;
  --text-muted: #9e948a;
  --accent: #d4a853;
  --accent-dark: #b8893a;
  --accent-light: #f7e9c8;
  --success: #3d9970;
  --success-dark: #2d7a57;
  --success-bg: #e8f5ee;
  --danger: #c0392b;
  --danger-bg: #fbeae8;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.07), 0 2px 6px rgba(0,0,0,0.04);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.09), 0 4px 12px rgba(0,0,0,0.05);
  --radius: 14px;
  --radius-sm: 8px;
  --radius-lg: 20px;
  --font-display: 'Syne', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --transition: 0.22s ease;
}

.dark-mode {
  --bg: #0f0e0c;
  --bg-card: #1c1a17;
  --bg-card-alt: #221f1b;
  --bg-input: #2a2621;
  --border: #332f28;
  --border-focus: #d4a853;
  --text-primary: #f0ece5;
  --text-secondary: #a89d90;
  --text-muted: #6b6057;
  --accent: #d4a853;
  --accent-dark: #e8ba6a;
  --accent-light: #2a2210;
  --success: #52b788;
  --success-dark: #74c69d;
  --success-bg: #0f2a1e;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.25);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.3);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.4);
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  font-size: 15px;
  transition: background var(--transition), color var(--transition);
  min-height: 100vh;
}

/* ---------- Utility ---------- */
.hidden { display: none !important; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
strong { font-weight: 600; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: background var(--transition), border-color var(--transition);
}

.header-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
  height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--text-primary);
  text-decoration: none;
}
.logo-icon { font-size: 1.4rem; }
.logo-text { letter-spacing: -0.02em; }
.logo-text strong { color: var(--accent); }

.header-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.header-nav a {
  font-size: 0.875rem;
  color: var(--text-secondary);
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: color var(--transition);
}
.header-nav a:hover { color: var(--accent); text-decoration: none; }

.theme-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 6px 14px;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
}
.theme-toggle:hover {
  background: var(--accent-light);
  border-color: var(--accent);
  color: var(--accent);
}
.toggle-icon { font-size: 0.95rem; }

/* ---------- Ad Spaces ---------- */
.ad-banner-wrap {
  max-width: 1140px;
  margin: 20px auto 0;
  padding: 0 24px;
}

.ad-placeholder {
  background: var(--bg-card);
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.ad-banner {
  width: 100%;
  min-height: 90px;
  padding: 18px;
}

.ad-square {
  width: 100%;
  min-height: 250px;
  margin-bottom: 20px;
}

.ad-label { font-size: 0.75rem; font-weight: 600; }
.ad-size { font-size: 0.7rem; opacity: 0.65; }

/* ---------- Hero ---------- */
.hero {
  max-width: 1140px;
  margin: 0 auto;
  padding: 52px 24px 36px;
}

.hero-inner {
  text-align: center;
  max-width: 680px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-block;
  background: var(--accent-light);
  color: var(--accent-dark);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 50px;
  margin-bottom: 20px;
  border: 1px solid rgba(212, 168, 83, 0.3);
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin-bottom: 18px;
}

.hero-title .accent {
  color: var(--accent);
  position: relative;
  display: inline-block;
}

.hero-sub {
  font-size: 1.05rem;
  color: var(--text-secondary);
  font-weight: 300;
  line-height: 1.7;
  max-width: 540px;
  margin: 0 auto;
}

/* ---------- Main Layout ---------- */
.main-layout {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px 60px;
}

.main-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 24px;
  align-items: start;
}

/* ---------- Cards ---------- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
  transition: background var(--transition), border-color var(--transition), box-shadow var(--transition);
  /* Prevent any child (e.g. long filename) from overflowing the card */
  min-width: 0;
  overflow: hidden;
  word-break: break-word;
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 22px;
}

.step-badge {
  width: 40px;
  height: 40px;
  background: var(--accent);
  color: #fff;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.01em;
  flex-shrink: 0;
}

.accent-badge {
  background: var(--accent-light);
  font-size: 1.1rem;
  border: 1px solid rgba(212,168,83,0.3);
}

.card-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.card-sub {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 400;
}

/* ---------- Drop Zone ---------- */
.drop-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 40px 24px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  background: var(--bg-card-alt);
  position: relative;
  overflow: hidden;
}

.drop-zone::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(212,168,83,0.06) 0%, transparent 70%);
  opacity: 0;
  transition: opacity var(--transition);
}

.drop-zone:hover::before,
.drop-zone.drag-over::before {
  opacity: 1;
}

.drop-zone:hover,
.drop-zone.drag-over {
  border-color: var(--accent);
  background: var(--accent-light);
  transform: scale(1.005);
  box-shadow: var(--shadow-md);
}

.drop-zone.drag-over {
  animation: pulse-border 1s ease infinite;
}

@keyframes pulse-border {
  0%, 100% { border-color: var(--accent); }
  50% { border-color: var(--accent-dark); box-shadow: 0 0 0 4px rgba(212,168,83,0.15); }
}

.drop-icon {
  font-size: 3rem;
  margin-bottom: 14px;
  display: block;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.drop-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.drop-sub {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.hidden-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

/* ---------- Mode Tabs ---------- */
.mode-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}

.mode-tab {
  flex: 1;
  min-width: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card-alt);
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 0.83rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}

.mode-tab .mode-icon { font-size: 1rem; }

.mode-tab:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
}

.mode-tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 3px 10px rgba(212,168,83,0.3);
}

/* ---------- Mode Panels ---------- */
.mode-panel { display: none; }
.mode-panel.active { display: block; animation: fadeUp 0.25s ease; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Form Controls ---------- */
.form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.input-group {
  display: flex;
  align-items: center;
  background: var(--bg-input);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: all var(--transition);
}

.input-group:focus-within {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(212,168,83,0.15);
  background: var(--bg-card);
}

.form-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  padding: 12px 14px;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-primary);
  min-width: 0;
}

.form-input::placeholder { color: var(--text-muted); font-weight: 400; }

.input-suffix {
  padding: 12px 14px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  border-left: 1px solid var(--border);
  background: var(--bg-card-alt);
}

.hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 8px;
  line-height: 1.5;
}

/* ---------- Stats Grid ---------- */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.stat-item {
  background: var(--bg-card-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: all var(--transition);
}

.stat-item:hover {
  border-color: var(--accent);
  background: var(--accent-light);
}

.stat-icon { font-size: 1.2rem; }

.stat-value {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.4rem;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.02em;
}

/* ---------- Progress Bar ---------- */
.progress-wrap {
  margin-bottom: 20px;
  animation: fadeUp 0.3s ease;
}

.progress-track {
  width: 100%;
  height: 8px;
  background: var(--bg-input);
  border-radius: 50px;
  overflow: hidden;
  margin-bottom: 8px;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-dark));
  border-radius: 50px;
  transition: width 0.15s ease;
  position: relative;
  overflow: hidden;
}

.progress-bar::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  animation: shimmer 1.2s ease infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(200%); }
}

.progress-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
  text-align: center;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.93rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  letter-spacing: 0.01em;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.15);
  opacity: 0;
  transition: opacity var(--transition);
}

.btn:hover::before { opacity: 1; }

.btn:active { transform: scale(0.97); }

.btn-icon { font-size: 1rem; }

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff;
  box-shadow: 0 4px 14px rgba(212,168,83,0.35);
}

.btn-primary:hover {
  box-shadow: 0 6px 20px rgba(212,168,83,0.45);
  transform: translateY(-1px);
}

.btn-primary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-success {
  background: linear-gradient(135deg, var(--success), var(--success-dark));
  color: #fff;
  box-shadow: 0 4px 14px rgba(61,153,112,0.3);
}

.btn-success:hover {
  box-shadow: 0 6px 20px rgba(61,153,112,0.4);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--text-secondary);
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
}

.action-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.action-buttons .btn {
  flex: 1;
  min-width: 160px;
}

/* ---------- Output File List ---------- */
.output-list {
  margin-top: 22px;
  animation: fadeUp 0.3s ease;
}

.output-list-title {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.output-file-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 280px;
  overflow-y: auto;
  padding-right: 4px;
}

.output-file-list::-webkit-scrollbar { width: 4px; }
.output-file-list::-webkit-scrollbar-track { background: var(--bg-input); border-radius: 4px; }
.output-file-list::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

.output-file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: var(--bg-card-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 0.84rem;
  transition: all var(--transition);
  animation: slideIn 0.2s ease;
}

.output-file-item:hover {
  border-color: var(--success);
  background: var(--success-bg);
}

.output-file-name {
  font-weight: 600;
  color: var(--text-primary);
  flex: 1;
}

.output-file-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.output-file-dl {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--success);
  cursor: pointer;
  background: var(--success-bg);
  border: 1px solid rgba(61,153,112,0.25);
  border-radius: 6px;
  padding: 3px 10px;
  transition: all var(--transition);
}

.output-file-dl:hover {
  background: var(--success);
  color: #fff;
  border-color: var(--success);
}

/* ---------- Sidebar ---------- */
.sidebar-column {
  position: sticky;
  top: 80px;
}

.sidebar-section-title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  margin-bottom: 18px;
}

/* ---------- How to Use ---------- */
.how-to-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.how-to-list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.how-num {
  width: 26px;
  height: 26px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 800;
  flex-shrink: 0;
  margin-top: 1px;
}

.how-to-list strong {
  display: block;
  font-size: 0.88rem;
  color: var(--text-primary);
  margin-bottom: 3px;
}

.how-to-list p {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ---------- Features List ---------- */
.features-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.features-list li {
  font-size: 0.84rem;
  color: var(--text-secondary);
  padding: 7px 0;
  border-bottom: 1px solid var(--border);
  transition: color var(--transition);
}

.features-list li:last-child { border-bottom: none; }
.features-list li:hover { color: var(--text-primary); }

/* ---------- Toast Notifications ---------- */
.toast-container {
  position: fixed;
  bottom: 28px;
  right: 24px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 18px;
  min-width: 260px;
  max-width: 340px;
  box-shadow: var(--shadow-lg);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-primary);
  pointer-events: all;
  animation: toastIn 0.35s cubic-bezier(0.34,1.56,0.64,1);
  border-left: 4px solid var(--accent);
}

.toast.toast-success { border-left-color: var(--success); }
.toast.toast-error { border-left-color: var(--danger); }

@keyframes toastIn {
  from { opacity: 0; transform: translateX(40px) scale(0.9); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}

.toast-icon { font-size: 1.1rem; flex-shrink: 0; }
.toast-msg { flex: 1; line-height: 1.4; }

.toast-out {
  animation: toastOut 0.3s ease forwards;
}

@keyframes toastOut {
  to { opacity: 0; transform: translateX(40px) scale(0.9); }
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 28px 24px;
  text-align: center;
  transition: background var(--transition), border-color var(--transition);
}

.footer-inner {
  max-width: 1140px;
  margin: 0 auto;
}

.footer-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.footer-links a {
  font-size: 0.82rem;
  color: var(--text-secondary);
  font-weight: 500;
  transition: color var(--transition);
}
.footer-links a:hover { color: var(--accent); text-decoration: none; }
.footer-sep { color: var(--border); font-size: 0.9rem; }

.footer-privacy {
  font-size: 0.83rem;
  color: var(--text-secondary);
  font-weight: 500;
  margin-bottom: 6px;
}

.footer-copy {
  font-size: 0.76rem;
  color: var(--text-muted);
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .main-grid {
    grid-template-columns: 1fr;
  }

  .sidebar-column {
    position: static;
    order: 2;
  }

  .tool-column {
    order: 1;
  }

  .ad-square {
    min-height: 180px;
  }
}

@media (max-width: 640px) {
  .header-nav a { display: none; }

  .hero {
    padding: 36px 16px 24px;
  }

  .main-layout {
    padding: 0 16px 48px;
  }

  .card {
    padding: 20px;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .mode-tabs {
    flex-direction: column;
  }

  .mode-tab {
    min-width: unset;
  }

  .action-buttons {
    flex-direction: column;
  }

  .action-buttons .btn {
    min-width: unset;
    flex: none;
    width: 100%;
  }
}

@media (max-width: 400px) {
  .hero-title { font-size: 1.8rem; }
}

/* ============================================================
   SEO OPTIMIZATION ADDITIONS — v2.0
   New components: skip link, breadcrumb, hero CTAs, trust
   badges, mobile nav, SEO content, FAQ, footer grid, etc.
   ============================================================ */

/* ---------- Skip Link — hidden entirely (removed from HTML) ---------- */
.skip-link { display: none; }

/* ---------- Mobile Header Right (theme + hamburger) ---------- */
.mobile-header-right {
  display: none;
  align-items: center;
  gap: 8px;
}
.theme-toggle-mobile {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 7px 12px;
  font-size: 1rem;
  cursor: pointer;
  transition: all var(--transition);
  /* Remove any browser default button dot/indicator */
  -webkit-appearance: none;
  appearance: none;
  outline: none;
}
.theme-toggle-mobile:hover {
  background: var(--accent-light);
  border-color: var(--accent);
}

/* ---------- Mobile Nav (sticky, drops below sticky header) ---------- */
.mobile-nav {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 12px 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 0;
  /* Sticky behaviour comes from .site-header being sticky — mobile-nav is inside it */
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.mobile-nav a {
  display: block;
  padding: 11px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.93rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--transition), padding-left var(--transition);
}
.mobile-nav a:last-child { border-bottom: none; }
.mobile-nav a:hover { color: var(--accent); padding-left: 6px; }

/* ---------- Mobile Menu Hamburger Button ---------- */
.mobile-menu-btn {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 7px 5px;
  border-radius: var(--radius-sm);
  transition: background var(--transition);
  /* Suppress any browser outline dot */
  -webkit-appearance: none;
  appearance: none;
  outline: none;
}
.mobile-menu-btn:hover { background: var(--bg-input); }
.mobile-menu-btn span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all var(--transition);
}

@media (max-width: 640px) {
  /* Show hamburger + mobile theme toggle */
  .mobile-header-right { display: flex; }
  /* Hide desktop nav links and desktop theme toggle */
  .header-nav { display: none; }
}

/* ---------- File Info Box — overflow fix (mobile long filenames) ---------- */
.file-info-box {
  margin-top: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-card-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  transition: all var(--transition);
  animation: slideIn 0.3s ease;
  /* These three lines are the core fix */
  width: 100%;
  min-width: 0;
  overflow: hidden;
  box-sizing: border-box;
}
.file-info-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  line-height: 1;
}
.file-info-details {
  /* min-width:0 is essential — without it a flex child won't shrink below content width */
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
}
.file-name {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text-primary);
  /* Truncate with ellipsis — all three lines required */
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.file-size {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
}
.remove-file {
  flex-shrink: 0;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 0.9rem;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}
.remove-file:hover { background: var(--danger-bg); color: var(--danger); }

/* ---------- Breadcrumb ---------- */
.breadcrumb-nav {
  background: var(--bg-card-alt);
  border-bottom: 1px solid var(--border);
}
.breadcrumb-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 8px 24px;
}
.breadcrumb-list {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.breadcrumb-list li {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--text-muted);
}
.breadcrumb-list li + li::before {
  content: '›';
  color: var(--text-muted);
}
.breadcrumb-list a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  transition: color var(--transition);
}
.breadcrumb-list a:hover { color: var(--accent); }
.breadcrumb-list [aria-current="page"] { color: var(--accent); font-weight: 600; }

/* ---------- Hero CTA Row ---------- */
.hero-cta-row {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 28px 0 22px;
}
.btn-lg {
  padding: 15px 32px;
  font-size: 1rem;
  border-radius: 10px;
}

/* ---------- Trust Badges ---------- */
.hero-trust-badges {
  display: flex;
  gap: 18px;
  justify-content: center;
  flex-wrap: wrap;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}
.hero-trust-badges span {
  display: flex;
  align-items: center;
  gap: 5px;
}

/* ---------- SEO Content Card ---------- */
.seo-content-card {
  line-height: 1.75;
}
.card-title-lg {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 14px;
  line-height: 1.3;
}
.seo-h3 {
  font-family: var(--font-display);
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 18px 0 8px;
  letter-spacing: -0.01em;
}
.seo-content-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 12px;
}
.seo-list {
  margin: 0 0 12px 18px;
}
.seo-list li {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 6px;
  line-height: 1.65;
}
.seo-content-card code {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 0.83rem;
  color: var(--accent-dark);
  font-family: 'Courier New', monospace;
}

/* ---------- Internal Link Chips ---------- */
.internal-links-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}
.internal-link-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-card-alt);
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 6px 14px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all var(--transition);
}
.internal-link-chip:hover {
  background: var(--accent-light);
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
}

/* ---------- FAQ Section ---------- */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: border-color var(--transition);
}
.faq-item[open] {
  border-color: var(--accent);
}
.faq-question {
  padding: 15px 18px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  user-select: none;
  transition: background var(--transition);
}
.faq-question::-webkit-details-marker { display: none; }
.faq-question::after {
  content: '+';
  font-size: 1.2rem;
  font-weight: 300;
  color: var(--accent);
  flex-shrink: 0;
  transition: transform var(--transition);
}
.faq-item[open] .faq-question::after {
  transform: rotate(45deg);
}
.faq-question:hover { background: var(--bg-card-alt); }
.faq-answer {
  padding: 0 18px 16px;
  border-top: 1px solid var(--border);
}
.faq-answer p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.7;
  padding-top: 12px;
  margin: 0;
}

/* ---------- Use Cases Sidebar Card ---------- */
.use-cases-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.use-cases-list li {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.use-cases-list li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.use-cases-list strong {
  display: block;
  font-size: 0.86rem;
  color: var(--text-primary);
  margin-bottom: 3px;
}
.use-cases-list p {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
}

/* ---------- Footer Grid ---------- */
.footer-top {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 40px;
  align-items: start;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}
.footer-logo {
  font-size: 1.15rem;
  margin-bottom: 8px;
  display: flex;
  gap: 8px;
  align-items: center;
  text-decoration: none;
  color: var(--text-primary);
}
.footer-tagline {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 6px;
}
.footer-links-grid {
  display: flex;
  gap: 40px;
}
.footer-link-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.footer-col-title {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.footer-link-col a {
  font-size: 0.83rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--transition);
  font-weight: 500;
}
.footer-link-col a:hover { color: var(--accent); }
.footer-bottom {
  text-align: center;
}
.footer-privacy {
  font-size: 0.83rem;
  color: var(--text-secondary);
  font-weight: 500;
  margin-bottom: 6px;
}
.footer-copy {
  font-size: 0.76rem;
  color: var(--text-muted);
}
.footer-copy a {
  color: var(--text-muted);
  text-decoration: underline;
}

@media (max-width: 640px) {
  .footer-top {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .footer-links-grid {
    gap: 24px;
  }
  .hero-cta-row {
    flex-direction: column;
    align-items: center;
  }
  .btn-lg { width: 100%; max-width: 320px; }
  .hero-trust-badges { gap: 12px; }
  .internal-links-row { flex-direction: column; }
}


/* ============================================================
   SEO OPTIMIZATION — Additional UI Components
   Added for: textsplit.online full SEO update
   ============================================================ */

/* ---------- Breadcrumb ---------- */
.breadcrumb-nav {
  background: var(--bg-card-alt);
  border-bottom: 1px solid var(--border);
  padding: 8px 0;
  font-size: 0.78rem;
  transition: background var(--transition);
}
.breadcrumb-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}
.breadcrumb-list {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.breadcrumb-list li { display: flex; align-items: center; gap: 6px; color: var(--text-muted); }
.breadcrumb-list li::after { content: '/'; color: var(--border); }
.breadcrumb-list li:last-child::after { display: none; }
.breadcrumb-list a { color: var(--text-secondary); font-weight: 500; transition: color var(--transition); text-decoration: none; }
.breadcrumb-list a:hover { color: var(--accent); }
.breadcrumb-list [aria-current="page"] { color: var(--text-primary); font-weight: 600; }

/* ---------- Hero CTA row ---------- */
.hero-cta-row {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 28px 0 22px;
}
.btn-lg {
  padding: 15px 30px;
  font-size: 1rem;
  border-radius: 10px;
}

/* ---------- Trust Badges ---------- */
.hero-trust-badges {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.01em;
}
.hero-trust-badges span {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 50px;
  transition: border-color var(--transition), color var(--transition);
}
.hero-trust-badges span:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- Responsive updates ---------- */
@media (max-width: 900px) {
  .footer-top { grid-template-columns: 1fr; gap: 24px; }
}
@media (max-width: 640px) {
  .hero-cta-row { flex-direction: column; align-items: center; }
  .btn-lg { width: 100%; max-width: 320px; justify-content: center; }
  .hero-trust-badges { gap: 8px; }
  .hero-trust-badges span { font-size: 0.72rem; padding: 4px 9px; }
  .internal-links-row { flex-direction: column; }
}
