:root {
  --bg: #fef7f9;
  --card: #ffffff;
  --muted: #6b7280;
  --primary: #ff5a8f;
  --primary-light: #ffebf0;
  --primary-dark: #e94f7f;
  --header-bg: rgba(255, 255, 255, 0.95);
  --nav-hover: rgba(255, 90, 143, 0.08);
  --text-main: #111827;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --form-border: #e2e8f0;
  --form-bg: #f8fafc;
  --delete-color: #ef4444;
  --delete-hover-bg: rgba(239, 68, 68, 0.1);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial;
}

/* Dark Mode Variables */
[data-theme="dark"] {
  --bg: #0f172a;
  --card: #1e293b;
  --muted: #94a3b8;
  --primary: #ff5a8f;
  --primary-light: #2a1a22;
  --primary-dark: #ff7aa8;
  --header-bg: rgba(30, 41, 59, 0.95);
  --nav-hover: rgba(255, 90, 143, 0.15);
  --text-main: #f1f5f9;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
  --form-border: #475569;
  --form-bg: #1e293b;
  --delete-color: #f87171;
  --delete-hover-bg: rgba(248, 113, 113, 0.2);
}

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

html, body {
  height: 100%;
}

body {
  background: var(--bg);
  color: var(--text-main);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
  font-size: 16px;
  transition: background-color 0.3s, color 0.3s;
}

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

/* =========================================
   HEADER STYLES
   ========================================= */
.site-header {
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: all 0.3s ease;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.02);
}

[data-theme="dark"] .site-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 12px 0;
}

/* Brand Improvements */
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.logo-mark {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #ff5a8f 0%, #ff3d77 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 22px;
  box-shadow: 0 4px 12px rgba(255, 90, 143, 0.25);
  transition: transform 0.2s;
}

.brand:hover .logo-mark {
  transform: rotate(-5deg);
}

.brand-title {
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.5px;
  background: linear-gradient(to right, var(--text-main), var(--primary-dark));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--text-main);
}

.brand-sub {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}


/* Update Main Nav to align items properly */
.main-nav {
  background: rgba(255, 255, 255, 0.5);
  padding: 6px 10px; /* Thoda padding adjust kiya */
  border-radius: 50px;
  border: 1px solid rgba(0, 0, 0, 0.03);
  display: flex;
  align-items: center; /* Vertical center alignment zaroori hai */
  gap: 8px;
}

/* Mobile View Adjustment */
@media (max-width: 768px) {
  .main-nav {
    gap: 15px; /* Mobile me thoda gap badha diya */
  }
  
  /* Mobile me theme toggle center me aaye */
  .main-nav .theme-toggle {
    margin: 10px auto 0; /* Center align */
    transform: scale(1.2); /* Thoda bada dikhe mobile pe */
  }
}
/* Modern Pill-Style Navigation */
.main-nav {
  display: flex;
  gap: 8px;
  background: rgba(0, 0, 0, 0.03);
  padding: 5px;
  border-radius: 50px;
  border: 1px solid rgba(0, 0, 0, 0.02);
}

[data-theme="dark"] .main-nav {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.main-nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  padding: 8px 20px;
  border-radius: 24px;
  transition: all 0.2s ease;
  position: relative;
}

[data-theme="dark"] .main-nav a {
  color: #cbd5e1;
}

.main-nav a:hover {
  color: var(--primary);
  background: var(--card);
  box-shadow: 0 2px 4px rgba(0,0,0,0.04);
}

[data-theme="dark"] .main-nav a:hover {
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Header Controls */
.header-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Theme Toggle */
.theme-toggle {
  display: flex;
  align-items: center;
}

.theme-checkbox {
  opacity: 0;
  position: absolute;
}

.theme-label {
  background-color: #e2e8f0;
  border-radius: 50px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px;
  position: relative;
  height: 26px;
  width: 50px;
  transform: scale(1);
}

[data-theme="dark"] .theme-label {
  background-color: #334155;
}

.theme-icon {
  font-size: 14px;
  z-index: 1;
}

.theme-ball {
  background-color: #fff;
  border-radius: 50%;
  position: absolute;
  top: 2px;
  left: 2px;
  height: 22px;
  width: 22px;
  transform: translateX(0px);
  transition: transform 0.2s linear;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.theme-checkbox:checked + .theme-label .theme-ball {
  transform: translateX(24px);
}

/* Header CTA Button - High Contrast */
.header-cta .btn.primary {
  background: #111827;
  color: #fff;
  border-radius: 50px;
  padding: 10px 24px;
  font-weight: 600;
  font-size: 14px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  border: none;
}

[data-theme="dark"] .header-cta .btn.primary {
  background: var(--primary);
}

.header-cta .btn.primary:hover {
  background: #000;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}

[data-theme="dark"] .header-cta .btn.primary:hover {
  background: var(--primary-dark);
}

/* Mobile menu button */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #1f2937;
  padding: 8px;
  border-radius: 8px;
}

[data-theme="dark"] .mobile-menu-btn {
  color: #f1f5f9;
}

.mobile-menu-btn:hover {
  background: rgba(0,0,0,0.05);
}

[data-theme="dark"] .mobile-menu-btn:hover {
  background: rgba(255,255,255,0.05);
}

/* =========================================
   GENERAL STYLES
   ========================================= */

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  font-weight: 500;
  font-size: 14px;
  transition: all 0.2s;
  text-decoration: none;
  gap: 6px;
}

/* General Primary Button (Pink) */
.btn.primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 2px 4px rgba(255, 90, 143, 0.3);
}

.btn.primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(255, 90, 143, 0.4);
}

.btn.outline {
  border-color: #d1d5db;
  background: transparent;
  color: #4b5563;
}

[data-theme="dark"] .btn.outline {
  border-color: #475569;
  color: #cbd5e1;
}

.btn.outline:hover {
  background: #f9fafb;
  border-color: #9ca3af;
}

[data-theme="dark"] .btn.outline:hover {
  background: #334155;
  border-color: #64748b;
}

.btn:focus {
  outline: 3px solid rgba(255, 90, 143, 0.2);
}

/* =========================================
   HERO & IMAGE STYLES
   ========================================= */

/* Hero Section */
.hero-wrapper {
  background:
    linear-gradient(to right, rgba(255,255,255,0.95) 30%, rgba(255,255,255,0.8) 100%),
    url('../images/home.webp');
  background-size: cover;
  background-position: center top;
  padding: 80px 0 100px;
  position: relative;
  overflow: visible;
  border-bottom: 1px solid rgba(255,90,143,0.1);
}

[data-theme="dark"] .hero-wrapper {
  background:
    linear-gradient(to right, rgba(15, 23, 42, 0.95) 30%, rgba(15, 23, 42, 0.8) 100%),
    url('../images/home.webp');
  border-bottom: 1px solid rgba(255,90,143,0.2);
}

.hero {
  display: flex;
  gap: 40px;
  align-items: center;
}

.hero-left {
  flex: 1;
  z-index: 1;
}

.hero-right {
  width: 450px;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  perspective: 1000px;
}

