/* ========================================
   MEGA E SERVICES - PREMIUM CSS
   Glassmorphism Tech Agency Design
   ======================================== */

/* ========================================
   1. CSS VARIABLES & ROOT CONFIG
   ======================================== */
:root {
  /* Primary Colors */
  --deep-tech-blue: #0a1628;
  --accent-blue: #2563eb;
  --light-blue: #3b82f6;
  
  /* Glassmorphism Colors */
  --glass-white: rgba(255, 255, 255, 0.1);
  --glass-border: rgba(255, 255, 255, 0.2);
  --glass-shadow: rgba(0, 0, 0, 0.3);
  
  /* Text Colors */
  --dark-text: #1e293b;
  --light-text: #f8fafc;
  --muted-text: #94a3b8;
  
  /* Accent Colors */
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;
  
  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-2xl: 4rem;
  
  /* Typography */
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-secondary: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
  
  /* Transitions */
  --transition-fast: 200ms ease-out;
  --transition-medium: 300ms ease-out;
  --transition-slow: 500ms ease-out;
  
  /* Border Radius */
  --radius-sm: 0.5rem;
  --radius-md: 1rem;
  --radius-lg: 1.5rem;
  
  /* Backdrop Blur */
  --blur-sm: 8px;
  --blur-md: 12px;
  --blur-lg: 16px;
}

/* ========================================
   2. RESET & BASE STYLES
   ======================================== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-primary);
  background: linear-gradient(135deg, var(--deep-tech-blue) 0%, #1e3a8a 100%);
  color: var(--light-text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Background Animation Container */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('./resources/hero-bg.jpg') center/cover no-repeat;
  opacity: 0.3;
  z-index: -2;
}

body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 20% 50%, rgba(37, 99, 235, 0.1) 0%, transparent 50%),
              radial-gradient(circle at 80% 20%, rgba(59, 130, 246, 0.1) 0%, transparent 50%),
              radial-gradient(circle at 40% 80%, rgba(37, 99, 235, 0.05) 0%, transparent 50%);
  z-index: -1;
  animation: floatingOrbs 20s ease-in-out infinite;
}

@keyframes floatingOrbs {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  33% { transform: translateY(-20px) rotate(1deg); }
  66% { transform: translateY(10px) rotate(-1deg); }
}

/* ========================================
   3. GLASSMORPHISM UTILITY CLASSES
   ======================================== */
.glass {
  background: var(--glass-white);
  backdrop-filter: blur(var(--blur-md));
  border: 1px solid var(--glass-border);
  box-shadow: 0 8px 32px var(--glass-shadow);
}

.glass-sm {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(var(--blur-sm));
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.glass-lg {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(var(--blur-lg));
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.4);
}

/* ========================================
   4. TYPOGRAPHY
   ======================================== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-secondary);
  font-weight: 600;
  line-height: 1.2;
  color: var(--light-text);
}

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

p {
  margin-bottom: var(--space-md);
  color: var(--muted-text);
}

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

a:hover {
  color: var(--light-blue);
}

/* ========================================
   5. NAVIGATION
   ======================================== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: var(--space-sm) 0;
  transition: all var(--transition-medium);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  font-family: var(--font-secondary);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--light-text);
  text-decoration: none;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: var(--space-lg);
}

.nav-link {
  color: var(--light-text);
  font-weight: 500;
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.nav-link:hover,
.nav-link.active {
  background: var(--glass-white);
  backdrop-filter: blur(var(--blur-md));
  color: var(--accent-blue);
}

/* Mobile Navigation */
.nav-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
  padding: var(--space-xs);
}

.nav-toggle span {
  width: 25px;
  height: 3px;
  background: var(--light-text);
  margin: 3px 0;
  transition: var(--transition-fast);
  border-radius: 2px;
}

.nav-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  backdrop-filter: blur(4px);
}

