/* ============================================
   QR Code Generator - Main Stylesheet
   ============================================ */

/* CSS Variables */
:root {
  --primary-color: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #818cf8;
  --secondary-color: #10b981;
  --accent-color: #f59e0b;
  --text-dark: #1f2937;
  --text-light: #6b7280;
  --text-muted: #9ca3af;
  --bg-white: #ffffff;
  --bg-light: #f9fafb;
  --bg-gray: #f3f4f6;
  --border-color: #e5e7eb;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --transition: all 0.3s ease;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-dark);
  background-color: var(--bg-white);
}

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

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
  margin-bottom: 1rem;
  color: var(--text-light);
}

/* Container */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Header & Navigation */
.header {
  background-color: var(--bg-white);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-color);
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

/* Navigation Menu */
.nav-menu {
  display: flex;
  list-style: none;
  gap: 0.25rem;
  align-items: center;
}

.nav-menu > li {
  position: relative;
}

.nav-link {
  color: var(--text-light);
  font-weight: 500;
  padding: 0.5rem 0.75rem;
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary-color);
  background-color: rgba(99, 102, 241, 0.05);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 0.75rem;
  right: 0.75rem;
  height: 2px;
  background-color: var(--primary-color);
  transition: var(--transition);
  transform: scaleX(0);
}

.nav-link:hover::after,
.nav-link.active::after {
  transform: scaleX(1);
}

/* Dropdown Menu Styles */
.dropdown-toggle::after {
  content: '\f107';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  font-size: 0.75rem;
  margin-left: 0.25rem;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background-color: var(--bg-white);
  min-width: 220px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  padding: 0.5rem 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: var(--transition);
  z-index: 1001;
  border: 1px solid var(--border-color);
  margin-top: 0.5rem;
}

.dropdown:hover .dropdown-menu,
.dropdown:focus-within .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu li {
  list-style: none;
}

.dropdown-menu .nav-link {
  padding: 0.625rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  white-space: nowrap;
  border-radius: 0;
}

.dropdown-menu .nav-link::after {
  display: none;
}

.dropdown-menu .nav-link:hover {
  background-color: var(--bg-light);
  color: var(--primary-color);
}

.dropdown-menu .nav-link i {
  width: 20px;
  text-align: center;
  font-size: 0.875rem;
}

.dropdown-menu .nav-link.active {
  background-color: rgba(99, 102, 241, 0.1);
  color: var(--primary-color);
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  padding: 0.5rem;
}

.menu-toggle span {
  width: 24px;
  height: 2px;
  background-color: var(--text-dark);
  transition: var(--transition);
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, var(--bg-light) 0%, #eef2ff 100%);
  padding: 4rem 0;
  text-align: center;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.25rem;
  color: var(--text-light);
  margin-bottom: 2rem;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-lg);
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: white;
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-secondary {
  background-color: var(--bg-white);
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
  background-color: var(--primary-color);
  color: white;
}

.btn-success {
  background: linear-gradient(135deg, var(--secondary-color), #059669);
  color: white;
  box-shadow: var(--shadow-md);
}

.btn-success:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-block {
  width: 100%;
}

/* Section Styles */
.section {
  padding: 4rem 0;
}

.section-title {
  text-align: center;
  margin-bottom: 3rem;
}

.section-title h2 {
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}

.section-title p {
  color: var(--text-light);
  max-width: 600px;
  margin: 0 auto;
}

/* Tools Grid */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.tool-card {
  background-color: var(--bg-white);
  border-radius: var(--radius-xl);
  padding: 2rem;
  text-align: center;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  border: 1px solid var(--border-color);
}

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

.tool-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1.5rem;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
}

