/*
 * Khodiyar Steel Industries - Optimized CSS
 * Mobile-First Responsive Design
 * Version: 2.0
 */

/* ===================================
   1. CSS VARIABLES & ROOT STYLES
   =================================== */
:root {
  --primary-color: #1e40af;
  --secondary-color: #1e3a8a;
  --accent-color: #f59e0b;
  --success-color: #10b981;
  --dark-color: #111827;
  --light-color: #f8fafc;
  --gradient-primary: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  --gradient-accent: linear-gradient(135deg, var(--accent-color), #f97316);
  --shadow-soft: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-medium: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-large: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  --border-radius: 12px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font-base: 16px;
}

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

html {
  scroll-behavior: smooth;
  font-size: var(--font-base);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
  color: var(--dark-color);
  background-color: #ffffff;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ===================================
   3. PERFORMANCE OPTIMIZATIONS
   =================================== */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

.will-change {
  will-change: transform;
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  
  .rotating-machinery,
  .product-3d-model,
  .hero::before {
    animation: none !important;
  }
}

/* ===================================
   4. NAVIGATION (MOBILE-FIRST)
   =================================== */
.navbar {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: var(--shadow-soft);
  transition: var(--transition);
  z-index: 1000;
  position: sticky;
  top: 0;
}

.navbar-brand {
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--primary-color) !important;
  text-decoration: none;
}

.navbar-brand .company-main {
  color: var(--primary-color);
}

.navbar-brand .division-text {
  font-size: 0.7rem;
  color: var(--accent-color);
  font-weight: 500;
  display: block;
  line-height: 1;
}

.nav-link {
  font-weight: 500;
  margin: 0 4px;
  padding: 8px 12px !important;
  border-radius: var(--border-radius);
  transition: var(--transition);
  position: relative;
  min-height: 44px;
  display: flex;
  align-items: center;
}

.nav-link:hover {
  color: var(--accent-color) !important;
  background: rgba(245, 158, 11, 0.1);
  transform: translateY(-2px);
}

.nav-link:focus {
  outline: 3px solid var(--accent-color);
  outline-offset: 2px;
}

/* Tablet Navigation */
@media (min-width: 768px) {
  .navbar-brand {
    font-size: 1.4rem;
  }
  
  .navbar-brand .division-text {
    font-size: 0.75rem;
  }
  
  .nav-link {
    margin: 0 6px;
    padding: 8px 14px !important;
  }
}

/* Desktop Navigation */
@media (min-width: 992px) {
  .navbar-brand {
    font-size: 1.5rem;
  }
  
  .navbar-brand .division-text {
    font-size: 0.8rem;
  }
  
  .nav-link {
    margin: 0 8px;
    padding: 8px 16px !important;
  }
}

/* ===================================
   5. HERO SECTION (MOBILE-FIRST)
   =================================== */
.hero {
  min-height: 70vh;
  background: var(--gradient-primary);
  position: relative;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 60px 0;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: radial-gradient(circle at 25% 25%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 75% 75%, rgba(245, 158, 11, 0.1) 0%, transparent 50%);
  animation: backgroundShift 20s ease-in-out infinite;
}

@keyframes backgroundShift {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.1);
  }
}

.hero-content {
  color: white;
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0 15px;
}

.hero h1 {
  font-size: 2rem;
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 800;
  margin-bottom: 1.5rem;
  line-height: 1.1;
  opacity: 0;
  animation: slideInUp 1s ease 0.2s forwards;
}

.hero .subtitle {
  font-size: 1.1rem;
  font-size: clamp(1rem, 2.5vw, 1.4rem);
  margin-bottom: 2rem;
  opacity: 0;
  font-weight: 400;
  animation: slideInUp 1s ease 0.4s forwards;
}

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

/* Hide 3D on mobile/tablet */
.hero-3d-container {
  display: none;
}

/* Tablet Hero */
@media (min-width: 768px) {
  .hero {
    min-height: 80vh;
    padding: 80px 0;
  }
  
  .hero-content {
    text-align: left;
  }
}