.hero h1 {
  font-size: 48px;
  font-weight: 800;
  letter-spacing: -1px;
  background: -webkit-linear-gradient(0deg, var(--text-main), var(--primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 0 0 24px;
  line-height: 1.1;
}

.lead {
  font-size: 20px;
  line-height: 1.6;
  color: var(--muted);
  font-weight: 400;
  margin-bottom: 24px;
}

/* Badge */
.badge-pill {
  display: inline-block;
  padding: 6px 16px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 50px;
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 20px;
  border: 1px solid rgba(255,90,143,0.2);
}

.hero-stats {
  margin-top: 20px;
  color: var(--primary-dark);
  font-weight: 600;
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.avatars {
  display: flex;
  gap: 4px;
  background: var(--card);
  padding: 4px 8px;
  border-radius: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  font-size: 18px;
}

[data-theme="dark"] .avatars {
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.hero-actions {
  margin-top: 32px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* Big Buttons for Hero */
.big-btn {
  padding: 14px 28px;
  font-size: 16px;
  border-radius: 50px;
}

/* Floating Image Effect */
.floating-img {
  max-width: 100%;
  border-radius: 20px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  border: 8px solid rgba(255, 255, 255, 0.8);
  transform: rotateY(-5deg) rotateX(2deg);
  transition: transform 0.5s ease;
}

[data-theme="dark"] .floating-img {
  border: 8px solid rgba(30, 41, 59, 0.8);
}

.hero-right:hover .floating-img {
  transform: rotateY(0deg) rotateX(0deg) scale(1.02);
}

.floating-card {
  position: absolute;
  background: var(--card);
  padding: 10px 18px;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.1);
  font-weight: 600;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
  animation: float 4s ease-in-out infinite;
  z-index: 2;
}

[data-theme="dark"] .floating-card {
  box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}

.card-1 { top: 40px; left: -30px; }
.card-2 { bottom: 40px; right: -20px; animation-delay: 2s; }

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

/* =========================================
   MAIN CONTENT STYLES
   ========================================= */

.section {
  padding: 60px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 40px;
}

.section-header h2 {
  margin: 0 0 12px;
  font-size: 32px;
  color: var(--text-main);
  font-weight: 700;
}

.section-header p {
  color: var(--muted);
  max-width: 600px;
  margin: 0 auto;
  font-size: 18px;
}

/* Religion Pick */
.religion-pick {
  display: flex;
  gap: 10px;
  margin: 20px 0 30px;
  justify-content: center;
  flex-wrap: wrap;
}

.religion {
  border: 1px solid #e6e7eb;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--card);
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 500;
  color: #4b5563;
}

[data-theme="dark"] .religion {
  border-color: #334155;
  color: #cbd5e1;
}

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

.religion.active {
  box-shadow: 0 4px 12px rgba(255, 90, 143, 0.2);
  border-color: var(--primary);
  background: var(--primary);
  color: white;
}

/* Templates Grid */
.templates-grid {
  display: grid !important;
  width: 100%;
  max-width: 1200px;
  margin: 30px auto !important;
  
  /* Desktop: 4 columns */
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 25px;
}

.template-card {
  width: 100% !important;
  height: auto;
  aspect-ratio: 3/4; /* Maintain photo ratio */
  margin: 0 !important;
  
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  background: var(--card);
  transition: transform 0.3s ease;
} 

[data-theme="dark"] .template-card {
  border-color: #334155;
}

.template-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.template-card.selected {
  border: 3px solid var(--primary);
  box-shadow: 0 0 0 2px rgba(255, 90, 143, 0.3);
}

.template-thumb {
  height: 160px;
  background: linear-gradient(135deg, var(--primary-light), var(--card));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.template-features {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.feature-tag {
  background: #f0f9ff;
  color: #0369a1;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
}

[data-theme="dark"] .feature-tag {
  background: #0c4a6e;
  color: #bae6fd;
}

.feature-tag:nth-child(2) {
  background: #f0fdf4;
  color: #166534;
}

[data-theme="dark"] .feature-tag:nth-child(2) {
  background: #14532d;
  color: #bbf7d0;
}
/* ==== Templates as Photo Cards (like formats) ==== */

.template-thumb {
  position: relative;
  height: 100%;
  border-radius: 12px;
  overflow: hidden;
  background: #f3f4f6;
  display: block;
  padding: 0;
}

.template-photo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.template-photo-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity .3s ease;
}

.template-card:hover .template-photo-overlay {
  opacity: 1;
}

.select-template-btn {
  background: var(--primary);
  border: none;
  color: #fff;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all .3s;
}

.select-template-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}


@media (max-width: 1024px) {
  .templates-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 20px;
  }
}

/* Mobile View (Phones): 2 Columns */
@media (max-width: 768px) {
  .templates-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 15px;
    padding: 0 10px;
  }
  
  /* Select Button ko thoda chhota karein mobile par */
  .select-template-btn {
    padding: 8px 12px;
    font-size: 12px;
  }
}

/* Very Small Mobile (Optional fix for layout safety) */
@media (max-width: 350px) {
  .templates-grid {
    grid-template-columns: 1fr !important;
    gap: 10px;
  }
}

/* How to Create Steps */
.steps-grid-new {
  display: flex;
  flex-direction: column;
  gap: 60px;
  margin-top: 30px;
}

.step-new {
  display: flex;
  align-items: center;
  background: var(--card);
  border-radius: 12px;
  padding: 40px;
  box-shadow: var(--shadow-md);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--form-border);
}

.step-new:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.step-new::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 5px;
  height: 100%;
  background: var(--primary-dark);
}

.step-num-new {
  width: 50px;
  height: 50px;
  flex-shrink: 0;
  margin-right: 30px;
  border-radius: 50%;
  background: var(--primary-dark);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.2rem;
  box-shadow: 0 4px 8px rgba(99, 102, 241, 0.3);
}

.step-new:nth-child(even) .step-num-new {
  margin-right: 0;
  margin-left: 30px;
}

.step-img-new {
  width: 200px;
  height: 200px;
  object-fit: contain;
  flex-shrink: 0;
  margin: 0 40px;
  border-radius: 8px;
  padding: 10px;
  background: var(--bg);
  border: 1px solid var(--form-border);
}

.step-new:nth-child(even) .step-img-new {
  margin: 0 40px;
}

.step-content-new {
  flex-grow: 1;
}

.step-title-new {
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--text-main);
  margin-bottom: 15px;
}

.step-desc-new {
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1.7;
}

/* Responsive Steps */
@media (max-width: 1024px) {
  .step-new {
    padding: 30px;
  }
  
  .step-img-new {
    width: 180px;
    height: 180px;
    margin: 0 30px;
  }
  
  .step-new:nth-child(even) .step-img-new {
    margin: 0 30px;
  }
}

@media (max-width: 768px) {
  body.preview-mode .preview-container-bg {
    padding: 12px 4px;
  }

  .biodata-template {
    max-width: 100%;
  }
}

@media (max-width: 768px) {
  .section {
    padding: 60px 0;
  }
  
  .section-header h2 {
    font-size: 2rem;
  }
  
  .section-header p {
    font-size: 1rem;
  }
  
  .step-new,
  .step-new:nth-child(even) {
    flex-direction: column;
    text-align: center;
    padding: 30px 20px;
  }
  
  .step-new::before {
    width: 100%;
    height: 5px;
  }
  
  .step-num-new,
  .step-new:nth-child(even) .step-num-new {
    margin: 0 0 20px 0;
    width: 45px;
    height: 45px;
  }
  
  .step-img-new,
  .step-new:nth-child(even) .step-img-new {
    order: -1;
    margin: 0 0 25px 0;
    width: 160px;
    height: 160px;
  }
  
  .step-title-new {
    font-size: 1.3rem;
  }
  
  .step-desc-new {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .step-img-new,
  .step-new:nth-child(even) .step-img-new {
    width: 140px;
    height: 140px;
  }
}

/* SEO/Info Content Styles */
.section-title-new {
  font-size: 24px;
  font-weight: 700;
  color: var(--primary-dark);
  margin-top: 30px;
  margin-bottom: 15px;
}

.section-para-new {
  font-size: 16px;
  color: var(--text-main);
  line-height: 1.7;
  margin-bottom: 20px;
}

.importance-grid-new {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.importance-point-new {
  background: var(--card);
  padding: 20px;
  border-radius: 12px;
  border: 1px solid var(--form-border);
  box-shadow: var(--shadow-sm);
}

.point-title-new {
  font-size: 18px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 8px;
}

.point-desc-new {
  font-size: 14px;
  color: var(--muted);
}

/* =========================================
   FORM & PREVIEW STYLES
   ========================================= */

.form-grid {
  display: grid;
  grid-template-columns: 1fr 450px;
  gap: 40px;
  align-items: start;
}

/* Form Column Card Style */
.form-column {
  background: var(--card);
  padding: 30px;
  border-radius: 20px;
  border: 1px solid var(--form-border);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.1);
}

/* Input/Select/Textarea Styling */
.form-input,
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
input[type="number"],
textarea,
select {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--form-border);
  border-radius: 12px;
  font-size: 14px;
  transition: all 0.2s;
  background: var(--form-bg);
  color: var(--text-main);
  font-family: inherit;
}

[data-theme="dark"] .form-input,
[data-theme="dark"] input[type="text"],
[data-theme="dark"] input[type="email"],
[data-theme="dark"] input[type="tel"],
[data-theme="dark"] input[type="date"],
[data-theme="dark"] input[type="number"],
[data-theme="dark"] textarea,
[data-theme="dark"] select {
  border-color: #475569;
  background: #1e293b;
  color: #f1f5f9;
}

.form-input:focus,
input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255, 90, 143, 0.2);
}

/* Dynamic Form Row & Actions */
.form-row {
  display: flex;
  flex-direction: column;
  margin-bottom: 20px;
  position: relative;
}

.field-label {
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 8px;
  display: block;
}

.field-wrapper {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.input-container {
  position: relative;
  width: 100%;
}

.required {
  color: var(--delete-color);
}

.field-actions {
  display: flex;
  gap: 4px;
  position: absolute;
  right: 0;
  top: 0;
}

.field-actions button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  transition: all 0.2s;
  color: var(--muted);
}

.field-actions button:hover {
  background-color: rgba(0, 0, 0, 0.05);
  color: var(--text-main);
}

[data-theme="dark"] .field-actions button:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

/* RED DELETE BUTTON STYLING */
.field-actions .delete-field {
  color: var(--delete-color);
}

.field-actions .delete-field:hover {
  background-color: var(--delete-hover-bg);
  color: var(--delete-color);
}

/* Add Field Button */
.add-field-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: transparent;
  color: var(--primary);
  border: 1px dashed var(--primary);
  padding: 10px 16px;
  border-radius: 12px;
  cursor: pointer;
  margin-top: 16px;
  font-weight: 600;
  transition: all 0.2s;
}

.add-field-btn:hover {
  background-color: var(--primary-light);
  transform: translateY(-1px);
}

