:root {
  --primary-color: #2D2727;
  --secondary-color: #FF5200;
}

/* Custom Styles for X-ROBOTICS */

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Custom backdrop blur for better browser support */
.backdrop-blur-md {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* Enhanced button hover effects */
.btn-primary {
  background: linear-gradient(135deg, var(--secondary-color), #ff6b2b);
  box-shadow: 0 4px 15px rgba(255, 82, 0, 0.3);
  transition: all 0.3s ease;
}

.btn-primary:hover {
  box-shadow: 0 8px 25px rgba(255, 82, 0, 0.4);
  transform: translateY(-2px);
}

/* Text glow effect for headings */
.text-glow {
  text-shadow: 0 0 20px rgba(255, 82, 0, 0.5);
}

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

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

/* Video overlay gradient */
.video-overlay {
  background: linear-gradient(
    135deg,
    rgba(45, 39, 39, 0.8) 0%,
    rgba(0, 0, 0, 0.6) 50%,
    rgba(45, 39, 39, 0.8) 100%
  );
}

/* Header glass effect */
header {
  background: rgba(45, 39, 39, 0.85);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Navigation link hover effect */
nav a {
  position: relative;
  overflow: hidden;
}

nav a::before {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--secondary-color);
  transition: width 0.3s ease;
}

nav a:hover::before {
  width: 100%;
}

/* Hero section enhancements */
.hero-bg {
  background: linear-gradient(
    135deg,
    rgba(45, 39, 39, 0.9) 0%,
    rgba(0, 0, 0, 0.7) 50%,
    rgba(45, 39, 39, 0.9) 100%
  );
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--primary-color);
}

::-webkit-scrollbar-thumb {
  background: var(--secondary-color);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #ff6b2b;
}

/* Responsive video */
video {
  object-fit: cover;
  width: 100%;
  height: 100%;
}

/* Loading animation for video */
.video-loading {
  background: url('assets/video/hero.jpg') center/cover no-repeat;
}

/* Mobile optimizations */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2.5rem;
    line-height: 1.2;
  }

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

  .hero-buttons {
    flex-direction: column;
    width: 100%;
  }

  .hero-buttons button {
    width: 100%;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  header {
    background: rgba(0, 0, 0, 0.95);
  }

  .video-overlay {
    background: rgba(0, 0, 0, 0.8);
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .animate-bounce {
    animation: none;
  }
}

/* Focus styles for accessibility */
button:focus,
a:focus {
  outline: 2px solid var(--secondary-color);
  outline-offset: 2px;
}

/* About Section Styles */
.about-section {
  background: #ffffff;
}

.about-content {
  border-right: 1px solid #e5e7eb;
}

.category-grid-item {
  border: 1px solid #e5e7eb;
  transition: all 0.3s ease;
  min-height: 200px;
}

.category-grid-item:hover {
  background-color: #f9fafb;
  border-color: var(--secondary-color);
}

.category-grid-item:hover .category-icon {
  color: var(--secondary-color);
  transform: scale(1.1);
}

.category-icon {
  transition: all 0.3s ease;
  color: var(--secondary-color);
}

/* Ensure perfect grid alignment */
.category-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
}

/* About section responsive adjustments */
@media (max-width: 1024px) {
  .about-content {
    border-right: none;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 2rem;
    margin-bottom: 2rem;
  }

  .category-grid-item {
    min-height: 150px;
    padding: 1.5rem;
  }
}

@media (max-width: 768px) {
  .about-section {
    padding: 3rem 0;
  }

  .about-content h2 {
    font-size: 2rem;
    line-height: 1.2;
  }

  .category-grid-item {
    min-height: 120px;
    padding: 1rem;
  }

  .category-grid-item h3 {
    font-size: 1.25rem;
  }

  .category-icon {
    font-size: 2rem !important;
  }
}

/* Enhanced button styles for about section */
.about-cta-btn {
  background: var(--primary-color);
  box-shadow: 0 4px 15px rgba(45, 39, 39, 0.2);
  transition: all 0.3s ease;
}

.about-cta-btn:hover {
  background: rgba(45, 39, 39, 0.9);
  box-shadow: 0 8px 25px rgba(45, 39, 39, 0.3);
  transform: translateY(-2px) scale(1.05);
}

/* Perfect vertical centering for about content */
.about-left-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  min-height: 600px;
}

/* Grid item perfect centering */
.grid-item-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100%;
  text-align: center;
}

/* Products Section Styles */
.products-slider-wrapper {
  overflow: hidden;
  position: relative;
}

.products-slider {
  display: flex;
  transition: transform 0.5s ease-in-out;
}

