/* ==========================================================================
   ClearBG Pro - remove.bg Inspired Modern Design System (Vanilla CSS)
   ========================================================================== */

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

:root {
  --primary: #2f6beb;
  --primary-hover: #1c52ec;
  --primary-light: #eef4ff;
  --accent-cyan: #00d2ff;
  
  --bg-main: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-card: #ffffff;
  
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  
  --border-color: #e2e8f0;
  --border-hover: #cbd5e1;
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;
  --radius-pill: 9999px;
  
  --shadow-sm: 0 2px 4px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 10px 25px -5px rgba(15, 23, 42, 0.08), 0 8px 10px -6px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 20px 35px -10px rgba(47, 107, 235, 0.15), 0 10px 15px -5px rgba(15, 23, 42, 0.05);
  
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --max-width: 1240px;
}

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

body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ==========================================================================
   Header & Navbar (remove.bg style)
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  height: 72px;
  display: flex;
  align-items: center;
}

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

.site-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 1.45rem;
  color: var(--text-main);
}

.logo-badge {
  background: linear-gradient(135deg, var(--primary), #3b82f6);
  color: white;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  box-shadow: 0 4px 12px rgba(47, 107, 235, 0.3);
}

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

.nav-link {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.95rem;
}

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

.nav-cta {
  background: var(--primary);
  color: white !important;
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: 0 4px 14px rgba(47, 107, 235, 0.35);
}

.nav-cta:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

/* Mobile Nav Toggle */
.mobile-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-main);
  cursor: pointer;
}

/* ==========================================================================
   Hero Section (remove.bg signature layout)
   ========================================================================== */
.hero-section {
  padding: 4rem 0 3rem;
  background: radial-gradient(circle at 80% 20%, rgba(47, 107, 235, 0.05) 0%, transparent 50%),
              radial-gradient(circle at 10% 80%, rgba(0, 210, 255, 0.05) 0%, transparent 50%);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3.5rem;
  align-items: center;
}

.hero-content h1 {
  font-family: 'Outfit', sans-serif;
  font-size: 3.2rem;
  font-weight: 800;
  line-height: 1.15;
  color: var(--text-main);
  margin-bottom: 1.25rem;
  letter-spacing: -0.02em;
}

.hero-content h1 span {
  color: var(--primary);
  background: linear-gradient(135deg, var(--primary) 0%, #1d4ed8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-lead {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  line-height: 1.6;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.hero-badge-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-secondary);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-pill);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-main);
  border: 1px solid var(--border-color);
}

.hero-badge-item svg {
  color: #10b981;
}

/* ==========================================================================
   Upload Card (remove.bg Dropzone)
   ========================================================================== */
.upload-card-wrapper {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  box-shadow: var(--shadow-lg);
  border: 2px dashed #cbd5e1;
  text-align: center;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.upload-card-wrapper.dragover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.upload-btn-main {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  background: var(--primary);
  color: white;
  font-family: 'Outfit', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  padding: 1.1rem 2.8rem;
  border-radius: var(--radius-pill);
  cursor: pointer;
  border: none;
  box-shadow: 0 8px 25px rgba(47, 107, 235, 0.4);
  transition: var(--transition);
  width: 100%;
  max-width: 320px;
}

.upload-btn-main:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(47, 107, 235, 0.5);
}

.upload-drop-text {
  margin-top: 1.25rem;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.sample-images-section {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
}

.sample-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.8rem;
}

.sample-grid {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
}

.sample-thumb {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  cursor: pointer;
  border: 2px solid transparent;
  transition: var(--transition);
}

.sample-thumb:hover {
  transform: scale(1.08);
  border-color: var(--primary);
}

/* Processing Overlay */
.processing-box {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem;
}

.processing-box.active {
  display: flex;
}

.spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--primary-light);
  border-top: 4px solid var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 1.5rem;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.progress-track {
  width: 100%;
  max-width: 360px;
  height: 8px;
  background: var(--bg-secondary);
  border-radius: 4px;
  overflow: hidden;
  margin: 1rem 0 0.5rem;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent-cyan));
  width: 0%;
  transition: width 0.2s ease;
}

/* ==========================================================================
   Interactive Editor Workspace (remove.bg Tabs & Controls)
   ========================================================================== */
.editor-workspace {
  display: none;
  grid-template-columns: 1fr 340px;
  gap: 2rem;
  margin-top: 2rem;
  align-items: start;
}

.editor-workspace.active {
  display: grid;
}

.editor-preview-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
}

.editor-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.75rem;
}

