/* ==========================================================================
   UnifyBoard Design System
   ========================================================================== */

/* Custom Properties */
:root {
  /* Colors */
  --color-primary: #0082FC;
  --color-primary-dark: #0462FC;
  --color-primary-light: #66B0FF;
  --color-secondary: #111A29;
  --color-accent: #8B5CF6;
  --color-success: #10B981;
  --color-warning: #F59E0B;
  --color-error: #EF4444;
  
  /* Typography */
  --font-family-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-family-heading: 'noigrotesk', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  
  /* Spacing */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;
  --spacing-3xl: 4rem;
  
  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  
  /* Shadows */
  --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);
  
  /* Transitions */
  --transition-fast: 150ms ease-in-out;
  --transition-normal: 300ms ease-in-out;
  --transition-slow: 500ms ease-in-out;
}

/* ==========================================================================
   Custom Fonts - Using Google Fonts Noi Grotesk
   ========================================================================== */

/* Noi Grotesk is loaded via Google Fonts in the HTML head */

/* ==========================================================================
   Base Styles
   ========================================================================== */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family-primary);
  line-height: 1.6;
  color: var(--color-secondary);
  background-color: #ffffff;
}

/* ==========================================================================
   Typography
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-family-heading);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 var(--spacing-lg) 0;
}

h1 { font-size: clamp(2.5rem, 5vw, 4.5rem); }
h2 { font-size: clamp(2rem, 4vw, 3.5rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2.5rem); }
h4 { font-size: clamp(1.25rem, 2.5vw, 2rem); }
h5 { font-size: clamp(1.125rem, 2vw, 1.5rem); }
h6 { font-size: clamp(1rem, 1.5vw, 1.25rem); }

p {
  margin: 0 0 var(--spacing-lg) 0;
  line-height: 1.7;
}

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

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

/* ==========================================================================
   BUTTONS (DEPRECATED - Use Design System above)
   ========================================================================== */

/* ==========================================================================
   Legal Pages Typography & Spacing
   ========================================================================== */

/* Legal pages content spacing */
.legal-content h1,
.legal-content h2,
.legal-content h3,
.legal-content h4,
.legal-content h5,
.legal-content h6 {
  margin-top: 2rem;
  margin-bottom: 1rem;
  font-family: var(--font-family-heading);
}

.legal-content p {
  margin-bottom: 1.5rem;
  line-height: 1.7;
}

.legal-content ul,
.legal-content ol {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

.legal-content li {
  margin-bottom: 0.5rem;
}

/* External link arrow */
a[target="_blank"]::after {
  content: "\2197";
  margin-left: 0.25rem;
  font-size: 0.875em;
  vertical-align: super;
  line-height: 1;
  font-weight: bold;
}

/* Remove underline from external links */
a[target="_blank"] {
  text-decoration: none;
}

a[target="_blank"]:hover {
  text-decoration: none;
}

/* Remove arrow from social media icons in footer */
footer a[target="_blank"]::after {
  content: none;
}

/* Remove arrow from User Panel button */
.btn-primary[target="_blank"]::after {
  content: none;
}

/* Enhanced hover effects for white buttons in blue sections */
.bg-white.text-blue-600:hover,
.bg-white.text-purple-600:hover,
.bg-white.text-green-600:hover,
.bg-white.text-teal-600:hover {
  background-color: #f1f5f9 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Document end marker styling */
.document-end-marker {
  margin-top: 4rem;
  padding-top: 2rem;
}

/* Design System - Icon Container Standards */
.icon-container-standard {
  width: 3rem; /* w-12 */
  height: 3rem; /* h-12 */
  border-radius: 0.5rem; /* rounded-lg */
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-standard {
  font-size: 2.25rem; /* text-4xl */
  color: white;
}

/* ==========================================================================
   DESIGN SYSTEM - BUTTON STANDARDS
   ========================================================================== */

/*
   BUTTON ORDER STANDARD (GLOBAL)
   ==============================
   
   For global web standards and SaaS applications:
   
   • Secondary Button: LEFT
   • Primary Button: RIGHT
   
   This follows the most familiar pattern for users worldwide:
   - Cancel/Back actions on the left
   - Continue/Confirm actions on the right
   - Consistent with most SaaS platforms and web applications
   
   Examples:
   [Cancel] [Continue]
   [Back] [Next]
   [Watch Demo] [Explore Solutions]
   [Keep USD] [Switch to EGP]
   
   IMPORTANT: Always follow this order for consistency across the entire application.
*/

/* Primary Button Standard */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem; /* px-6 py-3 */
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: white;
  font-weight: 600;
  font-size: 1rem;
  border: none;
  border-radius: 0.5rem; /* rounded-lg */
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  box-shadow: 0 2px 4px rgba(59, 130, 246, 0.2);
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.btn-primary:hover::before {
  left: 100%;
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 100%);
  color: white !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-primary:active {
  transform: translateY(0);
}

/* Secondary Button Standard */
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 2rem; /* px-8 py-3 */
  background: transparent;
  color: var(--color-primary);
  font-weight: 600;
  font-size: 1rem;
  border: 2px solid var(--color-primary);
  border-radius: 0.5rem; /* rounded-lg */
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.btn-secondary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.08), transparent);
  transition: left 0.5s ease;
}