/* ========================================
   6. BUTTONS
   ======================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-sm) var(--space-lg);
  font-family: var(--font-primary);
  font-weight: 600;
  font-size: 1rem;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
  min-height: 48px;
  min-width: 120px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-blue), var(--light-blue));
  color: white;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.4);
}

.btn-secondary {
  background: var(--glass-white);
  backdrop-filter: blur(var(--blur-md));
  border: 1px solid var(--glass-border);
  color: var(--light-text);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  color: var(--accent-blue);
  border: 2px solid var(--accent-blue);
}

.btn-ghost:hover {
  background: var(--accent-blue);
  color: white;
}

.btn-lg {
  padding: var(--space-md) var(--space-xl);
  font-size: 1.125rem;
  min-height: 56px;
}

.btn-sm {
  padding: var(--space-xs) var(--space-sm);
  font-size: 0.875rem;
  min-height: 40px;
}

/* ========================================
   7. LAYOUT & CONTAINERS
   ======================================== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.container-sm {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.section {
  padding: var(--space-2xl) 0;
}

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

.section-title {
  margin-bottom: var(--space-md);
}

.section-subtitle {
  color: var(--muted-text);
  font-size: 1.125rem;
  max-width: 600px;
  margin: 0 auto;
}

/* Grid System */
.grid {
  display: grid;
  gap: var(--space-lg);
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* Flexbox Utilities */
.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

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

/* ========================================
   8. HERO SECTION
   ======================================== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 80px;
  position: relative;
  overflow: hidden;
}

.hero-content {
  max-width: 800px;
  text-align: center;
  z-index: 2;
}

.hero-title {
  margin-bottom: var(--space-lg);
  background: linear-gradient(135deg, var(--light-text), var(--accent-blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--muted-text);
  margin-bottom: var(--space-xl);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-buttons {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  flex-wrap: wrap;
}

/* ========================================
   9. CARDS
   ======================================== */
.card {
  background: var(--glass-white);
  backdrop-filter: blur(var(--blur-md));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  transition: all var(--transition-medium);
  height: 100%;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px var(--glass-shadow);
  background: rgba(255, 255, 255, 0.15);
}

.card-header {
  margin-bottom: var(--space-lg);
}

.card-title {
  font-size: 1.5rem;
  margin-bottom: var(--space-sm);
  color: var(--light-text);
}

.card-subtitle {
  color: var(--accent-blue);
  font-weight: 600;
  margin-bottom: var(--space-md);
}

.card-price {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--light-text);
  margin-bottom: var(--space-sm);
}

.card-price span {
  font-size: 1rem;
  color: var(--muted-text);
  font-weight: 400;
}

.card-features {
  list-style: none;
  margin-bottom: var(--space-xl);
}

.card-features li {
  padding: var(--space-xs) 0;
  color: var(--muted-text);
  position: relative;
  padding-left: var(--space-lg);
}

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

/* Popular Card Highlight */
.card-popular {
  border: 2px solid var(--accent-blue);
  position: relative;
  transform: scale(1.05);
}

.card-popular::before {
  content: 'Most Popular';
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent-blue);
  color: white;
  padding: var(--space-xs) var(--space-md);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
}

/* ========================================
   10. PRICING TABLES
   ======================================== */
.pricing-table {
  background: var(--glass-white);
  backdrop-filter: blur(var(--blur-md));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: var(--space-2xl);
}

.pricing-header {
  background: rgba(37, 99, 235, 0.2);
  padding: var(--space-lg);
  text-align: center;
}

.pricing-table table {
  width: 100%;
  border-collapse: collapse;
}

.pricing-table th,
.pricing-table td {
  padding: var(--space-md);
  text-align: center;
  border-bottom: 1px solid var(--glass-border);
}

.pricing-table th {
  background: rgba(255, 255, 255, 0.05);
  font-weight: 600;
  color: var(--light-text);
}

.pricing-table td {
  color: var(--muted-text);
}

.pricing-table tr:hover {
  background: rgba(255, 255, 255, 0.05);
}

/* Mobile Pricing Cards */
.pricing-mobile {
  display: none;
}

.pricing-card-mobile {
  background: var(--glass-white);
  backdrop-filter: blur(var(--blur-md));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  margin-bottom: var(--space-lg);
}

.pricing-card-header {
  text-align: center;
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid var(--glass-border);
}

/* ========================================
   11. FORMS
   ======================================== */
.form-group {
  margin-bottom: var(--space-lg);
}

.form-label {
  display: block;
  margin-bottom: var(--space-xs);
  font-weight: 500;
  color: var(--light-text);
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: var(--space-sm);
  background: var(--glass-white);
  backdrop-filter: blur(var(--blur-md));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  color: var(--light-text);
  font-family: var(--font-primary);
  font-size: 1rem;
  transition: all var(--transition-fast);
  min-height: 48px;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

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

.form-error {
  color: var(--error);
  font-size: 0.875rem;
  margin-top: var(--space-xs);
  display: none;
}

/* ========================================
   12. WHATSAPP BUTTON
   ======================================== */
.whatsapp-btn {
  position: fixed;
  bottom: var(--space-lg);
  right: var(--space-lg);
  z-index: 999;
  background: #25d366;
  color: white;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.3);
  transition: all var(--transition-fast);
  text-decoration: none;
}

.whatsapp-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
}

/* ========================================
   13. FOOTER
   ======================================== */
