/*!
 * Ulfratech Custom Styles
 * Modern, animated, and responsive design system
 */

/* =========================================
   CSS VARIABLES & DESIGN TOKENS
   ========================================= */
:root {
  /* Brand Colors */
  --primary-100: #5E4AAE;
  --primary-200: #9076e0;
  --primary-300: #f7d7ff;
  --accent-100:  #00BFFF;
  --accent-200:  #00619a;
  
  /* Text Colors */
  --text-100:    #333333;
  --text-200:    #5c5c5c;
  --text-300:    #888888;
  
  /* Background Colors */
  --bg-100:      #f3f3f3;
  --bg-200:      #e9e9e9;
  --bg-300:      #c0c0c0;
  
  /* Shadows */
  --shadow-sm:   0 2px 4px rgba(0,0,0,0.1);
  --shadow-md:   0 4px 12px rgba(0,0,0,0.15);
  --shadow-lg:   0 8px 24px rgba(0,0,0,0.2);
  
  /* Animation Timing */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;
  
  /* Spacing */
  --border-radius: 0.5rem;
  --border-radius-lg: 1rem;
}

/* =========================================
   GLOBAL STYLES & ANIMATIONS
   ========================================= */
html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-100);
}

/* Smooth transitions for all interactive elements */
a, button, .btn, .card, .nav-link {
  transition: all var(--transition-normal);
}

/* =========================================
   UTILITY ANIMATIONS
   ========================================= */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

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

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

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

/* Animation Classes */
.animate-fade-in {
  animation: fadeIn 0.6s ease-out;
}

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

.animate-slide-in-left {
  animation: slideInLeft 0.8s ease-out;
}

.animate-slide-in-right {
  animation: slideInRight 0.8s ease-out;
}

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

.animate-pulse-hover:hover {
  animation: pulse 0.6s ease-in-out;
}

/* =========================================
   NAVIGATION
   ========================================= */
.navbar {
  background-color: rgba(243, 243, 243, 0.95) !important;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
}

.navbar-scrolled {
  background-color: rgba(243, 243, 243, 0.98) !important;
  box-shadow: var(--shadow-md);
}

.navbar-nav .nav-link {
  color: var(--text-100) !important;
  font-weight: 500;
  position: relative;
  overflow: hidden;
}

.navbar-nav .nav-link::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary-100), var(--accent-100));
  transition: all var(--transition-normal);
  transform: translateX(-50%);
}

.navbar-nav .nav-link:hover::before,
.navbar-nav .nav-link.active::before {
  width: 80%;
}

.navbar-nav .nav-link:hover,
.navbar-nav .dropdown-toggle:hover {
  color: var(--primary-100) !important;
  transform: translateY(-2px);
}

.navbar-brand:hover .logo {
  transform: scale(1.05);
}

/* Logo Styles */
.logo {
  height: 45px;
  width: auto;
  max-width: 200px;
  transition: transform var(--transition-normal);
}

@media (max-width: 768px) {
  .logo {
    height: 35px;
    max-width: 150px;
  }
}

.contact-logo {
  height: 80px !important;
  max-width: 250px;
}

/* Dropdown Styles */
.dropdown-menu {
  background-color: var(--bg-200);
  border: none;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(10px);
  animation: fadeInUp 0.3s ease-out;
}

.dropdown-menu .dropdown-item {
  color: var(--text-100);
  transition: all var(--transition-fast);
  border-radius: calc(var(--border-radius) - 2px);
  margin: 2px 4px;
}

.dropdown-menu .dropdown-item:hover {
  background-color: var(--primary-300);
  color: var(--primary-100);
  transform: translateX(5px);
}

/* =========================================
   HERO SECTIONS
   ========================================= */
.hero {
  background: linear-gradient(135deg, var(--primary-100), var(--primary-200));
  color: #fff;
  padding: 4rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 80%, rgba(255,255,255,0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255,255,255,0.1) 0%, transparent 50%);
  pointer-events: none;
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero h1 {
  text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
  margin-bottom: 1.5rem;
}

.hero .lead {
  font-size: 1.3rem;
  opacity: 0.95;
  margin-bottom: 2rem;
}

/* =========================================
   BUTTONS
   ========================================= */
.btn-primary {
  background: linear-gradient(135deg, var(--primary-100), var(--primary-200));
  border: none;
  color: #fff;
  font-weight: 600;
  padding: 0.75rem 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.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.6s;
  z-index: -1;
}

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

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-200), var(--accent-100));
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-outline-primary {
  border: 2px solid var(--primary-100);
  color: var(--primary-100);
  background: transparent;
  font-weight: 600;
  transition: all var(--transition-normal);
}

