/* ============================================
   LUMIXSA AI - MAIN STYLESHEET
   Production-Level CSS with Theme System
   ============================================ */

/* CSS Variables for Theme System */
:root {
  /* Dark Mode (Default) */
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-card: rgba(30, 41, 59, 0.7);
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --accent-primary: #6366f1;
  --accent-secondary: #8b5cf6;
  --accent-cyan: #06b6d4;
  --border-color: rgba(148, 163, 184, 0.2);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  --glass-bg: rgba(30, 41, 59, 0.6);
  --glass-border: rgba(255, 255, 255, 0.1);
  --gradient-hero: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #06b6d4 100%);
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;
}

/* Light Mode */
[data-theme="light"] {
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.9);
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --accent-primary: #4f46e5;
  --accent-secondary: #7c3aed;
  --accent-cyan: #0891b2;
  --border-color: rgba(148, 163, 184, 0.3);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  --glass-bg: rgba(255, 255, 255, 0.8);
  --glass-border: rgba(0, 0, 0, 0.1);
  --gradient-hero: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #0891b2 100%);
}

/* Smooth theme transition */
* {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Reset & Base */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }
h4 { font-size: clamp(1.25rem, 2vw, 1.5rem); }

p {
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

a {
  color: var(--accent-primary);
  text-decoration: none;
  transition: all 0.3s ease;
}

a:hover {
  color: var(--accent-cyan);
}

/* Container */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
}

.container-narrow {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Glassmorphism Card */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 1rem;
  box-shadow: var(--shadow);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 0.75rem;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
}

.btn-primary {
  background: var(--gradient-hero);
  color: white;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.5);
  color: white;
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 2px solid var(--border-color);
}

.btn-secondary:hover {
  background: var(--bg-secondary);
  border-color: var(--accent-primary);
}

/* Navigation */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
  padding: 1rem 0;
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
}

.logo-circle {
  width: 45px;
  height: 45px;
  background: var(--gradient-hero);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
  font-weight: 700;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

/* New Logo Image Style */
.logo-img {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
  transition: transform 0.3s ease;
}

.logo:hover .logo-img {
  transform: scale(1.05);
}

/* ============================================
   AI ASSISTANT - FRESH BUILD
   ============================================ */

.ai-section {
  padding: 4rem 0;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%);
}

.ai-header {
  text-align: center;
  margin-bottom: 2rem;
}

.ai-header h2 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.ai-header p {
  color: var(--text-secondary);
}

/* Chat Container */
.ai-chat-wrapper {
  max-width: 700px;
  margin: 0 auto;
}

.ai-chat-container {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 1.5rem;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

/* Messages Area */
.ai-chat-messages {
  height: 350px;
  overflow-y: auto;
  padding: 1.5rem;
  background: var(--bg-primary);
}

/* Individual Message */
.ai-msg {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1rem;
  animation: fadeIn 0.3s ease;
}

.ai-msg.user {
  flex-direction: row-reverse;
}

.ai-msg.typing .dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--text-muted);
  border-radius: 50%;
  margin: 0 2px;
  animation: bounce 1.4s infinite;
}

.ai-msg.typing .dot:nth-child(1) { animation-delay: -0.32s; }
.ai-msg.typing .dot:nth-child(2) { animation-delay: -0.16s; }
.ai-msg.typing .dot:nth-child(3) { animation-delay: 0s; }

@keyframes bounce {
  0%, 80%, 100% { transform: scale(0); }
  40% { transform: scale(1); }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Avatar */
.ai-msg-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--gradient-hero);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.1rem;
}

/* Message Bubble */
.ai-msg-bubble {
  padding: 0.875rem 1.25rem;
  border-radius: 1rem;
  max-width: 80%;
  line-height: 1.6;
  word-wrap: break-word;
}

.ai-msg-bubble.bot {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-top-left-radius: 0.25rem;
}

.ai-msg-bubble.user {
  background: var(--accent-primary);
  color: white;
  border-top-right-radius: 0.25rem;
}

/* Controls */
.ai-chat-controls {
  display: flex;
  gap: 0.5rem;
  padding: 1rem;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
}

.ai-chat-input {
  flex: 1;
  padding: 0.75rem 1rem;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  color: var(--text-primary);
  font-size: 1rem;
  outline: none;
}

.ai-chat-input:focus {
  border-color: var(--accent-primary);
}