/* Desktop Hero with 3D */
@media (min-width: 1200px) {
  .hero {
    min-height: 100vh;
  }
  
  .hero-3d-container {
    display: block;
    position: absolute;
    right: 5%;
    top: 50%;
    transform: translateY(-50%);
    width: 400px;
    height: 400px;
    perspective: 1200px;
    z-index: 1;
  }
  
  .rotating-machinery {
    width: 300px;
    height: 300px;
    position: relative;
    transform-style: preserve-3d;
    animation: rotate3dComplex 20s infinite linear;
    margin: 50px auto;
  }
  
  .machinery-part {
    position: absolute;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: var(--transition);
  }
  
  .machinery-part:nth-child(1) {
    width: 120px;
    height: 120px;
    background: rgba(30, 64, 175, 0.8);
    transform: rotateY(0deg) translateZ(150px);
  }
  
  .machinery-part:nth-child(2) {
    width: 100px;
    height: 100px;
    background: rgba(245, 158, 11, 0.8);
    transform: rotateY(90deg) translateZ(150px);
  }
  
  .machinery-part:nth-child(3) {
    width: 140px;
    height: 100px;
    background: rgba(16, 185, 129, 0.8);
    transform: rotateY(180deg) translateZ(150px);
  }
  
  .machinery-part:nth-child(4) {
    width: 110px;
    height: 130px;
    background: rgba(239, 68, 68, 0.8);
    transform: rotateY(270deg) translateZ(150px);
  }
  
  .machinery-part:nth-child(5) {
    width: 130px;
    height: 130px;
    background: rgba(139, 92, 246, 0.8);
    transform: rotateX(90deg) translateZ(150px);
  }
  
  .machinery-part:nth-child(6) {
    width: 120px;
    height: 120px;
    background: rgba(236, 72, 153, 0.8);
    transform: rotateX(-90deg) translateZ(150px);
  }
  
  @keyframes rotate3dComplex {
    0% {
      transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg);
    }
    33% {
      transform: rotateX(120deg) rotateY(120deg) rotateZ(120deg);
    }
    66% {
      transform: rotateX(240deg) rotateY(240deg) rotateZ(240deg);
    }
    100% {
      transform: rotateX(360deg) rotateY(360deg) rotateZ(360deg);
    }
  }
}

/* ===================================
   6. BUTTONS (MOBILE-FIRST)
   =================================== */
.btn-primary-custom {
  background: var(--gradient-accent);
  border: none;
  padding: 14px 28px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 50px;
  color: white;
  text-decoration: none;
  display: inline-block;
  transition: var(--transition);
  box-shadow: var(--shadow-medium);
  position: relative;
  overflow: hidden;
  opacity: 0;
  animation: slideInUp 1s ease 0.6s forwards;
  min-height: 44px;
  min-width: 44px;
  text-align: center;
}

.btn-primary-custom::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: all 0.6s ease;
}

.btn-primary-custom:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-large);
  color: white;
  text-decoration: none;
}

.btn-primary-custom:hover::before {
  width: 300px;
  height: 300px;
}

.btn-primary-custom:focus {
  outline: 3px solid var(--accent-color);
  outline-offset: 2px;
}

@media (min-width: 768px) {
  .btn-primary-custom {
    padding: 15px 30px;
    font-size: 1.05rem;
  }
}

@media (min-width: 992px) {
  .btn-primary-custom {
    padding: 16px 32px;
    font-size: 1.1rem;
  }
}

/* ===================================
   7. SECTIONS (MOBILE-FIRST)
   =================================== */
.section {
  padding: 40px 0;
  position: relative;
}

@media (min-width: 768px) {
  .section {
    padding: 60px 0;
  }
}

@media (min-width: 992px) {
  .section {
    padding: 80px 0;
  }
}

@media (min-width: 1200px) {
  .section {
    padding: 100px 0;
  }
}

.section-title {
  text-align: center;
  margin-bottom: 40px;
}

@media (min-width: 768px) {
  .section-title {
    margin-bottom: 50px;
  }
}