.editor-tab-btn {
  background: none;
  border: none;
  padding: 0.6rem 1.25rem;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.editor-tab-btn.active {
  background: var(--primary-light);
  color: var(--primary);
}

.viewport-container {
  position: relative;
  width: 100%;
  height: 480px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f1f5f9;
}

/* Transparent Checkered Background Pattern */
.bg-checkered {
  background-image: 
    linear-gradient(45deg, #e2e8f0 25%, transparent 25%), 
    linear-gradient(-45deg, #e2e8f0 25%, transparent 25%), 
    linear-gradient(45deg, transparent 75%, #e2e8f0 75%), 
    linear-gradient(-45deg, transparent 75%, #e2e8f0 75%);
  background-size: 20px 20px;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
}

.preview-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* Comparison Slider */
.comparison-slider-box {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.slider-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.slider-overlay {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 50%;
  overflow: hidden;
  border-right: 3px solid var(--primary);
}

.slider-handle {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  cursor: ew-resize;
}

/* Editor Control Sidebar */
.editor-sidebar {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
}

.sidebar-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color);
}

.control-group {
  margin-bottom: 1.5rem;
}

.control-label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 0.6rem;
}

.bg-picker-options {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.5rem;
}

.bg-option-btn {
  width: 100%;
  height: 38px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--border-color);
  cursor: pointer;
  transition: var(--transition);
}

.bg-option-btn.active {
  border-color: var(--primary);
  transform: scale(1.1);
}

.download-section {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 2rem;
}

.btn-download {
  background: var(--primary);
  color: white;
  padding: 0.9rem;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 1.05rem;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow: 0 4px 14px rgba(47, 107, 235, 0.3);
  transition: var(--transition);
}

.btn-download:hover {
  background: var(--primary-hover);
}

.btn-restart {
  background: var(--bg-secondary);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  padding: 0.75rem;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  text-align: center;
  transition: var(--transition);
}

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

/* ==========================================================================
   Content Sections (How-to, Features, FAQ)
   ========================================================================== */
.section-padding {
  padding: 5rem 0;
}

.section-title {
  font-family: 'Outfit', sans-serif;
  font-size: 2.2rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 0.75rem;
}

.section-subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 640px;
  margin: 0 auto 3.5rem;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.step-card {
  background: var(--bg-card);
  padding: 2.5rem 1.8rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

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

.step-number {
  font-family: 'Outfit', sans-serif;
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 1rem;
}

.step-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

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

/* Features Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.feature-card {
  background: var(--bg-secondary);
  padding: 2.2rem 1.8rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.feature-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.feature-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* FAQ Accordion */
.faq-grid {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem 1.8rem;
  box-shadow: var(--shadow-sm);
}

.faq-item h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-main);
}

.faq-item p {
  color: var(--text-muted);
  font-size: 0.98rem;
}

/* ==========================================================================
   Blog Pages Styling
   ========================================================================== */
.blog-header {
  padding: 3.5rem 0 2rem;
  text-align: center;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-bottom: 4rem;
}

.blog-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: var(--transition);
}

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

.blog-card-body {
  padding: 1.8rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.blog-tag {
  align-self: flex-start;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.8rem;
}

.blog-card h2 {
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 0.75rem;
}

.blog-card h2 a {
  color: var(--text-main);
}

.blog-card h2 a:hover {
  color: var(--primary);
}

.blog-card p {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.blog-meta {
  font-size: 0.82rem;
  color: var(--text-light);
  display: flex;
  justify-content: space-between;
}

/* Single Post View */
.article-container {
  max-width: 820px;
  margin: 3rem auto 5rem;
}

.article-header {
  margin-bottom: 2.5rem;
}

.article-title {
  font-family: 'Outfit', sans-serif;
  font-size: 2.6rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.article-body {
  font-size: 1.08rem;
  line-height: 1.8;
  color: #334155;
}

.article-body h1, .article-body h2, .article-body h3 {
  font-family: 'Outfit', sans-serif;
  color: var(--text-main);
  margin: 2.2rem 0 1rem;
}

.article-body p {
  margin-bottom: 1.4rem;
}

.article-body ul, .article-body ol {
  margin: 1.2rem 0 1.4rem 2rem;
}

.article-body li {
  margin-bottom: 0.5rem;
}

/* ==========================================================================
   AdSense Placeholder (Preview mode)
   ========================================================================== */
.adsense-placeholder {
  background: var(--bg-secondary);
  border: 1px dashed var(--border-hover);
  border-radius: var(--radius-sm);
  padding: 1rem;
  text-align: center;
  margin: 2rem 0;
}

.ad-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-light);
  letter-spacing: 0.08em;
  margin-bottom: 0.4rem;
}

.ad-box-inner {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 4rem 0 2rem;
  margin-top: 4rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-about p {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-top: 0.75rem;
}

.footer-col h4 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 1.2rem;
  color: var(--text-main);
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.6rem;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
}

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

.footer-bottom {
  border-top: 1px solid var(--border-color);
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */
@media (max-width: 992px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  
  .hero-content {
    text-align: center;
  }
  
  .hero-content h1 {
    font-size: 2.5rem;
  }
  
  .hero-badges {
    justify-content: center;
  }
  
  .editor-workspace {
    grid-template-columns: 1fr;
  }
  
  .steps-grid, .features-grid, .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .footer-grid {
    grid-template-columns: 1fr repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .site-nav {
    display: none;
  }
  
  .mobile-toggle {
    display: block;
  }
  
  .hero-content h1 {
    font-size: 2.1rem;
  }
  
  .steps-grid, .features-grid, .blog-grid, .footer-grid {
    grid-template-columns: 1fr;
  }
  
  .viewport-container {
    height: 340px;
  }
  
  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}

/* Forms Styling */
.form-group {
  margin-bottom: 1.25rem;
  text-align: left;
}
.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--text-main);
}
.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--text-main);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  box-sizing: border-box;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

/* Contact Grid Responsive */
@media (max-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
  }
}

/* Mobile Responsive Navigation Overlay */
@media (max-width: 640px) {
  .site-nav.mobile-open {
    display: flex !important;
    flex-direction: column;
    position: absolute;
    top: 72px;
    left: 0;
    width: 100%;
    background: #ffffff;
    border-bottom: 1px solid var(--border-color);
    padding: 1.5rem;
    box-shadow: var(--shadow-lg);
    gap: 1.25rem;
    align-items: stretch;
    z-index: 999;
  }
  .site-nav.mobile-open .nav-cta {
    text-align: center;
  }
}

