/* ==========================================================================
   img2pdfarabic.com - Main Stylesheet (Modern RTL Architecture)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;500;600;700;800;900&display=swap');

:root {
  --primary: #059669;
  --primary-hover: #047857;
  --primary-light: #ecfdf5;
  --primary-border: #a7f3d0;
  --accent: #2563eb;
  --accent-light: #eff6ff;
  --danger: #ef4444;
  --danger-light: #fef2f2;
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-light: #94a3b8;
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --border-color: #e2e8f0;
  --border-focus: #10b981;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.07), 0 2px 4px -2px rgb(0 0 0 / 0.07);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.08), 0 4px 6px -4px rgb(0 0 0 / 0.05);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.06);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  --container-max: 1160px;
  --font-family: 'Cairo', system-ui, -apple-system, 'Segoe UI', Tahoma, Arial, sans-serif;
}

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

html {
  font-family: var(--font-family);
  direction: rtl;
  text-align: right;
  background-color: var(--bg-main);
  color: var(--text-main);
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.7;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

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

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

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.site-header {
  background: #ffffff;
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(8px);
  background-color: rgba(255, 255, 255, 0.95);
}

.header-container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--text-main);
  text-decoration: none;
}

.logo svg, .logo img {
  width: 42px;
  height: 42px;
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

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

.logo-tagline {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.nav-link {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-muted);
  padding: 0.4rem 0.6rem;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

.nav-link:hover, .nav-link.active {
  color: var(--primary);
  background-color: var(--primary-light);
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-main);
  padding: 0.25rem;
}

/* ==========================================================================
   Hero & Tool Section (Above The Fold)
   ========================================================================== */
.hero-tool-section {
  padding: 2rem 1.25rem 3rem;
  background: radial-gradient(circle at top right, #f0fdf4 0%, #ffffff 50%, #f8fafc 100%);
  border-bottom: 1px solid var(--border-color);
}

.hero-container {
  max-width: 960px;
  margin: 0 auto;
}

.hero-header {
  text-align: center;
  margin-bottom: 2rem;
}

.primary-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 1rem;
  border-radius: var(--radius-full);
  background: #dcfce7;
  color: #166534;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 1rem;
  border: 1px solid #bbf7d0;
}

.hero-title {
  font-size: clamp(1.8rem, 4vw, 2.75rem);
  font-weight: 900;
  color: var(--text-main);
  line-height: 1.3;
  margin-bottom: 0.75rem;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-muted);
  max-width: 720px;
  margin: 0 auto;
  font-weight: 500;
}

/* Trust Bar */
.trust-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-top: 1.25rem;
  font-size: 0.88rem;
  color: #065f46;
  font-weight: 600;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* ==========================================================================
   Tool Application Card
   ========================================================================== */
.tool-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 2px solid var(--border-color);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  transition: border-color 0.3s ease;
}

/* Drop Zone */
.dropzone {
  position: relative;
  padding: 3.5rem 1.5rem;
  text-align: center;
  border: 3px dashed #cbd5e1;
  border-radius: calc(var(--radius-lg) - 4px);
  margin: 1.25rem;
  background-color: #fafbfc;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.dropzone:hover, .dropzone.dragover {
  border-color: var(--primary);
  background-color: #f0fdf4;
  transform: scale(0.995);
}

.dropzone-icon {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-full);
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.25rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.15);
}

.dropzone-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 0.5rem;
}

.dropzone-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  max-width: 500px;
}

.file-input {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 10;
}

.btn-upload-cta {
  background: linear-gradient(135deg, var(--primary) 0%, #047857 100%);
  color: #ffffff;
  border: none;
  padding: 0.9rem 2.25rem;
  font-size: 1.1rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.35);
  cursor: pointer;
  pointer-events: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.dropzone:hover .btn-upload-cta {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(5, 150, 105, 0.45);
}

.format-tags {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

.format-pill {
  font-size: 0.75rem;
  font-weight: 700;
  background: #e2e8f0;
  color: #334155;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-sm);
  letter-spacing: 0.5px;
}

/* Workspace (Visible when files are added) */
.tool-workspace {
  display: none;
  padding: 1.25rem 1.5rem 1.75rem;
}

.tool-workspace.active {
  display: block;
}

/* Workspace Toolbar */
.workspace-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding-bottom: 1rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-color);
}