@media (min-width: 992px) {
  .section-title {
    margin-bottom: 60px;
  }
}

@media (min-width: 1200px) {
  .section-title {
    margin-bottom: 80px;
  }
}

.section-title h2 {
  font-size: 1.8rem;
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 700;
  color: var(--primary-color);
  position: relative;
  margin-bottom: 20px;
}

.section-title h2::after {
  content: "";
  width: 60px;
  height: 4px;
  background: var(--gradient-accent);
  position: absolute;
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 2px;
}

@media (min-width: 768px) {
  .section-title h2::after {
    width: 80px;
  }
}

.section-title p {
  font-size: 1rem;
  color: #6b7280;
  max-width: 600px;
  margin: 0 auto;
  padding: 0 15px;
}

@media (min-width: 768px) {
  .section-title p {
    font-size: 1.1rem;
  }
}

@media (min-width: 992px) {
  .section-title p {
    font-size: 1.2rem;
  }
}

/* ===================================
   8. COMPANY OVERVIEW
   =================================== */
.company-overview {
  background: var(--light-color);
}

.company-card {
  background: white;
  border-radius: 20px;
  padding: 30px;
  box-shadow: var(--shadow-medium);
  transition: var(--transition);
  height: 100%;
  margin-bottom: 20px;
}

.company-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-large);
}

.company-icon {
  width: 60px;
  height: 60px;
  background: var(--gradient-primary);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 25px;
}

.company-icon i {
  font-size: 1.5rem;
  color: white;
}

@media (min-width: 768px) {
  .company-card {
    padding: 35px;
  }
  
  .company-icon {
    width: 70px;
    height: 70px;
  }
  
  .company-icon i {
    font-size: 1.75rem;
  }
}

@media (min-width: 992px) {
  .company-card {
    padding: 40px;
  }
  
  .company-icon {
    width: 80px;
    height: 80px;
  }
  
  .company-icon i {
    font-size: 2rem;
  }
}

/* ===================================
   9. PRODUCT GALLERY (MOBILE-FIRST)
   =================================== */
.product-gallery-card {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-medium);
  transition: var(--transition);
  margin-bottom: 30px;
  border: 1px solid rgba(226, 232, 240, 0.8);
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.product-gallery-card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: var(--shadow-large);
}

.product-image-container {
  position: relative;
  overflow: hidden;
  height: 200px;
  background: linear-gradient(45deg, #f8fafc, #e2e8f0);
}

@media (min-width: 768px) {
  .product-image-container {
    height: 240px;
  }
}

@media (min-width: 992px) {
  .product-image-container {
    height: 280px;
  }
  
  .product-gallery-card {
    border-radius: 24px;
    margin-bottom: 40px;
  }
}

.product-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-gallery-card:hover .product-image {
  transform: scale(1.15);
}

.product-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, rgba(30, 64, 175, 0.9), rgba(245, 158, 11, 0.9));
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-gallery-card:hover .product-overlay {
  opacity: 1;
}