.ai-chat-send {
  padding: 0.75rem 1.5rem;
  background: var(--gradient-hero);
  color: white;
  border: none;
  border-radius: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.ai-chat-send:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.ai-chat-voice {
  padding: 0.75rem;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  font-size: 1.25rem;
  cursor: pointer;
  transition: all 0.2s;
}

.ai-chat-voice:hover {
  border-color: var(--accent-primary);
}

/* Responsive */
@media (max-width: 768px) {
  .ai-chat-messages {
    height: 300px;
    padding: 1rem;
  }
  
  .ai-msg-bubble {
    max-width: 85%;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
  }
  
  .ai-chat-controls {
    flex-wrap: wrap;
  }
  
  .ai-chat-input {
    width: 100%;
    order: 1;
  }
  
  .ai-chat-voice,
  .ai-chat-send {
    order: 2;
    flex: 1;
  }
}

@media (max-width: 480px) {
  .ai-chat-messages {
    height: 250px;
  }
  
  .ai-header h2 {
    font-size: 1.5rem;
  }
}

/* Blog System Styles */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2.5rem;
}

.blog-card-advanced {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 1.25rem;
  overflow: hidden;
  transition: all 0.4s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.blog-card-advanced:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  border-color: var(--accent-primary);
}

.blog-card-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.blog-card-advanced:hover .blog-card-image {
  transform: scale(1.05);
}

.blog-card-content {
  padding: 1.75rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.blog-card-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  font-size: 0.875rem;
}

.blog-card-category {
  background: var(--gradient-hero);
  color: white;
  padding: 0.35rem 0.875rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.blog-card-date {
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.blog-card-title {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 0.875rem;
  line-height: 1.3;
  color: var(--text-primary);
}

.blog-card-excerpt {
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 1.5rem;
  flex: 1;
}

.blog-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-color);
}

.blog-card-readtime {
  font-size: 0.875rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.blog-card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: var(--accent-primary);
  transition: all 0.3s ease;
}

.blog-card-link:hover {
  gap: 0.75rem;
  color: var(--accent-cyan);
}

/* Blog Article Page Styles */
.blog-article-header {
  text-align: center;
  padding: 4rem 0;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
  border-bottom: 1px solid var(--border-color);
}

.blog-article-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.blog-article-category {
  background: var(--gradient-hero);
  color: white;
  padding: 0.5rem 1.25rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.875rem;
}

.blog-article-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.blog-article-excerpt {
  font-size: 1.25rem;
  color: var(--text-secondary);
  max-width: 700px;
  margin: 0 auto;
}

.blog-article-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 3rem 2rem;
}

.blog-article-content h2 {
  font-size: 1.875rem;
  margin-top: 3rem;
  margin-bottom: 1.25rem;
  color: var(--text-primary);
}