.workspace-stats {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  font-weight: 700;
  font-size: 0.95rem;
}

.stat-badge {
  background: var(--bg-main);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

.workspace-actions {
  display: flex;
  gap: 0.75rem;
}

.btn-secondary {
  background: #ffffff;
  color: var(--text-main);
  border: 1px solid var(--border-color);
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  background: var(--bg-main);
  border-color: #cbd5e1;
}

.btn-danger-ghost {
  background: transparent;
  color: var(--danger);
  border: 1px solid transparent;
  padding: 0.5rem 0.85rem;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.2s ease;
}

.btn-danger-ghost:hover {
  background: var(--danger-light);
  border-color: #fecaca;
}

/* Image Thumbnails Grid */
.images-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.75rem;
  max-height: 480px;
  overflow-y: auto;
  padding: 0.5rem 0.25rem;
}

/* Custom Scrollbar */
.images-grid::-webkit-scrollbar {
  width: 6px;
}
.images-grid::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.image-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  user-select: none;
  cursor: grab;
}

.image-card:hover {
  box-shadow: var(--shadow-md);
  border-color: #94a3b8;
}

.image-card.dragging {
  opacity: 0.4;
  border: 2px dashed var(--primary);
  cursor: grabbing;
}

.image-card.drag-over {
  border-color: var(--primary);
  transform: scale(1.03);
  box-shadow: 0 0 0 2px var(--primary);
}

.image-index-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(15, 23, 42, 0.85);
  color: #ffffff;
  width: 26px;
  height: 26px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  backdrop-filter: blur(4px);
}

.image-preview-wrapper {
  height: 130px;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: zoom-in;
}

.image-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.image-info {
  padding: 0.6rem 0.75rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.image-filename {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  direction: ltr;
  text-align: right;
}

.image-meta {
  font-size: 0.72rem;
  color: var(--text-light);
  margin-top: 2px;
}

.image-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.4rem 0.6rem;
  background: #f8fafc;
  border-top: 1px solid var(--border-color);
}

.card-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.3rem;
  border-radius: 4px;
  font-size: 0.95rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.card-btn:hover {
  background: #e2e8f0;
  color: var(--text-main);
}

.card-btn.rotate-btn:hover {
  background: #e0f2fe;
  color: #0284c7;
}

.card-btn.delete-btn:hover {
  background: var(--danger-light);
  color: var(--danger);
}

/* Image Preview Lightbox Modal */
.lightbox-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.lightbox-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(6px);
}

.lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10001;
  animation: zoomIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.lightbox-image {
  max-width: 100%;
  max-height: 82vh;
  border-radius: var(--radius-md);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  object-fit: contain;
  background: #ffffff;
}

.lightbox-caption {
  margin-top: 0.75rem;
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 600;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
  direction: ltr;
}

.lightbox-close {
  position: absolute;
  top: -45px;
  right: -10px;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #ffffff;
  font-size: 1.5rem;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.4);
  transform: scale(1.1);
}

@keyframes zoomIn {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

/* Conversion Options Panel */
.options-panel {
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.options-title {
  font-size: 1.05rem;
  font-weight: 800;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-main);
}

.options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
}

.option-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.option-label {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
}

.option-select, .option-input {
  width: 100%;
  padding: 0.6rem 0.85rem;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-sm);
  background-color: #ffffff;
  color: var(--text-main);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.option-select:focus, .option-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.15);
}

/* Action Convert Area */
.convert-action-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.btn-convert-primary {
  width: 100%;
  max-width: 480px;
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  color: #ffffff;
  border: none;
  padding: 1.1rem 2rem;
  font-size: 1.25rem;
  font-weight: 800;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  box-shadow: 0 10px 20px -3px rgba(5, 150, 105, 0.4);
  transition: all 0.25s ease;
}

.btn-convert-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 14px 25px -4px rgba(5, 150, 105, 0.5);
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

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

/* Progress Area */
.progress-card {
  display: none;
  width: 100%;
  max-width: 480px;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  box-shadow: var(--shadow-sm);
  margin-top: 0.5rem;
}