/* Accordion Styles */
.accordion-group {
  margin-bottom: 20px;
  border: 1px solid var(--form-border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.accordion-header {
  width: 100%;
  padding: 18px 24px;
  background-color: var(--card);
  border: none;
  text-align: left;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  font-weight: 700;
  font-size: 18px;
  color: var(--text-main);
  border-bottom: 1px solid var(--form-border);
}

.accordion-group.open .accordion-header {
  border-bottom-color: var(--primary);
  background-color: var(--primary-light);
  color: var(--primary-dark);
}

[data-theme="dark"] .accordion-group.open .accordion-header {
  background-color: #2a1a22;
  border-bottom-color: var(--primary);
  color: var(--primary);
}

.accordion-header p {
  margin: 0;
}

.accordion-icon {
  width: 24px;
  height: 24px;
  transition: transform 0.3s ease;
}

.accordion-group.open .accordion-icon {
  transform: rotate(180deg);
}

.accordion-content {
  padding: 24px;
  background-color: var(--card);
}

.accordion-content.hidden {
  display: none;
}

/* Photo Upload Area */
#photoUploadArea {
  border: 2px dashed var(--form-border);
  border-radius: 16px;
  padding: 30px;
  text-align: center;
  background: var(--form-bg);
  transition: all 0.3s;
  cursor: pointer;
}

#photoUploadArea:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}

#photoUploadArea .icon-placeholder {
  font-size: 40px;
  display: block;
  margin-bottom: 10px;
}

#photoPreview {
  padding: 20px;
  text-align: center;
  border: 1px solid var(--form-border);
  border-radius: 16px;
  background: var(--card);
  display: none;
}

#previewImage {
  max-width: 150px;
  height: 150px;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  margin-bottom: 15px;
}

.photo-preview-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}

/* Sticky Form Actions */
.form-actions-sticky {
  position: sticky;
  bottom: 0;
  background: var(--card);
  padding: 20px 0 0;
  border-top: 1px solid var(--form-border);
  margin: 30px -30px -30px -30px;
  padding-left: 30px;
  padding-right: 30px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  z-index: 50;
}

.flex-1 { flex: 1; }

/* Live Preview Column */
/* Right side live preview column (always visible) */
.preview-column {
  background: var(--card);
  border-radius: 20px;
  box-shadow: 0 10px 40px -10px rgba(0,0,0,0.1);
  position: sticky;
  top: 90px;
  min-width: 300px;
  max-width: 450px;
  height: fit-content;
  z-index: 100;
}


/* Jab preview mode on ho, preview dikhao */
body.preview-mode .preview-column {
  display: block;
}


.preview-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--form-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--card);
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
}

.live-dot {
  width: 10px;
  height: 10px;
  background: #22c55e;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.preview-container-bg {
  background: var(--form-bg);
  padding: 40px 20px;
  min-height: 700px;
  display: flex;
  justify-content: center;
}

[data-theme="dark"] .preview-container-bg {
  background: #0f172a;
}


.paper-effect {
  background: var(--card);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  border-radius: 2px;
  width: 100%;
  padding: 30px;
  min-height: 550px;
}

[data-theme="dark"] .paper-effect {
  background: #1e293b;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.preview-actions {
  padding: 20px;
  background: var(--card);
  border-top: 1px solid var(--form-border);
  display: flex;
  gap: 10px;
  border-bottom-left-radius: 20px;
  border-bottom-right-radius: 20px;
}

.full-width {
  flex: 1;
}

/* Media Queries for Form */
@media (min-width: 768px) {
  .form-row {
    flex-direction: row;
    align-items: flex-start;
  }
  
  .field-label {
    width: 200px;
    min-width: 200px;
    padding-top: 12px;
    margin-bottom: 0;
  }
}

@media (max-width: 1024px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
  .preview-column {
    position: static;
    margin-top: 30px;
    max-width: none;
  }
  .form-actions-sticky {
    margin: 30px -20px -30px -20px;
    padding-left: 20px;
    padding-right: 20px;
    justify-content: space-between;
  }
}

@media (max-width: 768px) {
  .form-actions-sticky {
    flex-direction: column;
  }
  .btn.flex-1 {
    width: 100%;
  }

  .preview-actions {
    flex-direction: column;
  }
  
  .form-row {
    flex-direction: column;
    align-items: flex-start;
    padding-right: 0;
  }

  .field-label {
    width: 100%;
    min-width: auto;
  }
  .field-wrapper {
    width: 100%;
  }
  .field-actions {
    position: static;
    margin-top: 10px;
    align-self: flex-end;
  }
}

/* Live Preview Background */
 /* Live Preview Background – neutral, template image sirf andar aayega */
.preview-container-bg {
  background: var(--form-bg);
  padding: 20px 8px;
  min-height: 0;
  display: flex;
  justify-content: center;
}

[data-theme="dark"] .preview-container-bg {
  background: #0f172a;
}


/* FAQ */
.faq-q {
  width: 100%;
  text-align: left;
  padding: 18px 20px;
  border-radius: 12px;
  border: 1px solid var(--form-border);
  background: var(--card);
  margin-top: 12px;
  cursor: pointer;
  font-weight: 600;
  color: var(--text-main);
  position: relative;
}

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

.faq-q.open {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary-dark);
}

.faq-a {
  display: none;
  padding: 20px;
  color: var(--muted);
  line-height: 1.6;
  background: var(--form-bg);
  border-radius: 0 0 12px 12px;
}

/* =========================================
   CLEAN PHOTO GRID FOR FORMATS - FIXED CENTERING
   ========================================= */

.formats-section {
  width: 100%;
  max-width: 1200px; /* NEW */
  margin: 0 auto; /* NEW */
  
  padding: 40px 20px;
  background: var(--bg) !important;
  border-radius: 20px;
  
  display: flex;
  flex-direction: column;
  align-items: center;
}


/* Fix: Center the grid properly using auto-fit and justify-content */
/* =========================================
   RESPONSIVE GRID: Desktop(4) - Tablet(3) - Mobile(2)
   ========================================= */

.formats-section {
  width: 100%;
  padding: 40px 20px;
  /* Section ke content ko center karne ke liye */
  display: flex;
  flex-direction: column;
  align-items: center; 
  box-shadow: 0 8px 28px rgba(0,0,0,0.2);
  margin-top: 60px;
}

/* Grid Container Setup */
.formats-photo-grid {
  display: grid !important;          /* Grid system on */
  width: 100%;
  max-width: 1200px;                 /* Zyada se zyada itna chouda hoga */
  margin: 30px auto !important;      /* Pure grid ko center mein rakhega */
  
  /* --- DESKTOP DEFAULT: 4 COLUMNS --- */
  grid-template-columns: repeat(4, 1fr) !important; 
  gap: 25px;                         /* Beech ka gap */
}

/* Card Styling - Grid ke hisab se width automatic lega */
.format-photo-card {
  width: 100% !important;            /* Grid cell ko pura bharega */
  height: auto;
  aspect-ratio: 3/4;                 /* Photo ka shape maintain karega */
  margin: 0 !important;
  
  /* Styling Elements */
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  background: var(--card);
  transition: transform 0.3s ease;
}

.format-photo-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.format-photo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.format-photo-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity .3s ease;
}

.format-photo-card:hover .format-photo-overlay {
  opacity: 1;
}

/* Select button UI improve */
.select-format-btn {
  background: var(--primary);
  border: none;
  color: #fff;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all .3s;
}

.select-format-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}
/* =========================================
   MEDIA QUERIES (Tablet & Mobile)
   ========================================= */

/* Tablet View (iPad, etc.): 3 Columns */
@media (max-width: 1024px) {
  .formats-photo-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 20px;
  }
}

/* Mobile View (Phones): 2 Columns */
@media (max-width: 768px) {
  .formats-photo-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 15px;
    padding: 0 10px; /* Mobile pe side padding thodi kam */
  }
  
  /* Select Button ko thoda chhota karein mobile par */
  .select-format-btn {
    padding: 8px 12px;
    font-size: 12px;
  }
}

/* Very Small Mobile (Optional fix for layout safety) */
@media (max-width: 350px) {
  .formats-photo-grid {
    gap: 10px;
  }
}

/* Footer */
.site-footer {
  background: var(--card);
  border-top: 1px solid var(--form-border);
  padding: 40px 0;
  margin-top: 80px;
  color: var(--muted);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-links a {
  margin-left: 24px;
  color: var(--muted);
  text-decoration: none;
}

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

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 2000;
}

.modal[aria-hidden="false"] {
  display: flex;
}

.modal-content {
  background: var(--card);
  padding: 30px;
  border-radius: 16px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  position: relative;
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #999;
}

.payment-options {
  display: flex;
  gap: 10px;
  margin: 20px 0;
}

.payment-options label {
  border: 1px solid #ddd;
  padding: 10px;
  border-radius: 8px;
  cursor: pointer;
  flex: 1;
  text-align: center;
}

[data-theme="dark"] .payment-options label {
  border-color: #475569;
}

.payment-options input:checked + span {
  color: var(--primary);
  font-weight: bold;
}

.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 12px;
  margin-top: 10px;
}

/* Toast */
.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  background: #1f2937;
  color: #fff;
  padding: 14px 24px;
  border-radius: 12px;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s;
  z-index: 3000;
  box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

[data-theme="dark"] .toast {
  background: #334155;
}

.toast.show {
  opacity: 1;
  transform: none;
}