.product-overlay-content {
  text-align: center;
  color: white;
  transform: translateY(20px);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-gallery-card:hover .product-overlay-content {
  transform: translateY(0);
}

.product-overlay-content i {
  font-size: 2.5rem;
  margin-bottom: 10px;
  display: block;
}

@media (min-width: 768px) {
  .product-overlay-content i {
    font-size: 3rem;
    margin-bottom: 12px;
  }
}

@media (min-width: 992px) {
  .product-overlay-content i {
    font-size: 3.5rem;
    margin-bottom: 15px;
  }
}

.product-content {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

@media (min-width: 768px) {
  .product-content {
    padding: 28px;
  }
}

@media (min-width: 992px) {
  .product-content {
    padding: 35px;
  }
}

.product-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 12px;
  line-height: 1.3;
}

@media (min-width: 768px) {
  .product-title {
    font-size: 1.35rem;
    margin-bottom: 13px;
  }
}

@media (min-width: 992px) {
  .product-title {
    font-size: 1.5rem;
    margin-bottom: 15px;
  }
}

.product-description {
  color: #6b7280;
  margin-bottom: 20px;
  line-height: 1.6;
  font-size: 0.95rem;
}

@media (min-width: 768px) {
  .product-description {
    margin-bottom: 22px;
  }
}

@media (min-width: 992px) {
  .product-description {
    margin-bottom: 25px;
    font-size: 1rem;
  }
}

.product-specs {
  list-style: none;
  padding: 0;
  margin: 20px 0;
  background: var(--light-color);
  border-radius: var(--border-radius);
  padding: 15px;
}

@media (min-width: 992px) {
  .product-specs {
    margin: 25px 0;
    padding: 20px;
  }
}

.product-specs li {
  padding: 10px 0;
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
}

.product-specs li:last-child {
  border-bottom: none;
}

@media (min-width: 992px) {
  .product-specs li {
    padding: 12px 0;
    font-size: 0.95rem;
  }
}

.spec-label {
  font-weight: 600;
  color: var(--dark-color);
}

.spec-value {
  color: var(--primary-color);
  font-weight: 600;
}

.product-price {
  font-size: 1.5rem;
  font-weight: 800;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 20px 0;
}

@media (min-width: 992px) {
  .product-price {
    font-size: 1.8rem;
    margin: 25px 0;
  }
}

.btn-product {
  background: var(--gradient-primary);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 50px;
  font-weight: 600;
  transition: var(--transition);
  width: 100%;
  font-size: 0.95rem;
  margin-top: auto;
  min-height: 44px;
}

.btn-product:hover {
  background: var(--gradient-accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
}

.btn-product:focus {
  outline: 3px solid var(--accent-color);
  outline-offset: 2px;
}

@media (min-width: 992px) {
  .btn-product {
    padding: 14px 28px;
    font-size: 1rem;
  }
}

/* ===================================
   10. 3D PRODUCT VIEWER
   =================================== */
.product-3d-viewer {
  background: var(--light-color);
  padding: 60px 0;
}

@media (min-width: 992px) {
  .product-3d-viewer {
    padding: 100px 0;
  }
}

.viewer-container {
  height: 400px;
  background: white;
  border-radius: 16px;
  box-shadow: var(--shadow-large);
  position: relative;
  overflow: hidden;
}

@media (min-width: 768px) {
  .viewer-container {
    height: 500px;
    border-radius: 20px;
  }
}

@media (min-width: 992px) {
  .viewer-container {
    height: 600px;
    border-radius: 24px;
  }
}

.viewer-3d {
  width: 100%;
  height: 100%;
  perspective: 1500px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

.product-3d-model {
  display: none;
}

@media (min-width: 768px) {
  .product-3d-model {
    display: block;
    width: 250px;
    height: 250px;
    position: relative;
    transform-style: preserve-3d;
    animation: rotate3dSlow 25s infinite linear;
  }
}

@media (min-width: 992px) {
  .product-3d-model {
    width: 300px;
    height: 300px;
  }
}

@media (min-width: 1200px) {
  .product-3d-model {
    width: 400px;
    height: 400px;
  }
}

.model-component {
  position: absolute;
  border-radius: var(--border-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: white;
  font-weight: 600;
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.3);
  box-shadow: var(--shadow-medium);
}

@media (min-width: 992px) {
  .model-component {
    font-size: 1.35rem;
  }
}

@media (min-width: 1200px) {
  .model-component {
    font-size: 1.5rem;
  }
}

.model-component:nth-child(1) {
  width: 100px;
  height: 100px;
  background: var(--gradient-primary);
  transform: translateX(-50px) translateY(-50px) translateZ(80px);
}

@media (min-width: 1200px) {
  .model-component:nth-child(1) {
    width: 120px;
    height: 120px;
    transform: translateX(-60px) translateY(-60px) translateZ(100px);
  }
}

.model-component:nth-child(2) {
  width: 80px;
  height: 110px;
  background: var(--gradient-accent);
  transform: translateX(60px) translateY(-30px) translateZ(40px);
}

@media (min-width: 1200px) {
  .model-component:nth-child(2) {
    width: 100px;
    height: 140px;
    transform: translateX(80px) translateY(-40px) translateZ(50px);
  }
}

.model-component:nth-child(3) {
  width: 110px;
  height: 80px;
  background: linear-gradient(135deg, var(--success-color), #059669);
  transform: translateX(15px) translateY(60px) translateZ(60px);
}

@media (min-width: 1200px) {
  .model-component:nth-child(3) {
    width: 140px;
    height: 100px;
    transform: translateX(20px) translateY(80px) translateZ(75px);
  }
}

.model-component:nth-child(4) {
  width: 90px;
  height: 90px;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  transform: translateX(-60px) translateY(50px) translateZ(20px);
}

@media (min-width: 1200px) {
  .model-component:nth-child(4) {
    width: 110px;
    height: 110px;
    transform: translateX(-80px) translateY(60px) translateZ(25px);
  }
}

@keyframes rotate3dSlow {
  0% {
    transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg);
  }
  100% {
    transform: rotateX(360deg) rotateY(360deg) rotateZ(180deg);
  }
}

.viewer-controls {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  background: rgba(255, 255, 255, 0.9);
  padding: 12px 20px;
  border-radius: 50px;
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-medium);
}

@media (min-width: 992px) {
  .viewer-controls {
    bottom: 30px;
    gap: 15px;
    padding: 15px 25px;
  }
}

.control-btn {
  background: var(--gradient-primary);
  color: white;
  border: none;
  padding: 10px 12px;
  border-radius: 50%;
  cursor: pointer;
  transition: var(--transition);
  font-size: 1rem;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.control-btn:hover {
  background: var(--gradient-accent);
  transform: scale(1.15);
}

.control-btn:focus {
  outline: 3px solid var(--accent-color);
  outline-offset: 2px;
}

@media (min-width: 992px) {
  .control-btn {
    padding: 12px 16px;
    font-size: 1.1rem;
  }
}

/* ===================================
   11. FEATURES SECTION
   =================================== */
.features {
  background: white;
}

.feature-item {
  text-align: center;
  padding: 30px 20px;
  background: white;
  border-radius: 16px;
  box-shadow: var(--shadow-soft);
  transition: var(--transition);
  height: 100%;
  border: 1px solid rgba(226, 232, 240, 0.8);
  margin-bottom: 20px;
}

.feature-item:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-large);
}

@media (min-width: 992px) {
  .feature-item {
    padding: 40px 30px;
    border-radius: 20px;
  }
}

.feature-icon {
  width: 60px;
  height: 60px;
  background: var(--gradient-accent);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 1.5rem;
  color: white;
}

@media (min-width: 768px) {
  .feature-icon {
    width: 70px;
    height: 70px;
    font-size: 1.75rem;
    margin-bottom: 22px;
  }
}

@media (min-width: 992px) {
  .feature-icon {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    font-size: 2rem;
    margin-bottom: 25px;
  }
}

.feature-item h5 {
  color: var(--primary-color);
  margin-bottom: 15px;
  font-weight: 700;
  font-size: 1.15rem;
}

@media (min-width: 992px) {
  .feature-item h5 {
    margin-bottom: 20px;
    font-size: 1.3rem;
  }
}

.feature-item p {
  color: #6b7280;
  line-height: 1.6;
  font-size: 0.95rem;
}

@media (min-width: 992px) {
  .feature-item p {
    font-size: 1rem;
  }
}

/* ===================================
   12. STATS SECTION
   =================================== */
.stats {
  background: var(--gradient-primary);
  color: white;
  position: relative;
  overflow: hidden;
}

.stats::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.1'%3E%3Ccircle cx='30' cy='30' r='4'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.stat-item {
  text-align: center;
  padding: 20px 15px;
  position: relative;
  z-index: 2;
}

