/* CSS Variables for Triadic Color Scheme */
:root {
  /* Primary Colors (Triadic) */
  --primary-color: #3273dc;
  --secondary-color: #dc3273;
  --tertiary-color: #73dc32;
  
  /* Accent Colors */
  --accent-primary: #4287f5;
  --accent-secondary: #f54287;
  --accent-tertiary: #87f542;
  
  /* Neutral Colors */
  --dark-color: #1a1a1a;
  --light-color: #ffffff;
  --grey-dark: #333333;
  --grey-medium: #666666;
  --grey-light: #f8f9fa;
  
  /* Gradient Backgrounds */
  --gradient-primary: linear-gradient(135deg, var(--primary-color), var(--accent-primary));
  --gradient-secondary: linear-gradient(135deg, var(--secondary-color), var(--accent-secondary));
  --gradient-hero: linear-gradient(135deg, rgba(50, 115, 220, 0.9), rgba(220, 50, 115, 0.9));
  --gradient-card: linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
  
  /* Typography */
  --font-heading: 'Poppins', sans-serif;
  --font-body: 'Work Sans', sans-serif;
  
  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3rem;
  --spacing-xxl: 4rem;
  
  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 20px;
  
  /* Shadows */
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.15);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.2);
  --shadow-glow: 0 0 20px rgba(50, 115, 220, 0.3);
  
  /* Transitions */
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Global Styles */
* {
  box-sizing: border-box;
}

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

body {
  font-family: var(--font-body);
  line-height: 1.6;
  color: var(--grey-dark);
  background-color: var(--light-color);
  overflow-x: hidden;
}

/* Adaptive Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: var(--spacing-md);
  color: var(--dark-color);
}

h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
}

h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
}

h3 {
  font-size: clamp(1.5rem, 3vw, 2rem);
}

h4 {
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
}

p {
  font-size: clamp(1rem, 2vw, 1.125rem);
  margin-bottom: var(--spacing-md);
}

/* Global Button Styles */
.btn,
button,
input[type="submit"],
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-sm) var(--spacing-lg);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  text-align: center;
  border: none;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-smooth);
  position: relative;
  overflow: hidden;
  background: var(--gradient-primary);
  color: var(--light-color);
  box-shadow: var(--shadow-md);
  min-width: 140px;
}

.btn:hover,
button:hover,
input[type="submit"]:hover,
.button:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  filter: brightness(1.1);
}

.btn:active,
button:active,
input[type="submit"]:active,
.button:active {
  transform: translateY(0) scale(0.98);
}

.btn::before,
button::before,
input[type="submit"]::before,
.button::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 var(--transition-slow);
}

.btn:hover::before,
button:hover::before,
input[type="submit"]:hover::before,
.button:hover::before {
  left: 100%;
}

.futuristic-btn {
  background: var(--gradient-primary);
  border: 2px solid transparent;
  position: relative;
  z-index: 1;
}

.futuristic-btn::after {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: var(--gradient-secondary);
  border-radius: var(--radius-lg);
  z-index: -1;
  opacity: 0;
  transition: opacity var(--transition-smooth);
}

.futuristic-btn:hover::after {
  opacity: 1;
}

/* Header Styles */
#header {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(50, 115, 220, 0.1);
  box-shadow: var(--shadow-sm);
  z-index: 1000;
}

.navbar-brand .title {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700;
}

.navbar-item {
  font-family: var(--font-heading);
  font-weight: 500;
  transition: all var(--transition-fast);
  position: relative;
}

.navbar-item:hover {
  color: var(--primary-color) !important;
  transform: translateY(-1px);
}

.navbar-item::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  transition: all var(--transition-smooth);
  transform: translateX(-50%);
}

.navbar-item:hover::after {
  width: 80%;
}

.navbar-burger {
  color: var(--primary-color);
}

/* Hero Section */
#hero {
  position: relative;
  background-attachment: fixed;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

#hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--gradient-hero);
  z-index: 1;
}

.hero-body {
  position: relative;
  z-index: 2;
  padding: var(--spacing-xxl) 0;
}

.hero .title,
.hero .subtitle,
.hero p {
  color: var(--light-color) !important;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.futuristic-text {
  position: relative;
  overflow: hidden;
}

.futuristic-text::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  animation: shimmer 3s infinite;
}

@keyframes shimmer {
  0% { left: -100%; }
  100% { left: 100%; }
}