/* Responsive */
@media (max-width: 1024px) {
  .hero-wrapper {
    text-align: center;
    padding: 60px 0;
  }
  .hero {
    flex-direction: column;
  }
  .hero-right {
    width: 100%;
    margin-top: 40px;
  }
}

@media (max-width: 768px) {
  .header-inner {
    flex-wrap: wrap;
    padding: 10px 0;
  }
  .main-nav {
    display: none;
    width: 100%;
    order: 3;
    flex-direction: column;
    background: var(--card);
    margin-top: 10px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
  }
  .main-nav.active {
    display: flex;
  }
  .mobile-menu-btn {
    display: block;
  }
  .header-cta {
    display: none;
  }
  .floating-img {
    width: 300px;
    transform: none !important;
  }
  .floating-card {
    display: none;
  }
}

.p-4 {
  padding: 1rem;
}

/* DARK MODE FIXES & OVERRIDES (Cleaned up) */
[data-theme="dark"] .formats-section {
  background: var(--card) !important;
}

[data-theme="dark"] .format-photo-card {
  background: var(--card);
  border: 1px solid var(--form-border);
}

/* Fix theme toggle button */
.theme-toggle {
  display: flex;
  align-items: center;
  margin-right: 10px;
}

.theme-checkbox:checked + .theme-label .theme-ball {
  transform: translateX(24px);
}

/* Fix header in dark mode */
[data-theme="dark"] .site-header {
  background: var(--header-bg);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .brand-title {
  background: linear-gradient(to right, var(--text-main), var(--primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Fix hero section in dark mode */
[data-theme="dark"] .hero-wrapper {
  background:
    linear-gradient(to right, rgba(15, 23, 42, 0.95) 30%, rgba(15, 23, 42, 0.8) 100%),
    url('../images/home.webp');
}

[data-theme="dark"] .hero h1 {
  background: -webkit-linear-gradient(0deg, var(--text-main), var(--primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

[data-theme="dark"] .lead {
  color: var(--muted);
}

/* Fix form in dark mode */
[data-theme="dark"] .form-column {
  background: var(--card);
  border-color: var(--form-border);
}

[data-theme="dark"] .accordion-group {
  border-color: var(--form-border);
}

[data-theme="dark"] .accordion-header {
  background-color: var(--card);
  border-bottom-color: var(--form-border);
  color: var(--text-main);
}

/* Fix preview in dark mode */
[data-theme="dark"] .preview-column {
  background: var(--card);
  border-color: var(--form-border);
}

[data-theme="dark"] .preview-header {
  border-bottom-color: var(--form-border);
}

[data-theme="dark"] .paper-effect {
  background: var(--card);
  color: var(--text-main);
}

/* Fix FAQ in dark mode */
[data-theme="dark"] .faq-q {
  background: var(--card);
  border-color: var(--form-border);
  color: var(--text-main);
}

[data-theme="dark"] .faq-a {
  background: var(--form-bg);
  color: var(--muted);
}


/* =========================================
   BIODATA PREVIEW TEMPLATES
   ========================================= */

.biodata-template {
  max-width: 800px;
  margin: 0 auto;
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: #111827;
}

[data-theme="dark"] .biodata-template {
  color: #e5e7eb;
}

.bio-border {
  border: 4px solid #eab308;
  border-radius: 18px;
  padding: 24px 20px 18px;
  background-color: #fffbeb;
  position: relative;

  /* 🔁 TEMPLATE BACKGROUND BEHAVIOUR */
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center top;
}

/* Different color themes per format (1–4 demo, baaki same style use karenge) */
/* ---------------- Template 1 – Golden Royal ---------------- */
/* ===========================
   TEMPLATE 1 – GOLDEN DESIGN
   =========================== */

/* Frame + background image sirf format 1 ke liye */
.template-1 .bio-border {
  border: 4px solid #d4af37;
  border-radius: 18px;
  padding: 8px;                     /* outer frame padding */
  background-color: #fffbeb;
  position: relative;
  background-size: 100% 100%;
  background-repeat: no-repeat;
  background-position: center top;
  overflow: hidden;                  /* text kabhi frame se bahar na jaye */
}

/* Inner safe area – sirf format 1 */
.template-1 .bio-inner {
  max-width: 86%;
  margin: 0 auto;
  padding: 36px 40px 32px;
}


/* Name + labels + titles golden / bold */
.template-1 .bio-name,
.template-1 .bio-section-title,
.template-1 .bio-label {
  color: #a26f10;
  font-weight: 700;
}

/* Name thoda bada aur royal */
.template-1 .bio-name {
  font-size: 24px;
  letter-spacing: 0.06em;
}

/* Section headings – golden pill box */
.template-1 .bio-section-title {
  display: inline-block;
  padding: 5px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(184, 138, 27, 0.8);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 13px;
  margin-bottom: 8px;
}

/* Rows / spacing thoda compact */
.template-1 .bio-section {
  margin-bottom: 16px;
}

.template-1 .bio-section-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Template chip (FORMAT 1) golden */
.template-1 .bio-template-chip {
  color: #a26f10;
  border-color: rgba(184, 138, 27, 0.6);
  font-weight: 600;
  background: rgba(255, 255, 255, 0.95);
}

/* Photo / right column alignment sirf format 1 (agar chaho) */
.template-1 .bio-main {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.template-1 .bio-main-left {
  flex: 1;
}

.template-1 .bio-main-right {
  width: 140px;
  flex-shrink: 0;
  display: flex;
  justify-content: flex-end;
}

/* Mobile pe format 1 ka layout */
/* @media (max-width: 768px) {
  .template-1 .bio-main {
    flex-direction: column-reverse;
  }

  .template-1 .bio-main-right {
    width: 100%;
    justify-content: center;
    margin-bottom: 10px;
  }

  .template-1 .bio-inner {
    padding: 18px 14px 22px;
  }
} */


/* Header */
.bio-header {
  text-align: center;
  margin-bottom: 16px;
}

.bio-top-script {
  font-size: 18px;
  font-weight: 700;
  color: #b45309;
  margin-bottom: 4px;
}

.bio-template-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,0.08);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #6b7280;
  background: rgba(255,255,255,0.9);
  margin-bottom: 6px;
}

.bio-name {
  margin: 4px 0 0;
  font-size: 22px;
  font-weight: 700;
}

.bio-sub {
  margin-top: 4px;
  font-size: 13px;
  color: #6b7280;
}

/* Main layout: left = sections, right = photo */
.bio-main {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.bio-main-left {
  flex: 1;
}

.bio-main-right {
  width: 140px;
  flex-shrink: 0;
  display: flex;
  justify-content: flex-end;
}

/* Photo styles */
.bio-photo {
  width: 120px;
  height: 150px;
  object-fit: cover;
  border-radius: 12px;
  border: 2px solid rgba(0,0,0,0.08);
  box-shadow: 0 6px 12px rgba(0,0,0,0.15);
  background: #e5e7eb;
  display: block;
}

.bio-photo-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: #6b7280;
}

/* Sections */
.bio-section {
  margin-bottom: 14px;
}

.bio-section-title {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  margin-bottom: 6px;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(0,0,0,0.08);
}

.bio-section-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Each row: label left, value right */
.bio-row {
  display: flex;
  gap: 10px;
  font-size: 13px;
  padding: 2px 0;
}

.bio-label {
  flex: 0 0 40%;
  font-weight: 600;
}

.bio-value {
  flex: 1;
  word-break: break-word;
}

/* About text */
.bio-about {
  font-size: 13px;
  line-height: 1.5;
}

/* Footer */
.bio-footer {
  margin-top: 10px;
  font-size: 11px;
  text-align: right;
  color: #9ca3af;
  border-top: 1px dashed rgba(0,0,0,0.15);
  padding-top: 6px;
}

/* Responsive: stack on small screens */
@media (max-width: 768px) {
  .bio-main {
    flex-direction: column-reverse;
  }

  .bio-main-right {
    width: 100%;
    justify-content: center;
    margin-bottom: 10px;
  }

  .bio-row {
    flex-direction: row;
  }

  .bio-label {
    flex-basis: 45%;
  }
}

/* ---------- FORM VIEW vs PREVIEW VIEW TOGGLE ---------- */

/* Normal mode: 2-column grid; lekin preview-column display:none hai already */

/* Preview mode: sirf preview dikhe, full width, center me A4 jaisa */
/* ---------- FORM VIEW vs PREVIEW VIEW TOGGLE ---------- */

body.preview-mode .form-grid {
  grid-template-columns: minmax(0, 1fr);
}

body.preview-mode .form-column {
  display: none;              /* form hide */
}

body.preview-mode .preview-column {
  position: static;           /* sticky off */
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
}

body.preview-mode .preview-container-bg {
  padding: 40px 0;
  justify-content: center;
}

/* Preview area ke andar card ko center karo */
#previewArea.paper-effect {
  padding: 16px 0;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  display: flex;
  justify-content: center;
}

#previewArea .biodata-template {
  max-width: 800px;
  width: 100%;
}


body.preview-mode .form-actions-sticky {
  display: none;
}


/* ---------- FORM VIEW vs PREVIEW VIEW TOGGLE ---------- */

body.preview-mode .form-grid {
  grid-template-columns: minmax(0, 1fr);
}

body.preview-mode .form-column {
  display: none;              /* form hide */
}

body.preview-mode .preview-column {
  position: static;           /* sticky off */
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
}

body.preview-mode .preview-container-bg {
  padding: 40px 0;
  justify-content: center;
}

/* Preview area ke andar card ko center karo – 
 /* Live preview wrapper – common for all screens */
#previewArea.paper-effect {
  padding: 16px 0;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  display: flex;
  justify-content: center;
}

/* Card = A4 width jaisa */
#previewArea .biodata-template {
  max-width: 800px;
  width: 100%;
}

body.preview-mode .form-actions-sticky {
  display: none;
}
@media (max-width: 768px) {
  /* Form ke niche preview aayega, full width */
  .preview-column {
    max-width: 100%;
    width: 100%;
  }

  /* Card ko screen se thoda chota rakhna (A4 feel) */
  #previewArea .biodata-template {
    max-width: calc(100vw - 32px);   /* left-right 16px margin */
    margin: 0 auto;
  }

  /* Outer background thoda tight */
  .preview-container-bg {
    padding: 24px 0;
  }
}

/* ===== Mobile preview A4 style ===== */
@media (max-width: 768px) {

  /* Form ke baad preview full-width column me aayega */
  .preview-column {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
  }

  /* Preview container card ko center kare */
  #previewArea.paper-effect {
    padding: 16px 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    display: flex !important;
    justify-content: center !important;
  }

  /* Actual biodata card – phone width se thoda chhota (A4 look) */
  #previewArea .biodata-template {
    max-width: 380px;         /* typical phone se thoda chhota */
    width: 100%;
    margin: 0 auto;
  }

  /* Just in case koi aur rule override kar raha ho */
  .template-1 .bio-border {
    margin: 0 auto;
  }
}