.product-slide {
  flex: 0 0 auto;
  width: 100%;
}

@media (min-width: 768px) {
  .product-slide {
    width: 33.333333%;
  }
}

.product-item {
  cursor: pointer;
  transition: all 0.3s ease;
}

.product-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.product-item img {
  transition: transform 0.3s ease;
}

.product-item:hover img {
  transform: scale(1.05);
}

/* Navigation arrows */
.slider-nav-btn {
  background: white;
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  cursor: pointer;
}

.slider-nav-btn:hover {
  background: #f3f4f6;
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.slider-nav-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Slider indicators */
.slider-indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.slider-indicator.active {
  background: var(--secondary-color);
}

.slider-indicator:not(.active) {
  background: #d1d5db;
}

.slider-indicator:not(.active):hover {
  background: #9ca3af;
}

/* Product Modal Styles */
#product-modal {
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

#product-modal img {
  width: 80vw;
  max-height: 80vh;
  border-radius: 8px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
  background-color: white;
}

#close-modal {
  background: rgba(0, 0, 0, 0.5);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

#close-modal:hover {
  background: rgba(255, 82, 0, 0.8);
  transform: scale(1.1);
}

.modal-title-overlay {
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* Products section responsive */
@media (max-width: 768px) {
  .product-slide {
    width: 100%;
    padding: 0 1rem;
  }

  .slider-nav-btn {
    width: 40px;
    height: 40px;
  }

  .products-section h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
  }

  .products-section .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .products-section .cta-btn {
    width: 100%;
    justify-content: center;
  }
}

/* Animation for modal */
@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

#product-modal:not(.hidden) {
  animation: modalFadeIn 0.3s ease-out;
}

#product-modal:not(.hidden) img {
  animation: modalFadeIn 0.3s ease-out 0.1s both;
}

/* Smooth transitions for all interactive elements */
.product-item,
.slider-nav-btn,
.slider-indicator,
#close-modal {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Services Section Styles */
.services-section {
  background: #ffffff;
}

.services-content {
  border-right: 1px solid #e5e7eb;
}

.services-grid-item {
  border: 1px solid #e5e7eb;
  transition: all 0.3s ease;
  min-height: 200px;
}

.services-grid-item:hover {
  background-color: #f9fafb;
  border-color: var(--secondary-color);
}

.services-grid-item:hover .service-icon {
  color: var(--secondary-color);
  transform: scale(1.1);
}

.service-icon {
  transition: all 0.3s ease;
  color: var(--secondary-color);
}

/* Ensure perfect grid alignment for services */
.services-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
}

/* Services section responsive adjustments */
@media (max-width: 1024px) {
  .services-content {
    border-right: none;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 2rem;
    margin-bottom: 2rem;
  }

  .services-grid-item {
    min-height: 180px;
    padding: 1.5rem;
  }
}

@media (max-width: 768px) {
  .services-section {
    padding: 3rem 0;
  }

  .services-content h2 {
    font-size: 2rem;
    line-height: 1.2;
  }

  .services-grid-item {
    min-height: 150px;
    padding: 1rem;
  }

  .services-grid-item h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
  }

  .services-grid-item p {
    font-size: 0.875rem;
    line-height: 1.4;
  }

  .service-icon {
    font-size: 2rem !important;
    margin-bottom: 1rem !important;
  }
}

/* Enhanced button styles for services section */
.services-cta-btn {
  background: var(--primary-color);
  box-shadow: 0 4px 15px rgba(45, 39, 39, 0.2);
  transition: all 0.3s ease;
}

.services-cta-btn:hover {
  background: rgba(45, 39, 39, 0.9);
  box-shadow: 0 8px 25px rgba(45, 39, 39, 0.3);
  transform: translateY(-2px) scale(1.05);
}

/* Perfect vertical centering for services content */
.services-left-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  min-height: 600px;
}

/* Services grid item content alignment */
.services-grid-item-content {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  height: 100%;
  text-align: left;
}

/* Service icons specific styling */
.services-grid-item .fas {
  display: block;
  margin-bottom: 1.5rem;
}

/* Consistent spacing for service descriptions */
.services-grid-item p {
  flex-grow: 1;
  display: flex;
  align-items: flex-start;
}

/* Print styles */
@media print {
  header {
    position: static;
    background: white;
    color: black;
  }

  .hero-section {
    background: white;
    color: black;
  }

  .about-section {
    background: white;
    color: black;
  }

  .products-section {
    background: white;
    color: black;
  }

  .services-section {
    background: white;
    color: black;
  }

  #product-modal {
    display: none !important;
  }
}