.btn-secondary:hover::before {
  left: 100%;
}

.btn-secondary:hover {
  background: rgba(59, 130, 246, 0.05);
  color: var(--color-primary);
  border-color: var(--color-primary);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.15);
}

.btn-secondary:active {
  transform: translateY(0);
}

/* White Button Standard (for dark backgrounds) */
.btn-white {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 2rem; /* px-8 py-3 */
  background: white;
  color: var(--color-primary);
  font-weight: 600;
  font-size: 1rem;
  border: none;
  border-radius: 0.5rem; /* rounded-lg */
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-white:hover {
  background: #f8fafc;
  color: var(--color-primary);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-white:active {
  transform: translateY(0);
}

/* Large Button Variant */
.btn-primary.btn-lg,
.btn-secondary.btn-lg,
.btn-white.btn-lg {
  padding: 1rem 2rem; /* px-8 py-4 */
  font-size: 1.125rem; /* text-lg */
}

/* Full Width Button Variant */
.btn-primary.btn-full,
.btn-secondary.btn-full,
.btn-white.btn-full {
  width: 100%;
  display: flex;
}

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 3rem;
  height: 3rem;
  background: rgba(59, 130, 246, 0.9);
  backdrop-filter: blur(8px);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  text-decoration: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(1rem);
  transition: all 0.3s ease;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: rgba(59, 130, 246, 1);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
}

.back-to-top i {
  font-size: 1.25rem;
  transition: transform 0.2s ease;
  color: white;
}

.back-to-top:hover i {
  transform: translateY(-1px);
  color: white;
}

.document-end-marker .wave-line {
  width: 2rem;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(209, 213, 219, 0.4) 20%, rgba(209, 213, 219, 0.4) 80%, transparent 100%);
  position: relative;
}

.document-end-marker .wave-line::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent 0%, rgba(209, 213, 219, 0.3) 20%, rgba(209, 213, 219, 0.3) 80%, transparent 100%);
  border-radius: 1px;
}

.document-end-marker .dots {
  font-size: 0.875rem;
  font-weight: 500;
  color: #9ca3af;
  letter-spacing: 0.25rem;
}

/* ==========================================================================
   Navigation
   ========================================================================== */

.nav-link {
  position: relative;
  font-weight: 500;
  color: var(--color-secondary);
  text-decoration: none;
  transition: color var(--transition-fast);
  padding: var(--spacing-sm) 0;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
  transition: width var(--transition-normal);
}

.nav-link:hover::after,
.nav-link:focus::after {
  width: 100%;
}

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