@media (min-width: 992px) {
  .stat-item {
    padding: 30px 20px;
  }
}

.stat-number {
  font-size: 2.5rem;
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 800;
  display: block;
  margin-bottom: 10px;
  background: linear-gradient(45deg, #ffffff, #f9fafb);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

@media (min-width: 992px) {
  .stat-number {
    margin-bottom: 15px;
  }
}

.stat-label {
  font-size: 1rem;
  opacity: 0.9;
  font-weight: 500;
}

@media (min-width: 768px) {
  .stat-label {
    font-size: 1.1rem;
  }
}

@media (min-width: 992px) {
  .stat-label {
    font-size: 1.2rem;
  }
}

/* ===================================
   13. CONTACT SECTION
   =================================== */
.contact-section {
  background: var(--light-color);
}

.contact-form {
  background: white;
  padding: 30px;
  border-radius: 16px;
  box-shadow: var(--shadow-large);
  border: 1px solid rgba(226, 232, 240, 0.8);
  margin-bottom: 30px;
}

@media (min-width: 768px) {
  .contact-form {
    padding: 40px;
    border-radius: 20px;
    margin-bottom: 0;
  }
}

@media (min-width: 992px) {
  .contact-form {
    padding: 50px;
    border-radius: 24px;
  }
}

.form-control {
  border: 2px solid #e5e7eb;
  border-radius: var(--border-radius);
  padding: 14px 18px;
  margin-bottom: 20px;
  transition: var(--transition);
  font-size: 1rem;
  background: #fafafa;
  width: 100%;
}

.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(30, 64, 175, 0.25);
  background: white;
  outline: none;
}

@media (min-width: 992px) {
  .form-control {
    padding: 16px 20px;
    margin-bottom: 25px;
  }
}

.contact-info {
  background: var(--gradient-primary);
  color: white;
  padding: 30px;
  border-radius: 16px;
  position: relative;
  overflow: hidden;
}

@media (min-width: 768px) {
  .contact-info {
    padding: 40px;
    border-radius: 20px;
  }
}

@media (min-width: 992px) {
  .contact-info {
    padding: 50px;
    border-radius: 24px;
  }
}

.contact-info::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
  animation: contactGlow 15s ease-in-out infinite;
}