/* ========== MOBILE A4 PREVIEW (sirf live preview ke liye) ========== */
@media (max-width: 768px) {
  /* Preview column full width, card centre */
  .preview-column {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
  }

  #previewArea.paper-effect {
    padding: 8px 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: flex-start !important;
    overflow-x: hidden;
  }

}


/* Yahan se main A4 card ko chhota dikhayenge */
   /* #previewArea .biodata-template {
    width: 800px;              /* desktop A4 width */
    /* max-width: none; */
    /* transform: scale(0.40);    🔥 40% size – pehle 0.55 tha */
    /* transform-origin: top center; */
    /* margin-bottom: 40px;       neeche thoda extra space */
  /* } */ 


/* ================== LIVE PREVIEW BOX – COMMON ================== */

 /* ================== LIVE PREVIEW BOX – COMMON ================== */

/* Right side column */
.preview-column {
  position: sticky;
  top: 88px;
  align-self: flex-start;
  z-index: 1;
}

/* Outer card wrapper */
.preview-container-bg {
  background: #ffffff;
  border-radius: 18px;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Actual box jisme biodata render hota hai */
#previewArea.paper-effect {
  background: #f9fafb;
  border-radius: 16px;
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.25);
  padding: 20px 0;
  
  /* --- IMPORTANT FIX --- */
  height: auto !important;      /* Height JS set karega */
  min-height: 600px;            /* Kam se kam itna rahe */
  overflow: hidden !important;  /* Scrollbar GAYAB */
  max-height: none !important;  /* Height limit hata di */
  /* --------------------- */
  
  display: flex;
  justify-content: center;
  align-items: flex-start;
  transition: height 0.3s ease;
}

/* Card ko hamesha center rakho */
#previewArea .biodata-template {
  margin: 0 auto;
  transform-origin: top center; /* Zoom hamesha upar se ho */
  box-shadow: 0 10px 30px rgba(0,0,0,0.15); /* Card shadow */
}

/* ================== LIVE PREVIEW BOX – MOBILE ================== */

@media (max-width: 768px) {
  .form-grid {
    display: flex;
    flex-direction: column;
  }

  .form-column { order: 1; }
  .preview-column { order: 2; position: static; }

  .preview-container-bg {
    padding: 10px;
  }

  #previewArea.paper-effect {
    min-height: 400px;
    padding: 10px 0;
    /* Mobile pe bhi scrollbar nahi chahiye */
    overflow: hidden !important; 
    max-height: none !important;
  }
}

/* ================== LIVE PREVIEW BOX – MOBILE ================== */

@media (max-width: 768px) {
  /* Form ke niche preview full width aayega */
  .form-grid {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 24px;
  }

  .form-column {
    order: 1;
  }

  .preview-column {
    order: 2;
    position: static;              /* sticky off on mobile */
    max-width: 100%;
    width: 100%;
  }

  .preview-container-bg {
    border-radius: 16px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
    padding: 16px 12px 14px;
  }

  #previewArea.paper-effect {
    max-height: auto;             /* fixed box height */
    padding: 10px 0;
  }

  #previewArea .biodata-template {
    max-width: 420px;              /* phone screen se thoda chhota */
    width: 100%;
  }
}

/* PDF-SPECIFIC STYLES */
@media print, (prefers-reduced-motion: reduce) {
  .biodata-template {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    color-adjust: exact !important;
  }
  
  .bio-border {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    background-image: none !important;
    background-color: #fffbeb !important;
    border: 4px solid #d4af37 !important;
  }
}

/* Ensure PDF has proper colors */
html2canvas-container, .html2canvas-container {
  background: #ffffff !important;
}

/* =========================================
   PDF PRINT STYLES
   ========================================= */

/* Force colors to print exactly */
@media print {
  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    color-adjust: exact !important;
  }
  
  .biodata-template {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    color-adjust: exact !important;
    background: #ffffff !important;
  }
  
  /* Template 1 golden border fix */
  .template-1 .bio-border,
  .bio-border.template-1 {
    background-color: #fffbeb !important;
    border: 4px solid #d4af37 !important;
    background-image: none !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
  
  /* Golden text fix */
  .template-1 .bio-name,
  .template-1 .bio-section-title,
  .template-1 .bio-label,
  .template-1 .bio-template-chip {
    color: #a26f10 !important;
    font-weight: 700 !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
  
  /* Ensure all text is visible */
  .bio-row,
  .bio-value,
  .bio-about,
  .bio-footer {
    color: #000000 !important;
    -webkit-print-color-adjust: exact !important;
  }
}

/* PDF-specific helper classes */
.pdf-visible {
  -webkit-print-color-adjust: exact !important;
  print-color-adjust: exact !important;
}

.pdf-bg-golden {
  background-color: #fffbeb !important;
  background-image: none !important;
}

.pdf-border-golden {
  border: 4px solid #d4af37 !important;
}
/* New Hero Features */
.hero-features {
  margin: 24px 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--muted);
}

.hero-stats {
  display: flex;
  gap: 30px;
  margin: 20px 0;
  padding: 20px;
  background: var(--card);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
}

.stat-item {
  text-align: center;
}

.stat-item strong {
  display: block;
  font-size: 24px;
  color: var(--primary);
}

.stat-item span {
  font-size: 12px;
  color: var(--muted);
}

.text-btn {
  background: none;
  border: none;
  color: var(--primary);
  text-decoration: underline;
  cursor: pointer;
  font-size: 14px;
}

.trust-badges {
  display: flex;
  gap: 15px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
  padding: 6px 12px;
  background: var(--card);
  border-radius: 20px;
  border: 1px solid var(--form-border);
}

/* Contact Section Styles */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-top: 40px;
}

.contact-form, .contact-info {
  background: var(--card);
  padding: 30px;
  border-radius: 20px;
  box-shadow: var(--shadow-md);
}

.contact-form h3, .contact-info h3 {
  margin-bottom: 20px;
  color: var(--text-main);
}

/* Sirf contact-form ke andar wale form-group */
.contact-form .form-group {
  margin-bottom: 20px;
}

.contact-form .form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--text-main);
}


/* Sirf contact-form ke andar wale form-row */
.contact-form .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}


.contact-method {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
  align-items: flex-start;
}

.contact-icon {
  font-size: 24px;
  color: var(--primary);
}

.contact-method h4 {
  margin: 0 0 5px 0;
  color: var(--text-main);
}

.contact-method p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.social-links {
  margin-top: 30px;
}

.social-icons {
  display: flex;
  gap: 15px;
  margin-top: 10px;
}

.social-icons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--primary-light);
  border-radius: 50%;
  color: var(--primary);
  font-size: 18px;
  text-decoration: none;
  transition: all 0.3s;
}

.social-icons a:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-3px);
}

/* Updated Footer Styles */
.footer-main {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-section h4 {
  margin-bottom: 20px;
  color: var(--text-main);
}

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

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.3s;
}

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

.footer-brand {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 20px;
}

.footer-description {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 20px;
}

.footer-newsletter {
  margin-top: 20px;
}

.newsletter-form {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.newsletter-form input {
  flex: 1;
  padding: 10px;
  border: 1px solid var(--form-border);
  border-radius: 8px;
  background: var(--form-bg);
  color: var(--text-main);
}

.footer-contact {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--form-border);
}

.footer-contact p {
  margin: 5px 0;
  font-size: 14px;
  color: var(--muted);
}

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