/* Services Section */
.service-card {
  background: var(--light-color);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  transition: all var(--transition-smooth);
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(50, 115, 220, 0.1);
}

.service-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-color);
}

.service-card .card-image {
  position: relative;
  overflow: hidden;
}

.service-card .card-image img {
  transition: transform var(--transition-slow);
  width: 100%;
  height: 250px;
  object-fit: cover;
}

.service-card:hover .card-image img {
  transform: scale(1.1);
}

.service-card .card-content {
  padding: var(--spacing-lg);
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  text-align: center;
}

/* Features Section */
.feature-item {
  padding: var(--spacing-lg);
  border-radius: var(--radius-lg);
  transition: all var(--transition-smooth);
  background: var(--light-color);
  border: 1px solid transparent;
}

.feature-item:hover {
  background: var(--gradient-card);
  border-color: var(--primary-color);
  transform: translateX(8px);
}

.feature-item .icon {
  background: var(--gradient-primary);
  border-radius: 50%;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: var(--spacing-md);
}

/* Timeline Styles */
.timeline-container {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
}

.timeline-container::before {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 100%;
  background: var(--gradient-primary);
  border-radius: 2px;
}

.timeline-item {
  position: relative;
  margin-bottom: var(--spacing-xxl);
  display: flex;
  align-items: center;
}

.timeline-item:nth-child(odd) {
  flex-direction: row;
}

.timeline-item:nth-child(even) {
  flex-direction: row-reverse;
}

.timeline-marker {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--primary-color);
  border: 4px solid var(--light-color);
  box-shadow: var(--shadow-md);
  z-index: 2;
}

.timeline-content {
  flex: 1;
  margin: 0 var(--spacing-xl);
  background: var(--light-color);
  padding: var(--spacing-lg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(50, 115, 220, 0.1);
  transition: all var(--transition-smooth);
}

.timeline-content:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-lg);
}

.timeline-content img {
  border-radius: var(--radius-md);
  width: 100%;
  height: 200px;
  object-fit: cover;
}

/* Case Studies */
.case-study-card {
  background: var(--light-color);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-smooth);
  height: 100%;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(50, 115, 220, 0.1);
}

.case-study-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.case-study-card .card-image {
  position: relative;
  overflow: hidden;
  height: 200px;
}

.case-study-card .card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.case-study-card:hover .card-image img {
  transform: scale(1.1);
}

.case-study-card .card-content {
  padding: var(--spacing-lg);
  flex-grow: 1;
  text-align: center;
}

/* Gallery Styles */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--spacing-md);
  margin-top: var(--spacing-lg);
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  aspect-ratio: 4/3;
  cursor: pointer;
  transition: all var(--transition-smooth);
}

.gallery-item:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-lg);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.gallery-item:hover img {
  transform: scale(1.1);
}

.gallery-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--gradient-hero);
  opacity: 0;
  transition: opacity var(--transition-smooth);
  z-index: 1;
}

.gallery-item:hover::before {
  opacity: 0.7;
}

/* Resource Cards */
.resource-card {
  background: var(--light-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  transition: all var(--transition-smooth);
  height: 100%;
  border: 1px solid rgba(50, 115, 220, 0.1);
}

.resource-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-color);
}

.resource-card .card-content {
  padding: var(--spacing-lg);
  text-align: center;
}

/* Client Cards */
.client-card {
  background: var(--gradient-card);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  transition: all var(--transition-smooth);
  height: 100%;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.client-card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: var(--shadow-lg);
  background: var(--light-color);
}

.client-card .card-content {
  padding: var(--spacing-lg);
  text-align: center;
}

/* Contact Form */
.contact-form {
  max-width: 600px;
  margin: 0 auto;
}

.contact-form .field {
  margin-bottom: var(--spacing-lg);
}

.contact-form .label {
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--dark-color);
  margin-bottom: var(--spacing-xs);
}

.contact-form .input,
.contact-form .textarea,
.contact-form .select select {
  border: 2px solid rgba(50, 115, 220, 0.2);
  border-radius: var(--radius-md);
  padding: var(--spacing-sm) var(--spacing-md);
  font-family: var(--font-body);
  transition: all var(--transition-smooth);
  background: var(--light-color);
}

.contact-form .input:focus,
.contact-form .textarea:focus,
.contact-form .select select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(50, 115, 220, 0.1);
  outline: none;
}

/* Footer */
.footer {
  background: var(--dark-color);
  color: var(--light-color);
  padding: var(--spacing-xxl) 0 var(--spacing-lg) 0;
}

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