.progress-card.active {
  display: block;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  font-weight: 700;
}

.progress-bar-bg {
  width: 100%;
  height: 10px;
  background: #e2e8f0;
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #10b981, #059669);
  border-radius: var(--radius-full);
  transition: width 0.2s ease;
}

.progress-status {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
  text-align: center;
}

/* Success Download Card */
.download-success-card {
  display: none;
  width: 100%;
  max-width: 480px;
  background: #ecfdf5;
  border: 2px solid #a7f3d0;
  border-radius: var(--radius-md);
  padding: 1.5rem;
  text-align: center;
  animation: fadeIn 0.4s ease;
}

.download-success-card.active {
  display: block;
}

.success-icon {
  font-size: 2.5rem;
  color: #059669;
  margin-bottom: 0.5rem;
}

.success-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #065f46;
  margin-bottom: 0.35rem;
}

.success-desc {
  font-size: 0.9rem;
  color: #047857;
  margin-bottom: 1.25rem;
}

.btn-download-again {
  background: #059669;
  color: #ffffff;
  border: none;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 700;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: 0.5rem;
  text-decoration: none;
  transition: background-color 0.2s ease, transform 0.1s ease;
}

.btn-download-again:hover {
  background: #047857;
}

/* ==========================================================================
   AdSense Display Containers
   ========================================================================== */
.adsense-wrapper {
  max-width: 960px;
  margin: 1.75rem auto;
  text-align: center;
  overflow: hidden;
  padding: 0.5rem 1rem;
}

.adsense-slot {
  min-height: 100px;
  background: #f1f5f9;
  border: 1px dashed #cbd5e1;
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 1rem;
}

.adsense-slot::before {
  content: "إعلان مدعوم (Google AdSense)";
  display: block;
  font-size: 0.72rem;
  color: #94a3b8;
  margin-bottom: 0.25rem;
}

/* ==========================================================================
   Features Highlight Grid
   ========================================================================== */
.features-section {
  padding: 3.5rem 1.25rem;
  max-width: var(--container-max);
  margin: 0 auto;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.feature-card {
  background: #ffffff;
  padding: 1.75rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.feature-icon-box {
  width: 52px;
  height: 52px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin-bottom: 1rem;
}

.feature-title {
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  color: var(--text-main);
}

.feature-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ==========================================================================
   Main Content & Comprehensive Guide
   ========================================================================== */
.guide-section {
  padding: 3.5rem 1.25rem;
  background: #ffffff;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.content-container {
  max-width: 900px;
  margin: 0 auto;
}

.content-container h2 {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--text-main);
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  position: relative;
  padding-bottom: 0.5rem;
}

.content-container h2::after {
  content: "";
  position: absolute;
  bottom: 0;
  right: 0;
  width: 60px;
  height: 4px;
  background: var(--primary);
  border-radius: var(--radius-full);
}

.content-container h3 {
  font-size: 1.35rem;
  font-weight: 700;
  color: #1e293b;
  margin-top: 1.75rem;
  margin-bottom: 0.75rem;
}

.content-container p {
  font-size: 1.05rem;
  color: #334155;
  margin-bottom: 1.25rem;
  line-height: 1.8;
}

.content-container ul, .content-container ol {
  margin-right: 1.5rem;
  margin-bottom: 1.5rem;
}

.content-container li {
  font-size: 1.02rem;
  margin-bottom: 0.6rem;
  color: #334155;
}

/* How-To Step Cards */
.steps-wrapper {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  margin: 2rem 0;
}

.step-card {
  background: var(--bg-main);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  position: relative;
}

.step-num {
  width: 36px;
  height: 36px;
  background: var(--primary);
  color: #ffffff;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 1.1rem;
  margin-bottom: 0.85rem;
}

.step-title {
  font-weight: 800;
  font-size: 1.1rem;
  margin-bottom: 0.4rem;
  color: var(--text-main);
}

.step-text {
  font-size: 0.92rem;
  color: var(--text-muted);
}

.guide-tip-box {
  background: var(--primary-light);
  border-right: 4px solid var(--primary);
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius-sm);
  margin: 1.75rem 0;
  color: #065f46;
  font-size: 1rem;
  line-height: 1.8;
}