.footer-social, .payment-methods {
  display: flex;
  align-items: center;
  gap: 15px;
}

.footer-social a {
  color: var(--muted);
  text-decoration: none;
  font-size: 18px;
  transition: color 0.3s;
}

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

.payment-methods span {
  font-size: 18px;
}

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

@media (max-width: 768px) {
  .hero-features {
    grid-template-columns: 1fr;
  }
  
  .hero-stats {
    flex-direction: column;
    gap: 15px;
  }
  
  .form-row {
    grid-template-columns: 1fr;
  }
  
  .footer-main {
    grid-template-columns: 1fr;
  }
  
  .footer-bottom {
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }
}

:root {
  /* Modern & Premium Color Palette */
  --bg: #fff0f5; /* Soft Rose Background */
  --card: rgba(255, 255, 255, 0.9); /* Glass Effect Base */
  --card-border: rgba(255, 255, 255, 0.6);
  --muted: #64748b;
  --text-main: #1e293b;
  
  /* Primary Color - Hot Pink but Elegant */
  --primary: #e11d48; 
  --primary-hover: #be123c;
  --primary-light: #ffe4e6;
  
  /* Gold Accents for Wedding Feel */
  --accent-gold: #d97706;
  
  /* Shadows for Depth */
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.02);
  --shadow-md: 0 12px 24px -6px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 20px 40px -8px rgba(0, 0, 0, 0.08);
  --shadow-glow: 0 0 20px rgba(225, 29, 72, 0.15);

  --form-bg: #ffffff;
  --form-border: #e2e8f0;
  --radius: 16px;
  
  font-family: 'Inter', system-ui, sans-serif;
}

/* Dark Mode Overrides */
[data-theme="dark"] {
  --bg: #0f172a;
  --card: rgba(30, 41, 59, 0.8);
  --card-border: rgba(255, 255, 255, 0.05);
  --text-main: #f8fafc;
  --muted: #94a3b8;
  --form-bg: #1e293b;
  --form-border: #334155;
  --primary: #fb7185;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { background: var(--bg); color: var(--text-main); line-height: 1.6; font-size: 16px; }

/* ================= HEADER (Glass Effect) ================= */
.site-header {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--card-border);
  position: sticky; top: 0; z-index: 1000;
  box-shadow: var(--shadow-sm);
}
[data-theme="dark"] .site-header { background: rgba(15, 23, 42, 0.8); }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 15px 0; }

.logo-mark {
  background: linear-gradient(135deg, var(--primary), #ec4899);
  color: white; width: 40px; height: 40px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center; font-size: 20px;
  box-shadow: var(--shadow-glow);
}

.brand-title { font-family: 'Playfair Display', serif; font-weight: 700; font-size: 22px; color: var(--text-main); }
.brand-sub { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--primary); font-weight: 600; }

/* Nav Pills */
.main-nav { background: rgba(255,255,255,0.5); padding: 4px; border-radius: 50px; border: 1px solid rgba(0,0,0,0.03); display: flex; gap: 4px; }
.main-nav a { padding: 8px 18px; border-radius: 20px; font-size: 14px; color: var(--muted); text-decoration: none; font-weight: 500; transition: all 0.3s; }
.main-nav a:hover, .main-nav a.active { background: white; color: var(--primary); box-shadow: var(--shadow-sm); }

/* ================= HERO SECTION ================= */
.hero-wrapper {
  background: radial-gradient(circle at top right, #ffe4e6 0%, transparent 40%),
              radial-gradient(circle at bottom left, #e0f2fe 0%, transparent 40%);
  padding: 80px 0 60px;
  position: relative;
  overflow: hidden;
}

.hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: 3.5rem;
  line-height: 1.1;
  background: linear-gradient(to right, var(--text-main), var(--primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 20px;
}

.badge-pill {
  background: linear-gradient(135deg, #fff, #fff0f5);
  border: 1px solid #fecdd3;
  color: var(--primary);
  padding: 8px 16px;
  border-radius: 30px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
  display: inline-block;
  margin-bottom: 20px;
}

/* Buttons */
.btn { border: none; cursor: pointer; border-radius: 12px; font-weight: 600; transition: all 0.3s; display: inline-flex; align-items: center; gap: 8px; }
.btn.primary { 
  background: linear-gradient(135deg, var(--primary), #be123c);
  color: white; 
  padding: 12px 28px;
  box-shadow: 0 4px 15px rgba(225, 29, 72, 0.3);
}
.btn.primary:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(225, 29, 72, 0.4); }

.btn.outline { background: white; border: 1px solid var(--form-border); color: var(--text-main); padding: 12px 28px; }
.btn.outline:hover { border-color: var(--primary); color: var(--primary); background: #fff5f7; }

/* Floating 3D Cards Animation */
.hero-showcase { perspective: 1000px; position: relative; }
.floating-img {
  width: 100%; border-radius: 20px;
  box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
  transform: rotateY(-10deg) rotateX(5deg);
  transition: transform 0.5s ease;
  border: 4px solid white;
}
.hero-showcase:hover .floating-img { transform: rotateY(0) rotateX(0); }

/* ================= FORM STYLING (The Important Part) ================= */
.form-column {
  background: var(--card);
  backdrop-filter: blur(10px);
  border: 1px solid var(--card-border);
  border-radius: 24px;
  padding: 30px;
  box-shadow: var(--shadow-lg);
}

/* Accordions */
.accordion-group {
  border: 1px solid var(--form-border);
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 16px;
  background: white;
  transition: all 0.3s;
}
.accordion-group.open { border-color: var(--primary); box-shadow: 0 4px 12px rgba(225, 29, 72, 0.08); }

.accordion-header {
  width: 100%; padding: 16px 20px; background: transparent; border: none;
  display: flex; justify-content: space-between; align-items: center;
  font-weight: 600; font-size: 16px; cursor: pointer; color: var(--text-main);
}
.accordion-group.open .accordion-header { background: var(--primary-light); color: var(--primary); }

/* Inputs with "Float" effect */
.form-input, select, textarea {
  width: 100%; padding: 12px 16px; border-radius: 10px;
  border: 2px solid #f1f5f9; background: #f8fafc;
  font-size: 14px; color: var(--text-main); transition: all 0.3s;
}
.form-input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--primary); background: white;
  box-shadow: 0 0 0 4px rgba(225, 29, 72, 0.1);
}

.field-label { font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 6px; display: block; }

/* Add Field Button */
.add-field-btn {
  width: 100%; border: 2px dashed var(--primary); color: var(--primary);
  background: rgba(225, 29, 72, 0.05); padding: 10px; border-radius: 10px;
  font-weight: 600; cursor: pointer; transition: 0.3s;
}
.add-field-btn:hover { background: var(--primary); color: white; border-style: solid; }

/* Sticky Form Actions */
.form-actions-sticky {
  background: rgba(255,255,255,0.9); backdrop-filter: blur(5px);
  border-top: 1px solid var(--form-border); padding: 20px;
  margin: 20px -30px -30px; border-radius: 0 0 24px 24px;
}

/* ================= PREVIEW AREA (Realistic Paper) ================= */
.preview-column { position: sticky; top: 100px; }
.preview-container-bg {
  background: #cbd5e1; /* Desk color */
  border-radius: 20px; padding: 20px;
  box-shadow: inset 0 0 20px rgba(0,0,0,0.1);
}

.paper-effect {
  background: white;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1), 0 10px 30px rgba(0,0,0,0.1);
  min-height: 600px;
  padding: 0; display: flex; justify-content: center;
  transform-origin: top center;
  transition: transform 0.3s;
}

/* Live Dot Animation */
.live-dot {
  width: 8px; height: 8px; background: #22c55e; border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.2); animation: pulse 2s infinite;
}
@keyframes pulse { 0% {box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4);} 70% {box-shadow: 0 0 0 10px rgba(34, 197, 94, 0);} 100% {box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);} }

/* ================= TEMPLATES GRID (Cards) ================= */
.templates-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 30px; }

.template-card {
  border-radius: 16px; overflow: hidden; background: white;
  box-shadow: var(--shadow-md); transition: all 0.3s ease;
  position: relative; border: 1px solid transparent;
}
.template-card:hover { transform: translateY(-10px); box-shadow: var(--shadow-lg); border-color: var(--primary); }

.template-card.selected { border: 3px solid var(--primary); transform: scale(1.02); }

.template-thumb { height: 320px; position: relative; }
.template-photo-img { width: 100%; height: 100%; object-fit: cover; }

/* Select Button Overlay */
.template-photo-overlay {
  position: absolute; inset: 0; background: rgba(0,0,0,0.4);
  backdrop-filter: blur(3px); display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: 0.3s;
}
.template-card:hover .template-photo-overlay { opacity: 1; }

.select-template-btn {
  background: white; color: var(--text-main); padding: 10px 24px;
  border-radius: 30px; font-weight: 700; border: none; cursor: pointer;
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}
.select-template-btn:hover { background: var(--primary); color: white; }