.footer-links li {
  margin-bottom: var(--spacing-xs);
}

.footer-links a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: all var(--transition-fast);
  position: relative;
}

.footer-links a:hover {
  color: var(--primary-color);
  padding-left: var(--spacing-xs);
}

.social-links {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs);
}

.social-links a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: all var(--transition-fast);
  font-weight: 500;
  display: inline-block;
  position: relative;
}

.social-links a:hover {
  color: var(--primary-color);
  transform: translateX(4px);
}

.social-links a::before {
  content: '→';
  position: absolute;
  left: -20px;
  opacity: 0;
  transition: all var(--transition-fast);
}

.social-links a:hover::before {
  opacity: 1;
  left: -15px;
}

/* 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 float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

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

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

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

.animate-float {
  animation: float 3s ease-in-out infinite;
}

/* Success Page Styles */
.success-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-primary);
  text-align: center;
  color: var(--light-color);
}

.success-content {
  max-width: 500px;
  padding: var(--spacing-xl);
}

.success-icon {
  font-size: 4rem;
  margin-bottom: var(--spacing-lg);
  color: var(--tertiary-color);
}

/* Privacy and Terms Pages */
.page-content {
  padding-top: 100px;
  min-height: calc(100vh - 100px);
}

.page-content .container {
  max-width: 800px;
  padding: var(--spacing-xl) var(--spacing-md);
}

.page-content h1,
.page-content h2,
.page-content h3 {
  color: var(--dark-color);
  margin-top: var(--spacing-xl);
  margin-bottom: var(--spacing-md);
}

.page-content p,
.page-content li {
  color: var(--grey-dark);
  margin-bottom: var(--spacing-md);
  line-height: 1.7;
}

.page-content ul,
.page-content ol {
  margin-left: var(--spacing-lg);
  margin-bottom: var(--spacing-lg);
}

/* Responsive Design */
@media (max-width: 1024px) {
  .timeline-container::before {
    left: 30px;
  }
  
  .timeline-item {
    flex-direction: column;
    align-items: flex-start;
    padding-left: 60px;
  }
  
  .timeline-item:nth-child(even) {
    flex-direction: column;
  }
  
  .timeline-marker {
    left: 30px;
  }
  
  .timeline-content {
    margin: 0;
    margin-top: var(--spacing-md);
  }
}

@media (max-width: 768px) {
  :root {
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-xxl: 2.5rem;
  }
  
  .hero-body {
    padding: var(--spacing-xl) 0;
  }
  
  .gallery-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-sm);
  }
  
  .timeline-item {
    padding-left: 40px;
  }
  
  .timeline-marker {
    left: 20px;
  }
  
  .timeline-container::before {
    left: 20px;
  }
  
  .navbar-menu {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
  }
  
  .buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .buttons .button {
    margin-bottom: var(--spacing-sm);
    width: 100%;
    max-width: 300px;
  }
}

@media (max-width: 480px) {
  .gallery-grid {
    grid-template-columns: 1fr;
  }
  
  .columns.is-multiline .column {
    margin-bottom: var(--spacing-lg);
  }
  
  .service-card,
  .case-study-card,
  .resource-card,
  .client-card {
    margin-bottom: var(--spacing-lg);
  }
}

/* Print Styles */
@media print {
  .navbar,
  .footer,
  .buttons,
  .contact-form {
    display: none;
  }
  
  .hero {
    background: none !important;
    color: black !important;
  }
  
  .hero .title,
  .hero .subtitle,
  .hero p {
    color: black !important;
    text-shadow: none !important;
  }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
  :root {
    --primary-color: #0066cc;
    --secondary-color: #cc0066;
    --tertiary-color: #66cc00;
    --dark-color: #000000;
    --grey-dark: #000000;
  }
  
  .service-card,
  .case-study-card,
  .resource-card,
  .client-card {
    border: 2px solid var(--dark-color);
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .animate-fade-up,
  .animate-fade-left,
  .animate-fade-right,
  .animate-float {
    animation: none;
  }
}

/* Focus Indicators */
*:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

.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;
}

/* Utility Classes */
.text-gradient {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

.hover-lift {
  transition: transform var(--transition-smooth);
}

.hover-lift:hover {
  transform: translateY(-4px);
}

.pulse {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(50, 115, 220, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(50, 115, 220, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(50, 115, 220, 0);
  }
}