.btn-outline-primary:hover {
  background: var(--primary-100);
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-lg {
  padding: 1rem 2.5rem;
  font-size: 1.1rem;
}

/* =========================================
   CARDS & CONTENT SECTIONS
   ========================================= */
.card {
  border: none;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
  overflow: hidden;
}

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

.card-header {
  background: linear-gradient(135deg, var(--primary-100), var(--primary-200));
  border: none;
  color: white;
  font-weight: 600;
}

.card-footer {
  background-color: var(--bg-100);
  border: none;
}

/* Section Styling */
section {
  transition: all var(--transition-slow);
}

.bg-light {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%) !important;
}

/* =========================================
   CAROUSEL & SLIDERS
   ========================================= */
.carousel-caption {
  background: rgba(94, 74, 174, 0.85);
  padding: 2rem;
  border-radius: var(--border-radius-lg);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.carousel-item img {
  object-fit: cover;
  height: 400px;
  width: 100%;
}

.carousel-control-prev,
.carousel-control-next {
  width: 5%;
  opacity: 0.8;
  transition: opacity var(--transition-normal);
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
  opacity: 1;
}

/* =========================================
   ACCORDIONS & INTERACTIVE ELEMENTS
   ========================================= */
.accordion-button {
  background-color: var(--bg-100);
  border: none;
  color: var(--text-100);
  font-weight: 600;
  transition: all var(--transition-normal);
}

.accordion-button:not(.collapsed) {
  background: linear-gradient(135deg, var(--primary-300), var(--bg-100));
  color: var(--primary-100);
  box-shadow: none;
}

.accordion-button:focus {
  box-shadow: 0 0 0 0.25rem rgba(94, 74, 174, 0.25);
}

.accordion-item {
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: var(--border-radius);
  margin-bottom: 0.5rem;
  overflow: hidden;
}

/* =========================================
   ICONS & VISUAL ELEMENTS
   ========================================= */
.bi {
  transition: all var(--transition-normal);
}

.text-primary {
  color: var(--primary-100) !important;
}

/* Icon hover effects */
.fs-1:hover,
.display-5:hover {
  transform: scale(1.1);
  color: var(--accent-100) !important;
}

/* Pricing badges */
.badge {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  border-radius: var(--border-radius);
}

.badge.bg-primary {
  background: linear-gradient(135deg, var(--primary-100), var(--primary-200)) !important;
}

/* =========================================
   IMAGES & MEDIA
   ========================================= */
img {
  transition: opacity var(--transition-normal);
}

.img-fluid {
  border-radius: var(--border-radius);
}

.rounded-circle:hover {
  transform: scale(1.05) !important;
}

.shadow {
  box-shadow: var(--shadow-md) !important;
}

.shadow-sm {
  box-shadow: var(--shadow-sm) !important;
}

.shadow-lg {
  box-shadow: var(--shadow-lg) !important;
}

/* =========================================
   LISTS & CONTENT
   ========================================= */
.list-unstyled li {
  transition: all var(--transition-fast);
}

.list-unstyled li:hover {
  transform: translateX(5px);
  color: var(--primary-100);
}

/* =========================================
   FOOTER
   ========================================= */
footer {
  background: linear-gradient(135deg, #343a40, #495057) !important;
  color: #fff;
  padding: 2rem 0;
  position: relative;
}

footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-100), var(--accent-100), var(--primary-100));
}

/* =========================================
   RESPONSIVE DESIGN
   ========================================= */
@media (max-width: 768px) {
  .hero {
    padding: 2rem 0;
  }
  
  .hero h1 {
    font-size: 2rem;
  }
  
  .btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
  }
  
  .carousel-item img {
    height: 400px;
  }
  
  .carousel-inner {
    height: 500px;
  }
}

/* =========================================
   SCROLL ANIMATIONS (INTERSECTION OBSERVER)
   ========================================= */
.scroll-animate {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease-out;
}

.scroll-animate.animate {
  opacity: 1;
  transform: translateY(0);
}

/* =========================================
   LOADING STATES
   ========================================= */
.loading {
  position: relative;
  overflow: hidden;
}

.loading::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  animation: loading 1.5s infinite;
}

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

/* =========================================
   GLASS MORPHISM EFFECTS
   ========================================= */
.glass {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--border-radius-lg);
}

/* =========================================
   CUSTOM UTILITIES
   ========================================= */
.text-gradient {
  background: linear-gradient(135deg, var(--primary-100), var(--accent-100));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-accent {
  color: var(--accent-100) !important;
}

.border-gradient {
  border: 2px solid;
  border-image: linear-gradient(135deg, var(--primary-100), var(--accent-100)) 1;
}

.hover-scale:hover {
  transform: scale(1.02);
}

.hover-shadow:hover {
  box-shadow: var(--shadow-lg);
}