.mobile-nav-link {
  display: block;
  padding: var(--spacing-md);
  color: var(--color-secondary);
  text-decoration: none;
  font-weight: 500;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.mobile-nav-link:hover {
  background-color: var(--color-primary);
  color: white;
}



/* ==========================================================================
   Cards
   ========================================================================== */

.solution-card {
  background: white;
  padding: var(--spacing-2xl);
  border-radius: 0.5rem; /* 8px */
  box-shadow: var(--shadow-md);
  transition: all var(--transition-normal);
  border: 1px solid rgba(0, 0, 0, 0.05);
  position: relative;
  overflow: hidden;
}

.solution-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
  transform: scaleX(0);
  transition: transform var(--transition-normal);
}

.solution-card:hover::before {
  transform: scaleX(1);
}

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

.solution-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 0.5rem; /* 8px */
  margin-bottom: var(--spacing-lg);
}

.pricing-card {
  background: white;
  padding: var(--spacing-2xl);
  border-radius: 0.5rem; /* 8px */
  box-shadow: var(--shadow-md);
  transition: all var(--transition-normal);
  border: 2px solid transparent;
  position: relative;
}

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

.pricing-card.border-blue-500 {
  border-color: var(--color-primary);
}

/* ==========================================================================
   Forms
   ========================================================================== */

.form-input {
  width: 100%;
  padding: var(--spacing-md);
  border: 2px solid #e5e7eb;
  border-radius: 0.5rem; /* 8px */
  font-size: 1rem;
  transition: all var(--transition-fast);
  background: white;
}

.form-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(0, 130, 252, 0.1);
}

.form-input::placeholder {
  color: #9ca3af;
}

/* ==========================================================================
   Animations
   ========================================================================== */

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.animate-fade-in-up {
  animation: fadeInUp 0.6s ease-out;
}

.animate-fade-in-left {
  animation: fadeInLeft 0.6s ease-out;
}

.animate-fade-in-right {
  animation: fadeInRight 0.6s ease-out;
}

.animate-scale-in {
  animation: scaleIn 0.6s ease-out;
}

/* ==========================================================================
   Utilities
   ========================================================================== */

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

.glass-effect {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* ==========================================================================
   Text Gradients
   ========================================================================== */

.text-gradient-primary {
  background: linear-gradient(135deg, #111A29 0%, #0082FC 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 200% 200%;
  animation: gradient-shift 3s ease-in-out infinite;
}

.text-gradient-secondary {
  background: linear-gradient(135deg, #0082FC 0%, #8B5CF6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

@keyframes gradient-shift {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 768px) {
  .solution-card,
  .pricing-card {
    padding: var(--spacing-xl);
  }
  
  .btn-primary,
  .btn-secondary {
    padding: var(--spacing-sm) var(--spacing-lg);
    font-size: 0.875rem;
  }
}

@media (max-width: 640px) {
  :root {
    --spacing-xl: 1.5rem;
    --spacing-2xl: 2rem;
    --spacing-3xl: 3rem;
  }
  
  .solution-card,
  .pricing-card {
    padding: var(--spacing-lg);
  }
}

/* ==========================================================================
   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 */
*:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* Skip link */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.sr-only:focus {
  position: static;
  width: auto;
  height: auto;
  padding: var(--spacing-sm) var(--spacing-md);
  margin: 0;
  overflow: visible;
  clip: auto;
  white-space: normal;
  border: 2px solid var(--color-primary);
  border-radius: 0.5rem; /* 8px */
  background: var(--color-primary);
  color: white;
  z-index: 9999;
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
  .btn-primary,
  .btn-secondary {
    background: none !important;
    color: black !important;
    border: 1px solid black !important;
    box-shadow: none !important;
  }
  
  .solution-card,
  .pricing-card {
    box-shadow: none !important;
    border: 1px solid #ccc !important;
  }
}