.tool-icon.upi { background: linear-gradient(135deg, #667eea, #764ba2); color: white; }
.tool-icon.whatsapp { background: linear-gradient(135deg, #25d366, #128c7e); color: white; }
.tool-icon.wifi { background: linear-gradient(135deg, #f093fb, #f5576c); color: white; }
.tool-icon.maps { background: linear-gradient(135deg, #4285f4, #34a853); color: white; }
.tool-icon.vcard { background: linear-gradient(135deg, #ff6b6b, #ee5a24); color: white; }
.tool-icon.link { background: linear-gradient(135deg, #3b82f6, #1d4ed8); color: white; }
.tool-icon.text { background: linear-gradient(135deg, #8b5cf6, #6d28d9); color: white; }
.tool-icon.email { background: linear-gradient(135deg, #f97316, #ea580c); color: white; }

.tool-card h3 {
  margin-bottom: 0.75rem;
  color: var(--text-dark);
}

.tool-card p {
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

/* Generator Page Styles */
.generator-section {
  padding: 3rem 0;
  background-color: var(--bg-light);
  min-height: calc(100vh - 200px);
}

.generator-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

@media (max-width: 768px) {
  .generator-container {
    grid-template-columns: 1fr;
  }
}

.generator-form {
  background-color: var(--bg-white);
  padding: 2rem;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
}

.generator-form h2 {
  margin-bottom: 1.5rem;
  color: var(--text-dark);
}

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

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text-dark);
}

.form-label span {
  color: var(--text-muted);
  font-weight: 400;
  font-size: 0.875rem;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 0.875rem 1rem;
  font-size: 1rem;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-lg);
  transition: var(--transition);
  font-family: inherit;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-textarea {
  resize: vertical;
  min-height: 100px;
}

/* QR Preview */
.qr-preview {
  background-color: var(--bg-white);
  padding: 2rem;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  text-align: center;
  position: sticky;
  top: 100px;
}

.qr-preview h3 {
  margin-bottom: 1.5rem;
  color: var(--text-dark);
}

.qr-container {
  min-height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--bg-light);
  border-radius: var(--radius-lg);
  margin-bottom: 1.5rem;
  padding: 2rem;
}

.qr-placeholder {
  text-align: center;
  color: var(--text-muted);
}

.qr-placeholder i {
  font-size: 4rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

#qrcode img,
#qrcode canvas {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-md);
}

/* Loading Animation */
.loading {
  display: none;
  text-align: center;
  padding: 2rem;
}

.loading.active {
  display: block;
}

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

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Error Messages */
.error-message {
  display: none;
  background-color: #fef2f2;
  color: #dc2626;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  margin-top: 0.5rem;
  font-size: 0.875rem;
  border-left: 4px solid #dc2626;
}

.error-message.active {
  display: block;
}

/* Success Messages */
.success-message {
  display: none;
  background-color: #ecfdf5;
  color: #059669;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  margin-top: 0.5rem;
  font-size: 0.875rem;
  border-left: 4px solid #059669;
}

.success-message.active {
  display: block;
}

/* FAQ Section */
.faq-section {
  background-color: var(--bg-white);
  padding: 4rem 0;
}

.faq-container {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid var(--border-color);
  padding: 1.5rem 0;
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  font-weight: 600;
  color: var(--text-dark);
}

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

.faq-question i {
  transition: var(--transition);
}

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

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.faq-item.active .faq-answer {
  max-height: 500px;
  padding-top: 1rem;
}

.faq-answer p {
  margin-bottom: 0;
  color: var(--text-light);
}

/* Info Section */
.info-section {
  background-color: var(--bg-light);
  padding: 3rem 0;
}

.info-content {
  max-width: 800px;
  margin: 0 auto;
}

.info-content h2 {
  color: var(--text-dark);
  margin-bottom: 1rem;
}

.info-content ul {
  list-style: none;
  padding-left: 0;
}

.info-content li {
  padding: 0.5rem 0;
  padding-left: 1.5rem;
  position: relative;
  color: var(--text-light);
}

.info-content li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--secondary-color);
  font-weight: bold;
}

/* Footer */
.footer {
  background-color: var(--text-dark);
  color: var(--bg-gray);
  padding: 3rem 0 1.5rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h4 {
  color: var(--bg-white);
  margin-bottom: 1rem;
  font-size: 1.125rem;
}

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

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

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

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

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

.footer-bottom {
  border-top: 1px solid #374151;
  padding-top: 1.5rem;
  text-align: center;
}

.footer-bottom p {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-bottom: 0;
}

/* Breadcrumb */
.breadcrumb {
  background-color: var(--bg-light);
  padding: 1rem 0;
  border-bottom: 1px solid var(--border-color);
}

.breadcrumb-list {
  display: flex;
  list-style: none;
  gap: 0.5rem;
  font-size: 0.875rem;
}

.breadcrumb-list li:not(:last-child)::after {
  content: '/';
  margin-left: 0.5rem;
  color: var(--text-muted);
}

.breadcrumb-list a {
  color: var(--text-light);
}

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

.breadcrumb-list li:last-child {
  color: var(--text-muted);
}

/* Page Header */
.page-header {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: white;
  padding: 3rem 0;
  text-align: center;
}

.page-header h1 {
  color: white;
  margin-bottom: 0.5rem;
}

.page-header p {
  color: rgba(255, 255, 255, 0.9);
  max-width: 600px;
  margin: 0 auto;
}

/* Features List */
.features-list {
  list-style: none;
  padding: 0;
}

.features-list li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0;
  color: var(--text-light);
}

.features-list i {
  color: var(--secondary-color);
  font-size: 1.25rem;
}

/* Responsive Design */
@media (max-width: 992px) {
  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--bg-white);
    flex-direction: column;
    padding: 1rem;
    box-shadow: var(--shadow-lg);
    gap: 0;
    max-height: calc(100vh - 70px);
    overflow-y: auto;
  }

  .nav-menu.active {
    display: flex;
  }

  .nav-menu > li {
    width: 100%;
  }

  .nav-link {
    padding: 0.875rem 1rem;
    border-bottom: 1px solid var(--border-color);
    border-radius: 0;
  }

  .nav-link::after {
    display: none;
  }

  /* Mobile Dropdown Styles */
  .dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    background-color: var(--bg-light);
    min-width: 100%;
    margin-top: 0;
    padding-left: 1rem;
    display: none;
  }

  .dropdown.active .dropdown-menu,
  .dropdown-menu.show {
    display: block;
  }

  .dropdown-toggle::after {
    content: '\f107';
    margin-left: auto;
    transition: transform 0.3s ease;
  }

  .dropdown.active .dropdown-toggle::after {
    transform: rotate(180deg);
  }

  .menu-toggle {
    display: flex;
  }
}

@media (max-width: 768px) {
  .hero {
    padding: 3rem 0;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero p {
    font-size: 1rem;
  }

  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.25rem; }

  .section {
    padding: 3rem 0;
  }

  .tools-grid {
    grid-template-columns: 1fr;
  }

  .generator-container {
    grid-template-columns: 1fr;
  }

  .qr-preview {
    position: static;
  }

  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 1.75rem;
  }

  .btn {
    padding: 0.75rem 1.25rem;
    font-size: 0.95rem;
  }

  .tool-card {
    padding: 1.5rem;
  }

  .generator-form,
  .qr-preview {
    padding: 1.5rem;
  }
}

/* Print Styles */
@media print {
  .header,
  .footer,
  .hero-buttons,
  .btn {
    display: none !important;
  }

  .qr-preview {
    box-shadow: none;
    border: 1px solid #000;
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus styles for keyboard navigation */
.btn:focus,
.form-input:focus,
.form-select:focus,
.form-textarea:focus,
.nav-link:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* Skip to main content link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--primary-color);
  color: white;
  padding: 8px;
  text-decoration: none;
  z-index: 100;
}

.skip-link:focus {
  top: 0;
}
