/**
 * Zaqta Components
 * Reusable UI components
 */

/* ===========================
   Hero Section
   =========================== */

.hero {
  padding: var(--space-24) 0 var(--space-20);
  background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(13, 148, 136, 0.08) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero-content {
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.hero-badge {
  margin-bottom: var(--space-6);
  animation-delay: 0.1s;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: var(--space-6);
  color: var(--text-primary);
  animation-delay: 0.2s;
}

.hero-gradient {
  background: linear-gradient(135deg, var(--brand-600) 0%, var(--brand-400) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-description {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-8);
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  animation-delay: 0.3s;
}

.hero-cta {
  display: flex;
  gap: var(--space-4);
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: var(--space-12);
  animation-delay: 0.4s;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: var(--space-12);
  flex-wrap: wrap;
  animation-delay: 0.5s;
}

.stat {
  text-align: center;
}

.stat-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--brand-600);
  margin-bottom: var(--space-2);
}

.stat-label {
  font-size: 0.875rem;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Mobile Hero */
@media (max-width: 768px) {
  .hero {
    padding: var(--space-16) 0 var(--space-12);
  }

  .hero-title {
    font-size: 2.25rem;
  }

  .hero-description {
    font-size: 1.125rem;
  }

  .hero-cta {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-cta .btn {
    width: 100%;
  }

  .hero-stats {
    gap: var(--space-8);
  }

  .stat-value {
    font-size: 1.75rem;
  }
}

/* ===========================
   Features Section
   =========================== */

.features {
  padding: var(--space-20) 0;
  background: var(--bg-primary);
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-16);
}

.section-title {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: var(--space-4);
  color: var(--text-primary);
}

.section-description {
  font-size: 1.25rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-8);
}

.feature-card {
  text-align: center;
  padding: var(--space-8);
  border-radius: var(--radius-xl);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  transition: all var(--transition-base);
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
  border-color: var(--brand-600);
}

.feature-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto var(--space-6);
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, var(--brand-600) 0%, var(--brand-400) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.feature-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: var(--space-3);
  color: var(--text-primary);
}

.feature-description {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 0;
}

/* Mobile Features */
@media (max-width: 768px) {
  .features {
    padding: var(--space-16) 0;
  }

  .section-title {
    font-size: 2rem;
  }

  .section-description {
    font-size: 1.125rem;
  }

  .features-grid {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }
}

/* ===========================
   Tools Section
   =========================== */

.tools-section {
  padding: var(--space-20) 0;
  background: var(--bg-secondary);
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--space-6);
}

.tool-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  text-align: center;
  transition: all var(--transition-base);
  cursor: pointer;
  text-decoration: none;
  display: block;
}

.tool-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
  border-color: var(--brand-600);
}

.tool-icon-wrapper {
  width: 80px;
  height: 80px;
  margin: 0 auto var(--space-4);
  border-radius: var(--radius-xl);
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-base);
}

.tool-card:hover .tool-icon-wrapper {
  background: var(--brand-50);
  transform: scale(1.05);
}

.tool-svg-icon {
  width: 48px;
  height: 48px;
}

.tool-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: var(--space-2);
  color: var(--text-primary);
}

.tool-description {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 0;
}

/* Mobile Tools */
@media (max-width: 768px) {
  .tools-section {
    padding: var(--space-16) 0;
  }

  .tools-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: var(--space-4);
  }

  .tool-card {
    padding: var(--space-4);
  }

  .tool-icon-wrapper {
    width: 60px;
    height: 60px;
  }

  .tool-svg-icon {
    width: 36px;
    height: 36px;
  }

  .tool-title {
    font-size: 1rem;
  }

  .tool-description {
    font-size: 0.75rem;
  }
}

/* ===========================
   Dropzone Component
   =========================== */

.dropzone {
  background: var(--bg-secondary);
  border: 3px dashed var(--border-color);
  border-radius: var(--radius-2xl);
  padding: var(--space-16);
  text-align: center;
  transition: all var(--transition-base);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.dropzone:hover {
  border-color: var(--brand-600);
  background: var(--brand-50);
}

.dropzone.dragover {
  border-color: var(--brand-600);
  background: var(--brand-100);
  transform: scale(1.02);
}

.dropzone-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto var(--space-6);
  opacity: 0.5;
}