@keyframes contactGlow {
  0%, 100% {
    transform: rotate(0deg) scale(1);
  }
  50% {
    transform: rotate(180deg) scale(1.1);
  }
}

.contact-item {
  display: flex;
  align-items: center;
  margin-bottom: 25px;
  position: relative;
  z-index: 2;
}

@media (min-width: 992px) {
  .contact-item {
    margin-bottom: 35px;
  }
}

.contact-item i {
  font-size: 1.5rem;
  margin-right: 20px;
  color: var(--accent-color);
  width: 35px;
  min-width: 35px;
}

@media (min-width: 992px) {
  .contact-item i {
    font-size: 1.8rem;
    margin-right: 25px;
    width: 40px;
    min-width: 40px;
  }
}

.contact-item-content {
  flex: 1;
}

.contact-item strong {
  display: block;
  font-size: 1rem;
  margin-bottom: 5px;
  font-weight: 600;
}

@media (min-width: 992px) {
  .contact-item strong {
    font-size: 1.1rem;
  }
}

/* ===================================
   14. FOOTER
   =================================== */
.footer {
  background: var(--dark-color);
  color: white;
  padding: 50px 0 25px;
  position: relative;
}

@media (min-width: 992px) {
  .footer {
    padding: 60px 0 30px;
  }
}

.footer-content {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 30px;
  margin-bottom: 25px;
}

@media (min-width: 992px) {
  .footer-content {
    padding-bottom: 40px;
    margin-bottom: 30px;
  }
}

.footer-section h5 {
  color: var(--accent-color);
  margin-bottom: 20px;
  font-weight: 700;
  font-size: 1.1rem;
}

@media (min-width: 992px) {
  .footer-section h5 {
    margin-bottom: 25px;
    font-size: 1.2rem;
  }
}

.footer-section ul {
  list-style: none;
  padding: 0;
}

.footer-section ul li {
  margin-bottom: 10px;
}

@media (min-width: 992px) {
  .footer-section ul li {
    margin-bottom: 12px;
  }
}

.footer-section ul li a {
  color: #d1d5db;
  text-decoration: none;
  transition: var(--transition);
  font-size: 0.95rem;
}