/* ================= RESPONSIVE ================= */
@media (max-width: 768px) {
  .hero h1 { font-size: 2.2rem; }
  .form-column { padding: 20px; }
  .form-actions-sticky { flex-direction: column; gap: 10px; }
  .preview-container-bg { padding: 10px; background: #f1f5f9; }
}

/* =========================================
   ULTIMATE ROYAL WEDDING DARK MODE
   ========================================= */

/* 1. Starry Night Background & Custom Scrollbar */
[data-theme="dark"] body {
  /* Midnight Blue Gradient Base */
  background-color: #020617;
  background-image: 
    radial-gradient(white, rgba(255,255,255,.2) 2px, transparent 3px),
    radial-gradient(white, rgba(255,255,255,.15) 1px, transparent 2px),
    radial-gradient(white, rgba(255,255,255,.1) 2px, transparent 3px),
    radial-gradient(circle at 50% 0%, #1e1b4b 0%, #0f172a 60%, #020617 100%);
  background-size: 550px 550px, 350px 350px, 250px 250px, 100% 100%;
  background-position: 0 0, 40px 60px, 130px 270px, 0 0;
  
  position: relative;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Custom Scrollbar for Dark Mode */
[data-theme="dark"] ::-webkit-scrollbar { width: 10px; }
[data-theme="dark"] ::-webkit-scrollbar-track { background: #0f172a; }
[data-theme="dark"] ::-webkit-scrollbar-thumb { 
  background: linear-gradient(to bottom, #b45309, #fbbf24); 
  border-radius: 5px; 
}

/* 2. Enhanced Floating Aurora Effect (Smoother) */
[data-theme="dark"] body::before,
[data-theme="dark"] body::after {
  content: ''; position: fixed; width: 400px; height: 400px;
  border-radius: 50%; filter: blur(100px); z-index: -1; opacity: 0.3;
  animation: floatMagic 12s infinite alternate ease-in-out;
}
/* Purple/Pink Haze */
[data-theme="dark"] body::before { background: #701a75; top: -100px; left: -100px; }
/* Golden/Orange Haze */
[data-theme="dark"] body::after { background: #b45309; bottom: -100px; right: -100px; animation-delay: -5s; }

@keyframes floatMagic {
  0% { transform: translate(0, 0) scale(1); opacity: 0.2; }
  50% { transform: translate(40px, 20px) scale(1.1); opacity: 0.4; }
  100% { transform: translate(-20px, 50px) scale(1); opacity: 0.3; }
}

/* 3. "Crystal" Glassmorphism Cards */
[data-theme="dark"] .form-column,
[data-theme="dark"] .preview-container-bg, 
[data-theme="dark"] .template-card,
[data-theme="dark"] .section-point-new,
[data-theme="dark"] .step-new {
  background: rgba(15, 23, 42, 0.6) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  /* Top border highlight for 3D glass effect */
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-top: 1px solid rgba(255, 255, 255, 0.2); 
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
}

/* 4. Luxury Gold Text Effect (Gold Foil) */
[data-theme="dark"] .brand-title,
[data-theme="dark"] h1 span {
  /* Real Gold Gradient */
  background: linear-gradient(to right, #bf953f, #fcf6ba, #b38728, #fbf5b7, #aa771c);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: none;
  font-weight: 800;
  letter-spacing: 0.5px;
}

[data-theme="dark"] h2,
[data-theme="dark"] .step-title-new {
  color: #e2e8f0;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

/* 5. Inputs: Deep Void Style */
[data-theme="dark"] .form-input,
[data-theme="dark"] select,
[data-theme="dark"] textarea {
  background: rgba(2, 6, 23, 0.6); /* Very dark background */
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fbbf24; /* Typing text is Gold */
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.5); /* Inner shadow for depth */
}

/* Focus State: Gold Glow */
[data-theme="dark"] .form-input:focus,
[data-theme="dark"] select:focus,
[data-theme="dark"] textarea:focus {
  border-color: #fbbf24;
  box-shadow: 0 0 15px rgba(251, 191, 36, 0.15), inset 0 2px 4px rgba(0,0,0,0.5);
  background: rgba(2, 6, 23, 0.9);
}

/* 6. Gold Borders & Hover Effects */
[data-theme="dark"] .template-card:hover {
  transform: translateY(-5px) scale(1.02);
  border-color: #fbbf24 !important;
  box-shadow: 0 0 25px rgba(251, 191, 36, 0.2) !important;
}

/* 7. Footer & FAQ Dark Styling */
[data-theme="dark"] .site-footer {
  background: #020617;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .faq-q {
  background: rgba(30, 41, 59, 0.4);
  color: #f1f5f9;
  border-color: rgba(255,255,255,0.05);
}
[data-theme="dark"] .faq-q.open {
  background: rgba(251, 191, 36, 0.1); /* Gold tint when open */
  color: #fbbf24;
  border-color: #fbbf24;
}
 
/* =========================================
   MOBILE MENU FIX (Solid & Premium)
   ========================================= */

@media (max-width: 768px) {
  /* 1. Header aur Menu ka positioning set karo */
  .header-inner {
    position: static;
  }
  
  .site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    /* Header ko bhi solid karo taaki scroll karte waqt upar ka text na dikhe */
    background: rgba(255, 255, 255, 0.98); 
  }
  
  [data-theme="dark"] .site-header {
    background: rgba(15, 23, 42, 0.98);
  }

  /* 2. Menu Container Styling */
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    
    /* FIX: Background ko zyada solid banaya hai (0.98 opacity) */
    background: rgba(255, 255, 255, 0.98); 
    backdrop-filter: blur(15px); /* Blur effect maintain rakha hai */
    -webkit-backdrop-filter: blur(15px);
    
    flex-direction: column;
    padding: 20px;
    
    /* Niche se gol corners aur strong shadow */
    border-radius: 0 0 24px 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    border-top: 1px solid rgba(0,0,0,0.05);
    z-index: 9999;
  }

  /* Dark Mode ke liye alag background */
  [data-theme="dark"] .main-nav {
    background: rgba(15, 23, 42, 0.98); /* Pitch dark blue, almost solid */
    border-top: 1px solid rgba(255,255,255,0.05);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  }

  /* 3. Animation (Smooth Slide) */
  .main-nav.active {
    display: flex;
    animation: slideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  }

  /* 4. Links Styling (Bada aur Clear) */
  .main-nav a {
    text-align: left; /* Text left align zyada clean lagta hai mobile pe */
    padding: 15px 20px;
    margin-bottom: 8px;
    border-radius: 12px;
    width: 100%;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-main); /* Theme color use karega */
    background: transparent; /* Default transparent */
    border: 1px solid transparent; /* Border space maintain karne ke liye */
    transition: all 0.2s ease;
  }

  /* Hover/Active State */
  .main-nav a:hover, 
  .main-nav a:active {
    background: rgba(225, 29, 72, 0.08); /* Halka Pink Highlight */
    color: var(--primary);
    padding-left: 25px; /* Thoda right shift hoga hover pe */
    border-color: rgba(225, 29, 72, 0.1);
  }

  /* Dark mode hover specific */
  [data-theme="dark"] .main-nav a:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fbbf24; /* Gold text on dark mode */
    border-color: rgba(251, 191, 36, 0.2);
  }

  @keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
  }
}

/* Logo Image Styling */
.logo-mark {
  /* Box ka size aur background wahi rahega */
  width: 44px; 
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden; /* Image bahar na nikle */
  padding: 0; /* Padding hata di taaki image control kar sakein */
}

.logo-img {
  width: 28px;  /* Image ka size thoda chhota rakha taaki border dikhe */
  height: 28px;
  object-fit: contain; /* Ratio kharab nahi hoga */
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1)); /* Image ke piche halki shadow */
}

/* Agar tum chahte ho ki image 'White' color ki ho jaye (jaise icon) to ye use karo: */
/* .logo-img {
  filter: brightness(0) invert(1); 
}
*/

/* =========================================
   SCROLL REVEAL ANIMATION (Appear on Scroll)
   ========================================= */

/* 1. Initial State (Hidden) */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(50px); /* Thoda niche rahega */
  transition: all 0.8s cubic-bezier(0.5, 0, 0, 1); /* Smooth easing */
  will-change: opacity, transform; /* Performance boost */
}

/* 2. Active State (Visible) - Jab JS class add karega */
.reveal-on-scroll.active {
  opacity: 1;
  transform: translateY(0); /* Apni jagah par aayega */
}

/* 3. Stagger Delay (Ek-ek karke aane ke liye) */
/* Agar elements group mein hain to thoda ruk kar aayenge */
.reveal-on-scroll:nth-child(1) { transition-delay: 0.1s; }
.reveal-on-scroll:nth-child(2) { transition-delay: 0.2s; }
.reveal-on-scroll:nth-child(3) { transition-delay: 0.3s; }
.reveal-on-scroll:nth-child(4) { transition-delay: 0.4s; }

/* =========================================
   ROYAL PRE-LOADER
   ========================================= */
#preloader {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: var(--bg); /* Theme background */
  z-index: 99999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease, visibility 0.5s;
}

/* Jab load ho jaye to chhupa do */
#preloader.loaded {
  opacity: 0;
  visibility: hidden;
}

/* Ring Animation */
.loader-ring {
  width: 60px; height: 60px;
  border: 4px solid rgba(225, 29, 72, 0.2);
  border-top: 4px solid var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  position: relative;
  margin-bottom: 20px;
}