.blog-article-content h3 {
  font-size: 1.5rem;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.blog-article-content p {
  margin-bottom: 1.5rem;
  line-height: 1.8;
  color: var(--text-secondary);
}

.blog-article-content ul,
.blog-article-content ol {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

.blog-article-content li {
  margin-bottom: 0.75rem;
  line-height: 1.7;
  color: var(--text-secondary);
}

.blog-article-content strong {
  color: var(--text-primary);
}

.blog-article-image {
  width: 100%;
  border-radius: 1rem;
  margin: 2rem 0;
}

.blog-article-faq {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 1rem;
  padding: 2rem;
  margin: 3rem 0;
}

.blog-article-faq h3 {
  margin-top: 0;
  margin-bottom: 1.5rem;
}

.faq-item {
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.faq-item:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.faq-question {
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.faq-answer {
  color: var(--text-secondary);
  line-height: 1.7;
}

.blog-author-section {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 1rem;
  padding: 2rem;
  margin-top: 3rem;
}

.blog-author-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--gradient-hero);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  flex-shrink: 0;
}

.blog-author-info h4 {
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.blog-author-info p {
  color: var(--text-secondary);
  margin-bottom: 0;
  font-size: 0.95rem;
}

/* Pros and Cons Table */
.pros-cons-table {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin: 2rem 0;
}

.pros-box,
.cons-box {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 1rem;
  padding: 1.5rem;
}

.pros-box {
  border-left: 4px solid var(--success);
}

.cons-box {
  border-left: 4px solid var(--error);
}

.pros-box h4,
.cons-box h4 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.pros-box h4 {
  color: var(--success);
}

.cons-box h4 {
  color: var(--error);
}

/* Lazy Loading */
.lazy-image {
  opacity: 0;
  transition: opacity 0.3s ease;
}

.lazy-image.loaded {
  opacity: 1;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-links a {
  color: var(--text-secondary);
  font-weight: 500;
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent-primary);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-hero);
  transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

/* Theme Toggle */
.theme-toggle {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 50px;
  padding: 0.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.25rem;
  transition: all 0.3s ease;
}

.theme-toggle:hover {
  border-color: var(--accent-primary);
}

/* Mobile Menu */
.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
}

.mobile-menu-btn span {
  width: 25px;
  height: 3px;
  background: var(--text-primary);
  border-radius: 3px;
  transition: all 0.3s ease;
}

.mobile-nav {
  display: none;
  position: fixed;
  top: 70px;
  right: -100%;
  width: 280px;
  height: calc(100vh - 70px);
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border-left: 1px solid var(--glass-border);
  padding: 2rem;
  flex-direction: column;
  gap: 1.5rem;
  transition: right 0.3s ease;
  z-index: 999;
}

.mobile-nav.active {
  right: 0;
}

.mobile-nav a {
  color: var(--text-primary);
  font-size: 1.1rem;
  font-weight: 500;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-color);
}

/* Sections */
.section {
  padding: 6rem 0;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-header h2 {
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-header p {
  max-width: 600px;
  margin: 0 auto;
  font-size: 1.125rem;
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding-top: 80px;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 50%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(139, 92, 246, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 40% 80%, rgba(6, 182, 212, 0.1) 0%, transparent 50%);
  pointer-events: none;
}

.hero-content {
  text-align: center;
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 50px;
  font-size: 0.875rem;
  color: var(--accent-cyan);
  margin-bottom: 1.5rem;
}

.hero h1 {
  margin-bottom: 1.5rem;
  line-height: 1.1;
}

.hero h1 span {
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-description {
  font-size: 1.25rem;
  max-width: 600px;
  margin: 0 auto 2rem;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* AI Chat Section - Extended Styles */
.ai-container {
  max-width: 800px;
  margin: 0 auto;
}

.ai-header {
  text-align: center;
  margin-bottom: 2rem;
}

.ai-chat-box {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 1.5rem;
  overflow: hidden;
}

.ai-messages {
  height: 300px;
  overflow-y: auto;
  padding: 1.5rem;
}

.ai-message {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  animation: fadeInUp 0.3s ease;
}

.ai-message.user {
  flex-direction: row-reverse;
}

.ai-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ai-message.bot .ai-avatar {
  background: var(--gradient-hero);
  color: white;
}

.ai-message.user .ai-avatar {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.ai-bubble {
  background: var(--bg-secondary);
  padding: 1rem 1.25rem;
  border-radius: 1rem;
  max-width: 70%;
}

.ai-message.user .ai-bubble {
  background: var(--accent-primary);
  color: white;
}

.ai-input-area {
  display: flex;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-color);
  background: var(--bg-secondary);
}

.ai-input {
  flex: 1;
  padding: 0.875rem 1.25rem;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  color: var(--text-primary);
  font-size: 1rem;
  outline: none;
}

.ai-input:focus {
  border-color: var(--accent-primary);
}

.ai-send-btn {
  padding: 0.875rem 1.5rem;
  background: var(--gradient-hero);
  color: white;
  border: none;
  border-radius: 0.75rem;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
}

.ai-send-btn:hover {
  transform: scale(1.05);
}

.ai-voice-btn {
  padding: 0.875rem;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  cursor: pointer;
  font-size: 1.25rem;
  transition: all 0.3s ease;
}

.ai-voice-btn:hover {
  border-color: var(--accent-primary);
}

/* Cards Grid */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 1rem;
  padding: 2rem;
  transition: all 0.3s ease;
  cursor: pointer;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  border-color: var(--accent-primary);
}

.card-icon {
  width: 60px;
  height: 60px;
  background: var(--gradient-hero);
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  margin-bottom: 1.5rem;
}

.card h3 {
  margin-bottom: 0.75rem;
}

.card p {
  margin-bottom: 1.5rem;
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
}

/* Tool Cards */
.tool-card {
  position: relative;
  overflow: hidden;
}

.tool-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-hero);
}

.tool-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  padding: 0.25rem 0.75rem;
  background: var(--accent-primary);
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 50px;
}

/* Blog Cards */
.blog-card {
  display: flex;
  flex-direction: column;
}

.blog-image {
  width: 100%;
  height: 200px;
  background: var(--gradient-hero);
  border-radius: 0.75rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}

.blog-meta {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.blog-category {
  color: var(--accent-primary);
  font-weight: 600;
}

/* About Section */
.about-intro {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 4rem;
  align-items: center;
}

.about-image {
  width: 100%;
  aspect-ratio: 1;
  background: var(--gradient-hero);
  border-radius: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 6rem;
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 3rem;
}

.stat-card {
  text-align: center;
  padding: 2rem;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 1rem;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Contact Form */
.contact-form {
  max-width: 600px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text-primary);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 1rem 1.25rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  color: var(--text-primary);
  font-size: 1rem;
  outline: none;
  transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-group textarea {
  min-height: 150px;
  resize: vertical;
}

.form-error {
  color: var(--error);
  font-size: 0.875rem;
  margin-top: 0.5rem;
  display: none;
}

.form-error.show {
  display: block;
}

/* Contact Info */
.contact-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 4rem;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 1rem;
}

.contact-icon {
  width: 50px;
  height: 50px;
  background: var(--gradient-hero);
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

/* Footer */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 4rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 4rem;
  margin-bottom: 3rem;
}

.footer-brand p {
  margin: 1rem 0;
  max-width: 300px;
}

.footer-links h4 {
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

.footer-links ul {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.75rem;
}

.footer-links a {
  color: var(--text-secondary);
}

.footer-links a:hover {
  color: var(--accent-primary);
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
  color: var(--text-muted);
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.animate-fadeInUp {
  animation: fadeInUp 0.6s ease forwards;
}

.animate-pulse {
  animation: pulse 2s ease infinite;
}

.animate-float {
  animation: float 3s ease infinite;
}

/* Scroll animations */
.scroll-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease;
}

.scroll-reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Fallback: If JS is disabled or fails, show elements */
body:not(.js-loaded) .scroll-reveal {
  opacity: 1;
  transform: none;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .about-intro {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .about-image {
    max-width: 300px;
    margin: 0 auto;
  }
  
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
  
  .mobile-menu-btn {
    display: flex;
  }
  
  .mobile-nav {
    display: flex;
  }
  
  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .btn {
    width: 100%;
    max-width: 300px;
  }
  
  .about-stats {
    grid-template-columns: 1fr;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .ai-message {
    flex-direction: column;
  }
  
  .ai-bubble {
    max-width: 100%;
  }
}

/* Utility Classes */
.text-gradient {
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-center {
  text-align: center;
}

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mt-4 { margin-top: 2rem; }

/* Loading Spinner */
.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border-color);
  border-top-color: var(--accent-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Tool Page Specific Styles */
.tool-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 1.5rem;
}

.tool-input {
  width: 100%;
  padding: 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  color: var(--text-primary);
  font-size: 1rem;
  margin-bottom: 1rem;
}

.tool-output {
  min-height: 100px;
  padding: 1.5rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  margin-top: 1rem;
}

/* Article Styles */
.article-content h2 {
  margin-top: 3rem;
  margin-bottom: 1.5rem;
}

.article-content h3 {
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.article-content ul,
.article-content ol {
  margin-left: 2rem;
  margin-bottom: 1.5rem;
}

.article-content li {
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
}

/* Sitemap Styles */
.sitemap-section {
  margin-bottom: 3rem;
}

.sitemap-section h3 {
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--accent-primary);
}

.sitemap-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}

.sitemap-links a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 0.75rem;
  transition: all 0.3s ease;
}

.sitemap-links a:hover {
  border-color: var(--accent-primary);
  transform: translateX(5px);
}

/* Responsive Styles for New Components */
@media (max-width: 768px) {
  .ai-messages {
    height: 350px;
  }
  
  .ai-bubble {
    max-width: 85%;
  }
  
  .ai-header h2 {
    font-size: 1.75rem;
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .blog-grid {
    grid-template-columns: 1fr;
  }
  
  .blog-card-advanced {
    max-width: 100%;
  }
  
  .blog-article-content {
    padding: 2rem 1.5rem;
  }
  
  .blog-article-meta {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .pros-cons-table {
    grid-template-columns: 1fr;
  }
  
  .blog-author-section {
    flex-direction: column;
    text-align: center;
  }
  
  .ai-input-area {
    flex-wrap: wrap;
  }
  
  .ai-input {
    width: 100%;
    order: 1;
  }
  
  .ai-send-btn,
  .ai-voice-btn {
    order: 2;
    flex: 1;
  }
}

@media (max-width: 480px) {
  .ai-messages {
    height: 300px;
    padding: 1rem;
  }
  
  .ai-bubble {
    max-width: 90%;
    padding: 0.875rem 1rem;
  }
  
  .ai-avatar {
    width: 38px;
    height: 38px;
    font-size: 1rem;
  }
  
  .blog-card-content {
    padding: 1.25rem;
  }
  
  .blog-card-title {
    font-size: 1.15rem;
  }
  
  .blog-article-title {
    font-size: 1.75rem;
  }
}