.footer-section ul li a:hover {
  color: var(--accent-color);
  padding-left: 5px;
}

@media (min-width: 992px) {
  .footer-section ul li a {
    font-size: 1rem;
  }
}

.social-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

@media (min-width: 992px) {
  .social-links {
    gap: 15px;
  }
}

.social-links a {
  width: 42px;
  height: 42px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  text-decoration: none;
  transition: var(--transition);
  font-size: 1rem;
}

.social-links a:hover {
  background: var(--accent-color);
  transform: translateY(-3px);
}

.social-links a:focus {
  outline: 3px solid var(--accent-color);
  outline-offset: 2px;
}

@media (min-width: 992px) {
  .social-links a {
    width: 45px;
    height: 45px;
    font-size: 1.1rem;
  }
}

/* ===================================
   15. CATALOG CARDS
   =================================== */
.catalog-card {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: all 0.3s ease;
  margin-bottom: 25px;
}

.catalog-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

@media (min-width: 992px) {
  .catalog-card {
    margin-bottom: 30px;
  }
}

.catalog-header {
  padding: 20px;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  flex-direction: column;
  text-align: center;
}

@media (min-width: 768px) {
  .catalog-header {
    flex-direction: row;
    text-align: left;
    padding: 22px;
  }
}

@media (min-width: 992px) {
  .catalog-header {
    padding: 25px;
  }
}

.catalog-icon {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 0;
  margin-bottom: 15px;
  box-shadow: 0 5px 15px rgba(0, 123, 255, 0.3);
}

@media (min-width: 768px) {
  .catalog-icon {
    width: 55px;
    height: 55px;
    margin-right: 18px;
    margin-bottom: 0;
  }
}

@media (min-width: 992px) {
  .catalog-icon {
    width: 60px;
    height: 60px;
    margin-right: 20px;
  }
}

.catalog-icon i {
  font-size: 20px;
  color: #ffffff;
}

@media (min-width: 992px) {
  .catalog-icon i {
    font-size: 24px;
  }
}

.catalog-info h4 {
  color: #2c3e50;
  font-weight: 600;
  margin-bottom: 5px;
  font-size: 1.2rem;
}

@media (min-width: 992px) {
  .catalog-info h4 {
    font-size: 1.4rem;
  }
}

.catalog-description {
  color: #6c757d;
  margin: 0;
  font-size: 0.9rem;
}

@media (min-width: 992px) {
  .catalog-description {
    font-size: 0.95rem;
  }
}

.catalog-preview {
  padding: 0 20px;
  background: #f8f9fa;
}

@media (min-width: 992px) {
  .catalog-preview {
    padding: 0 25px;
  }
}

.catalog-preview embed {
  background: #ffffff;
  width: 100%;
  height: 300px;
}

@media (min-width: 768px) {
  .catalog-preview embed {
    height: 400px;
  }
}

@media (min-width: 992px) {
  .catalog-preview embed {
    height: 500px;
  }
}

.catalog-actions {
  padding: 18px 20px;
  display: flex;
  gap: 12px;
  background: #ffffff;
  flex-direction: column;
}

@media (min-width: 768px) {
  .catalog-actions {
    flex-direction: row;
    padding: 20px 22px;
  }
}

@media (min-width: 992px) {
  .catalog-actions {
    gap: 15px;
    padding: 20px 25px;
  }
}

.btn-secondary-custom {
  background: #6c757d;
  border: none;
  border-radius: 8px;
  padding: 12px 24px;
  font-weight: 500;
  color: #ffffff;
  text-decoration: none;
  transition: all 0.3s ease;
  flex: 1;
  text-align: center;
  display: inline-block;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-secondary-custom:hover {
  background: #5a6268;
  color: #ffffff;
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(108, 117, 125, 0.3);
}

.btn-secondary-custom:focus {
  outline: 3px solid #6c757d;
  outline-offset: 2px;
}

/* ===================================
   16. MODAL STYLES
   =================================== */
.modal-xl {
  max-width: 95%;
}

#pdfModal .modal-content {
  border-radius: 12px;
  border: none;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

#pdfModal .modal-header {
  background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
  color: #ffffff;
  border-bottom: none;
  border-radius: 12px 12px 0 0;
}