.guide-tip-box strong {
  color: #064e3b;
  display: block;
  margin-bottom: 0.35rem;
  font-size: 1.05rem;
}

/* Comparison Table */
.comparison-table-wrapper {
  overflow-x: auto;
  margin: 2rem 0;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  text-align: right;
  font-size: 0.95rem;
}

.comparison-table th {
  background: #f1f5f9;
  padding: 1rem;
  font-weight: 800;
  color: var(--text-main);
  border-bottom: 2px solid var(--border-color);
}

.comparison-table td {
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--border-color);
  color: #334155;
}

.comparison-table tr:last-child td {
  border-bottom: none;
}

.comparison-table tr:nth-child(even) {
  background: #f8fafc;
}

.badge-winner {
  color: #059669;
  font-weight: 800;
}

/* FAQ Accordion Section */
.faq-section {
  padding: 3.5rem 1.25rem;
  max-width: 900px;
  margin: 0 auto;
}

.faq-header {
  text-align: center;
  margin-bottom: 2.25rem;
}

.faq-title {
  font-size: 2rem;
  font-weight: 900;
  color: var(--text-main);
  margin-bottom: 0.5rem;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.faq-item {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s ease;
}

.faq-question {
  width: 100%;
  padding: 1.25rem 1.5rem;
  font-family: inherit;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-main);
  background: none;
  border: none;
  text-align: right;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.faq-question:hover {
  color: var(--primary);
}

.faq-icon {
  font-size: 1.25rem;
  font-weight: 700;
  transition: transform 0.25s ease;
}

.faq-item.active .faq-icon {
  transform: rotate(180deg);
}

.faq-answer {
  display: none;
  padding: 0 1.5rem 1.25rem;
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.8;
  border-top: 1px solid #f1f5f9;
  margin-top: -0.25rem;
  padding-top: 0.85rem;
}

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

/* ==========================================================================
   Internal Links & Supporting Keywords Hub
   ========================================================================== */
.related-hub-section {
  padding: 3rem 1.25rem;
  background: #f1f5f9;
  border-top: 1px solid var(--border-color);
}

.hub-container {
  max-width: var(--container-max);
  margin: 0 auto;
}

.hub-title {
  text-align: center;
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 1.75rem;
}

.hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.hub-card {
  background: #ffffff;
  padding: 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.hub-card:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
}

.hub-card-title {
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--text-main);
}

.hub-card-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background: #0f172a;
  color: #94a3b8;
  padding: 3.5rem 1.25rem 2rem;
  margin-top: auto;
}

.footer-container {
  max-width: var(--container-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid #1e293b;
}

.footer-brand h4 {
  color: #ffffff;
  font-size: 1.35rem;
  font-weight: 900;
  margin-bottom: 0.75rem;
}

.footer-brand p {
  font-size: 0.92rem;
  line-height: 1.7;
  max-width: 420px;
}

.footer-col h5 {
  color: #ffffff;
  font-size: 1.05rem;
  font-weight: 800;
  margin-bottom: 1rem;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-links a {
  color: #94a3b8;
  font-size: 0.9rem;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: #10b981;
}

.footer-bottom {
  max-width: var(--container-max);
  margin: 1.75rem auto 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.85rem;
}

/* Mobile Sticky Bottom Anchor Ad Placeholder */
.mobile-anchor-ad {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: #ffffff;
  border-top: 1px solid var(--border-color);
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.08);
  z-index: 999;
  text-align: center;
  padding: 4px;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 768px) {
  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff;
    flex-direction: column;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
  }

  .site-nav.mobile-active {
    display: flex;
  }

  .mobile-menu-btn {
    display: block;
  }

  .dropzone {
    padding: 2.5rem 1rem;
    margin: 0.75rem;
  }

  .dropzone-title {
    font-size: 1.15rem;
  }

  .images-grid {
    grid-template-columns: repeat(auto-fill, minmax(135px, 1fr));
    gap: 0.75rem;
  }

  .image-preview-wrapper {
    height: 100px;
  }

  .footer-container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .mobile-anchor-ad {
    display: block;
  }
}