.loader-diamond {
  position: absolute;
  top: -12px; left: 50%;
  transform: translateX(-50%);
  font-size: 20px;
  animation: sparkle 1s infinite alternate;
}

.loader-text {
  font-family: 'Playfair Display', serif;
  color: var(--primary);
  font-weight: 600;
  letter-spacing: 1px;
  animation: pulseText 1.5s infinite;
}

@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
@keyframes sparkle { 0% { opacity: 0.5; transform: translateX(-50%) scale(0.8); } 100% { opacity: 1; transform: translateX(-50%) scale(1.2); } }
@keyframes pulseText { 0% { opacity: 0.6; } 50% { opacity: 1; } 100% { opacity: 0.6; } }

/* Dark Mode Loader */
[data-theme="dark"] #preloader { background: #020617; }
[data-theme="dark"] .loader-text { color: #fbbf24; } /* Gold text */
[data-theme="dark"] .loader-ring { border-top-color: #fbbf24; border-color: rgba(251, 191, 36, 0.2); }

/* WhatsApp Float Button */
.whatsapp-float {
  position: fixed;
  bottom: 20px; left: 20px; /* Left side taaki 'Toast' message se na takraye */
  width: 50px; height: 50px;
  background: #25D366;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  z-index: 5000;
  transition: all 0.3s;
}
.whatsapp-float:hover { transform: translateY(-5px) scale(1.1); }
.whatsapp-float img { width: 30px; height: 30px; }

/* Calligraphy Font for Brand & Highlights */
.brand-title {
  font-family: 'Great Vibes', cursive !important; /* Cursive Font */
  font-size: 32px !important; /* Thoda bada */
  letter-spacing: 1px;
  background: linear-gradient(to right, var(--primary), #d97706); /* Pink to Gold */
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

[data-theme="dark"] .brand-title {
  background: linear-gradient(to right, #fff, #fbbf24); /* White to Gold */
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Section Headings me thoda style */
.section-header h2 {
  font-family: 'Playfair Display', serif;
}

/* =========================================
   WAVY FOOTER SHAPE
   ========================================= */
.custom-shape-divider-bottom {
  position: relative;
  bottom: -2px; /* Gap fix */
  left: 0;
  width: 100%;
  overflow: hidden;
  line-height: 0;
  transform: rotate(180deg); /* Wave ko ulta kiya taaki footer ke upar aaye */
  margin-top: 50px;
}

.custom-shape-divider-bottom svg {
  position: relative;
  display: block;
  width: calc(100% + 1.3px);
  height: 80px; /* Wave height */
}

/* Light Mode Wave Color (Footer se match hona chahiye) */
.custom-shape-divider-bottom .shape-fill {
  fill: var(--card); /* Footer background color */
}

/* Footer ko Wave ke saath chipka do */
.site-footer {
  margin-top: 0 !important; /* Gap hataya */
  padding-top: 20px;
}

/* Dark Mode adjustment */
[data-theme="dark"] .custom-shape-divider-bottom .shape-fill {
  fill: #020617; /* Dark footer color */
}

/* =========================================
   PERFECT LIVE PREVIEW (Miniature A4 Fix)
   ========================================= */

/* 1. Preview Container (Jiske andar template dikhega) */
#previewArea {
  overflow: hidden; /* Bahar nikle to kato mat, bas control karo */
  display: flex;
  justify-content: center;
  align-items: flex-start;
  background: var(--card); /* Background match */
  padding: 0;
  transition: height 0.3s ease; /* Height smooth change ho */
}

/* 2. Template ko "Real A4 Size" mein force karo */
/* Side Box mein hone par bhi ye A4 size ka rahega, bas zoom-out hoga */
.preview-column .biodata-template {
  width: 794px !important; /* A4 Width (Standard) */
  min-height: 1123px;      /* A4 Height */
  transform-origin: top center; /* Upar se chhota karo */
  box-shadow: 0 0 20px rgba(0,0,0,0.15); /* Paper shadow */
  margin: 0;
}

/* 3. Jab "Show Preview" dabayein (Full Screen Mode) */
/* Tab zoom hatana hai ya adjust karna hai */
body.preview-mode .preview-column .biodata-template {
  transform: scale(1) !important; /* Full size */
  width: 100% !important;
  max-width: 800px !important;
  margin: 0 auto 40px;
}

/* Mobile Fixes for Preview */
@media (max-width: 768px) {
  /* Mobile pe bhi preview ko scale karenge taaki kate nahi */
  #previewArea {
    padding: 10px 0;
  }
}


/* =========================================
   PREVIEW SCALING FIX
   ========================================= */

/* Preview area ko flexible banao */
#previewArea {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  overflow: hidden; /* Scrollbar nahi dikhna chahiye */
  transition: height 0.3s ease;
  padding-top: 20px;
}

/* Template ko force karo ki wo A4 size ka hi rahe (zoom hone se pehle) */
#previewArea .biodata-template {
  /* Important: Width fix rakhni hai taaki layout na tute */
  width: 794px !important; 
  min-height: 1123px;
  background-color: white;
  box-shadow: 0 0 15px rgba(0,0,0,0.1);
  transform-origin: top center;
}

/* Mobile responsive ke liye */
@media (max-width: 768px) {
  .preview-container-bg {
    padding: 10px;
  }
}

/* =========================================
   LAYOUT FIX: CENTER FORM & HIDE SIDE PREVIEW
   (Paste this at the very bottom of styles.css)
   ========================================= */

/* 1. Grid System Hatao -> Flex Lagao */
.form-grid {
  display: flex !important;
  justify-content: center !important;
  grid-template-columns: none !important;
  gap: 0 !important;
  width: 100%;
}

/* 2. Form ko Center me lao aur Width fix karo */
.form-column {
  width: 100%;
  max-width: 800px; /* Form jyada faila hua na dikhe */
  margin: 0 auto;   /* Center alignment */
  order: 1;         /* Ensure form comes first */
}

/* 3. Side Wala Preview HAMESHA Chupa do (Hide) */
.preview-column {
  display: none !important;
}

/* 4. Jab "Show Preview" button dabayein, tabhi Preview dikhana */
body.preview-mode .preview-column {
  display: block !important;
  width: 100%;
  max-width: 900px;
  margin: 20px auto;
  position: relative;
  z-index: 100;
}

/* 5. Preview Mode me Form ko Chupa do */
body.preview-mode .form-column {
  display: none !important;
}

/* 6. Preview Header ko thoda sundar banao */
.preview-header {
  border-radius: 16px 16px 0 0;
  justify-content: center;
  background: #fefce8;
  border-bottom: 1px solid #fde047;
  color: #854d0e;
}

/* =========================================
   LAYOUT FIX: CENTER FORM & HIDE SIDE PREVIEW
   (Paste this at the VERY BOTTOM of styles.css)
   ========================================= */

/* 1. Grid System Hatao -> Flex Lagao */
.form-grid {
  display: flex !important;
  justify-content: center !important;
  grid-template-columns: none !important;
  gap: 0 !important;
  width: 100%;
}

/* 2. Form ko Center me lao aur Width fix karo */
.form-column {
  width: 100%;
  max-width: 800px; /* Form jyada faila hua na dikhe */
  margin: 0 auto;   /* Center alignment */
  order: 1;         /* Ensure form comes first */
}

/* 3. Side Wala Preview HAMESHA Chupa do (Hide) */
.preview-column {
  display: none !important;
}

/* 4. Jab "Show Preview" button dabayein, tabhi Preview dikhana */
body.preview-mode .preview-column {
  display: block !important;
  width: 100%;
  max-width: 900px;
  margin: 20px auto;
  position: relative;
  z-index: 100;
}

/* 5. Preview Mode me Form ko Chupa do */
body.preview-mode .form-column {
  display: none !important;
}

/* 6. Preview Header ko thoda sundar banao */
.preview-header {
  border-radius: 16px 16px 0 0;
  justify-content: center;
  background: #fefce8;
  border-bottom: 1px solid #fde047;
  color: #854d0e;
}

/* =========================================
   LIVE PROGRESS BAR
   ========================================= */
.progress-container-sticky {
  background: var(--card);
  padding: 15px 20px;
  border-radius: 16px;
  margin-bottom: 20px;
  border: 1px solid var(--form-border);
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
  position: sticky;
  top: 90px; /* Header ke niche chipkega */
  z-index: 90;
}

.progress-labels {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-main);
}

.progress-track {
  width: 100%;
  height: 8px;
  background: #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #ef4444, #eab308, #22c55e); /* Red -> Yellow -> Green */
  border-radius: 10px;
  transition: width 0.4s ease-in-out;
}

/* Dark Mode Support */
[data-theme="dark"] .progress-container-sticky {
  background: rgba(30, 41, 59, 0.8);
  border-color: rgba(255,255,255,0.1);
  backdrop-filter: blur(10px);
}
[data-theme="dark"] .progress-track { background: #334155; }

.developer-credit a {
  color: #39FF14 !important;
  font-weight: 700;
  text-shadow: 0 0 8px rgba(57, 255, 20, 0.6);
}