#pdfModal .modal-header .close {
  color: #ffffff;
  opacity: 0.8;
  text-shadow: none;
}

#pdfModal .modal-header .close:hover {
  opacity: 1;
}

/* ===================================
   17. SCROLL TO TOP BUTTON
   =================================== */
.scroll-to-top {
  position: fixed;
  bottom: 15px;
  right: 15px;
  width: 40px;
  height: 40px;
  background: var(--gradient-primary);
  border: none;
  border-radius: 50%;
  color: white;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-large);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.scroll-to-top:hover {
  background: var(--gradient-accent);
  transform: translateY(-3px) scale(1.1);
  box-shadow: 0 10px 30px rgba(245, 158, 11, 0.4);
}

.scroll-to-top:active {
  transform: translateY(-1px) scale(1.05);
}

.scroll-to-top:focus {
  outline: 3px solid var(--accent-color);
  outline-offset: 2px;
}

.scroll-to-top i {
  animation: bounceUp 2s infinite;
}

@keyframes bounceUp {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-5px);
  }
  60% {
    transform: translateY(-3px);
  }
}

@media (min-width: 768px) {
  .scroll-to-top {
    width: 45px;
    height: 45px;
    bottom: 20px;
    right: 20px;
    font-size: 1.1rem;
  }
}

@media (min-width: 992px) {
  .scroll-to-top {
    width: 50px;
    height: 50px;
    bottom: 30px;
    right: 30px;
    font-size: 1.2rem;
  }
}

/* ===================================
   18. LOADING ANIMATION
   =================================== */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s ease;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #f3f4f6;
  border-top: 3px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@media (min-width: 768px) {
  .loading-spinner {
    width: 50px;
    height: 50px;
  }
}

/* ===================================
   19. ACCESSIBILITY
   =================================== */
.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;
}

/* Skip to content link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--primary-color);
  color: white;
  padding: 8px 16px;
  text-decoration: none;
  z-index: 100;
}

.skip-link:focus {
  top: 0;
  outline: 3px solid var(--accent-color);
  outline-offset: 2px;
}

/* ===================================
   20. PRINT STYLES
   =================================== */
@media print {
  .navbar,
  .hero-3d-container,
  .viewer-controls,
  .scroll-to-top,
  .footer,
  .social-links {
    display: none !important;
  }

  .hero {
    min-height: auto;
    background: white;
    color: black;
    page-break-after: always;
  }

  .section {
    padding: 20px 0;
    page-break-inside: avoid;
  }

  .product-gallery-card,
  .company-card,
  .feature-item {
    page-break-inside: avoid;
  }

  body {
    font-size: 12pt;
  }

  a {
    text-decoration: underline;
  }

  a[href^="http"]:after {
    content: " (" attr(href) ")";
  }
}

/* ===================================
   21. UTILITY CLASSES
   =================================== */
.text-gradient {
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.container-fluid-custom {
  padding-left: 15px;
  padding-right: 15px;
}

@media (min-width: 768px) {
  .container-fluid-custom {
    padding-left: 30px;
    padding-right: 30px;
  }
}

@media (min-width: 1200px) {
  .container-fluid-custom {
    padding-left: 50px;
    padding-right: 50px;
  }
}

/* ===================================
   22. BROWSER COMPATIBILITY
   =================================== */
/* Safari-specific fixes */
@supports (-webkit-appearance: none) {
  .hero-3d-container,
  .rotating-machinery {
    -webkit-transform-style: preserve-3d;
  }
}

/* Firefox-specific fixes */
@-moz-document url-prefix() {
  .btn-primary-custom,
  .btn-product {
    padding-top: 15px;
    padding-bottom: 15px;
  }
}

/* IE11 fallbacks (if needed) */
@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
  .product-gallery-card {
    height: auto;
  }
  
  .hero-3d-container,
  .rotating-machinery {
    display: none;
  }
}