.dropzone-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: var(--space-3);
  color: var(--text-primary);
}

.dropzone-description {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-6);
}

.dropzone-or {
  margin: var(--space-6) 0;
  color: var(--text-tertiary);
  font-weight: 500;
}

/* File Preview */
.file-preview {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4);
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  margin-top: var(--space-4);
}

.file-preview-icon {
  width: 48px;
  height: 48px;
  background: var(--brand-100);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand-600);
  flex-shrink: 0;
}

.file-preview-info {
  flex: 1;
  min-width: 0;
}

.file-preview-name {
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-preview-size {
  font-size: 0.875rem;
  color: var(--text-tertiary);
}

.file-preview-remove {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  border: none;
  background: var(--error);
  color: white;
  cursor: pointer;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.file-preview-remove:hover {
  background: #dc2626;
  transform: scale(1.05);
}

/* Progress Bar */
.progress-bar {
  width: 100%;
  height: 8px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-top: var(--space-4);
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--brand-600) 0%, var(--brand-400) 100%);
  border-radius: var(--radius-full);
  transition: width var(--transition-base);
  animation: progressShimmer 2s infinite;
}

@keyframes progressShimmer {
  0% { opacity: 1; }
  50% { opacity: 0.8; }
  100% { opacity: 1; }
}

/* Mobile Dropzone */
@media (max-width: 768px) {
  .dropzone {
    padding: var(--space-12);
  }

  .dropzone-icon {
    width: 60px;
    height: 60px;
  }

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

  .dropzone-description {
    font-size: 0.875rem;
  }
}

/* ===========================
   Toast Notifications
   =========================== */

.toast-container {
  position: fixed;
  top: var(--space-6);
  right: var(--space-6);
  z-index: var(--z-tooltip);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  max-width: 420px;
  pointer-events: none;
}

.toast {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  box-shadow: var(--shadow-xl);
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  pointer-events: auto;
  animation: slideInRight var(--transition-base) ease-out;
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.toast-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.toast-content {
  flex: 1;
  min-width: 0;
}

.toast-title {
  font-weight: 600;
  margin-bottom: var(--space-1);
  color: var(--text-primary);
}

.toast-message {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin: 0;
}

.toast-close {
  width: 24px;
  height: 24px;
  border: none;
  background: transparent;
  color: var(--text-tertiary);
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  transition: color var(--transition-fast);
}

.toast-close:hover {
  color: var(--text-primary);
}

/* Toast Variants */
.toast.success {
  border-left: 4px solid var(--success);
}

.toast.error {
  border-left: 4px solid var(--error);
}

.toast.warning {
  border-left: 4px solid var(--warning);
}

.toast.info {
  border-left: 4px solid var(--info);
}

/* Mobile Toast */
@media (max-width: 768px) {
  .toast-container {
    top: var(--space-4);
    right: var(--space-4);
    left: var(--space-4);
    max-width: none;
  }
}

/* ===========================
   Footer
   =========================== */

.site-footer {
  background: var(--bg-primary);
  border-top: 1px solid var(--border-color);
  padding: var(--space-16) 0 var(--space-8);
  margin-top: var(--space-20);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-12);
  margin-bottom: var(--space-12);
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.footer-brand {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
}

.footer-description {
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.6;
}

.footer-title {
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-primary);
  margin-bottom: var(--space-4);
}

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

.footer-links li {
  margin-bottom: var(--space-2);
}

.footer-links a {
  color: var(--text-secondary);
  font-size: 0.875rem;
  transition: color var(--transition-fast);
}

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

.footer-bottom {
  text-align: center;
  padding-top: var(--space-8);
  border-top: 1px solid var(--border-color);
  color: var(--text-tertiary);
  font-size: 0.875rem;
}

/* Mobile Footer */
@media (max-width: 768px) {
  .site-footer {
    padding: var(--space-12) 0 var(--space-6);
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }

  .footer-col:first-child {
    order: -1;
  }
}