.footer {
  background: rgba(10, 22, 40, 0.8);
  backdrop-filter: blur(var(--blur-md));
  border-top: 1px solid var(--glass-border);
  padding: var(--space-xl) 0;
  text-align: center;
  margin-top: var(--space-2xl);
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.footer-text {
  color: var(--muted-text);
  margin-bottom: var(--space-sm);
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: var(--space-lg);
  margin-bottom: var(--space-md);
}

.footer-link {
  color: var(--muted-text);
  font-size: 0.875rem;
  transition: color var(--transition-fast);
}

.footer-link:hover {
  color: var(--accent-blue);
}

/* ========================================
   14. ANIMATIONS
   ======================================== */
/* Scroll Reveal Animation */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all var(--transition-medium);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 100ms; }
.reveal-delay-2 { transition-delay: 200ms; }
.reveal-delay-3 { transition-delay: 300ms; }
.reveal-delay-4 { transition-delay: 400ms; }

/* Pulse Animation */
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.pulse {
  animation: pulse 2s ease-in-out infinite;
}

/* Glow Animation */
@keyframes glow {
  0%, 100% { box-shadow: 0 0 5px var(--accent-blue); }
  50% { box-shadow: 0 0 20px var(--accent-blue), 0 0 30px var(--accent-blue); }
}

.glow {
  animation: glow 2s ease-in-out infinite;
}

/* ========================================
   15. RESPONSIVE DESIGN
   ======================================== */

/* Tablet (768px - 1024px) */
@media (max-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  
  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .btn {
    width: 100%;
    max-width: 300px;
  }
}

/* Mobile (max-width: 768px) */
@media (max-width: 768px) {
  /* Navigation */
  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    height: 100vh;
    background: var(--deep-tech-blue);
    backdrop-filter: blur(var(--blur-lg));
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    padding: var(--space-2xl) var(--space-lg);
    transition: right var(--transition-medium);
    z-index: 1001;
  }
  
  .nav-menu.active {
    right: 0;
  }
  
  .nav-toggle {
    display: flex;
    z-index: 1002;
  }
  
  .nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }
  
  .nav-toggle.active span:nth-child(2) {
    opacity: 0;
  }
  
  .nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }
  
  .nav-overlay.active {
    display: block;
  }
  
  /* Grid Layouts */
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
  
  /* Typography */
  h1 { font-size: 2.5rem; }
  h2 { font-size: 2rem; }
  h3 { font-size: 1.5rem; }
  
  /* Hero */
  .hero {
    padding-top: 100px;
  }
  
  .hero-subtitle {
    font-size: 1.125rem;
  }
  
  /* Cards */
  .card {
    padding: var(--space-lg);
  }
  
  .card-popular {
    transform: none;
  }
  
  /* Pricing Tables */
  .pricing-table {
    display: none;
  }
  
  .pricing-mobile {
    display: block;
  }
  
  /* Forms */
  .form-input,
  .form-select,
  .form-textarea {
    font-size: 16px; /* Prevents zoom on iOS */
  }
  
  /* Buttons */
  .btn {
    width: 100%;
    max-width: none;
  }
  
  .hero-buttons .btn {
    max-width: 280px;
  }
  
  /* WhatsApp Button */
  .whatsapp-btn {
    bottom: var(--space-sm);
    right: var(--space-sm);
    width: 56px;
    height: 56px;
  }
  
  /* Footer */
  .footer-links {
    flex-direction: column;
    gap: var(--space-sm);
  }
  
  /* Section Padding */
  .section {
    padding: var(--space-xl) 0;
  }
  
  .section-header {
    margin-bottom: var(--space-xl);
  }
}

/* Small Mobile (max-width: 480px) */
@media (max-width: 480px) {
  :root {
    --space-lg: 1rem;
    --space-xl: 1.5rem;
    --space-2xl: 2rem;
  }
  
  .container,
  .container-sm {
    padding: 0 var(--space-sm);
  }
  
  h1 { font-size: 2rem; }
  h2 { font-size: 1.75rem; }
  
  .card {
    padding: var(--space-md);
  }
  
  .pricing-card-mobile {
    padding: var(--space-md);
  }
}

/* ========================================
   16. 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 */
.btn:focus,
.nav-link:focus,
.form-input:focus {
  outline: 2px solid var(--accent-blue);
  outline-offset: 2px;
}

/* High contrast mode */
@media (prefers-contrast: high) {
  :root {
    --glass-white: rgba(255, 255, 255, 0.9);
    --glass-border: rgba(255, 255, 255, 1);
    --dark-text: #000000;
    --light-text: #ffffff;
  }
}
