/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* CSS Variables for consistent theming */
:root {
    --primary-color: #0066ff;
    --primary-dark: #0052cc;
    --secondary-color: #6c757d;
    --accent-color: #00d4aa;
    --background-color: #ffffff;
    --surface-color: #f8f9fa;
    --text-primary: #212529;
    --text-secondary: #6c757d;
    --text-light: #ffffff;
    --border-color: #dee2e6;
    --shadow-light: rgba(0, 0, 0, 0.1);
    --shadow-medium: rgba(0, 0, 0, 0.15);
    --shadow-heavy: rgba(0, 0, 0, 0.3);
    --gradient-primary: linear-gradient(135deg, #0066ff 0%, #00d4aa 100%);
    --gradient-secondary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --border-radius: 12px;
    --border-radius-lg: 20px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Theme Variables */
.theme-dark {
    --background-color: #0f1221;
    --surface-color: #151935;
    --text-primary: #e6e8ef;
    --text-secondary: #a6accd;
    --border-color: #23284d;
    --shadow-light: rgba(0, 0, 0, 0.4);
    --shadow-medium: rgba(0, 0, 0, 0.5);
    --shadow-heavy: rgba(0, 0, 0, 0.7);
}

/* Container and Grid Optimization */
.container {
    max-width: 1400px;
    padding-left: 2rem;
    padding-right: 2rem;
}

@media (max-width: 1200px) {
    .container {
        max-width: 1140px;
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

@media (max-width: 992px) {
    .container {
        max-width: 960px;
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }
}

@media (max-width: 768px) {
    .container {
        max-width: 720px;
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

@media (max-width: 576px) {
    .container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
}

/* Golden Ratio Spacing System */
:root {
    --space-xs: 0.618rem;    /* φ⁻¹ */
    --space-sm: 1rem;        /* base */
    --space-md: 1.618rem;    /* φ */
    --space-lg: 2.618rem;    /* φ² */
    --space-xl: 4.236rem;    /* φ³ */
    --space-xxl: 6.854rem;   /* φ⁴ */
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--background-color);
    overflow-x: hidden;
}

/* Readability enhancements */
html {
	/* Prevent anchor overlap with fixed navbar */
	scroll-padding-top: 80px;
}

section[id] {
	scroll-margin-top: 80px;
}

/* Limit line length for better readability */
p, li {
	max-width: 65ch;
}

/* Robust text wrapping to avoid overflow on small screens */
p, li {
  overflow-wrap: anywhere;
  word-break: auto-phrase;
  hyphens: auto;
}

/* Narrow content wrapper for long text blocks */
.content-narrow {
	max-width: 65ch;
}

/* Slight text contrast on complex backgrounds */
.hero-content .hero-title,
.hero-content .hero-description {
	text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

/* Service text width */
.service-content {
	max-width: 65ch;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

h1 { 
    font-size: 3.5rem; 
    line-height: 1.1;
}
h2 { 
    font-size: 2.5rem; 
    line-height: 1.2;
}
h3 { 
    font-size: 2rem; 
    line-height: 1.3;
}
h4 { 
    font-size: 1.5rem; 
    line-height: 1.4;
}

p {
    line-height: 1.7;
    margin-bottom: 1.2rem;
    font-size: 1rem;
    color: var(--text-secondary);
}

@media (max-width: 768px) {
    h1 { 
        font-size: 2.5rem; 
        line-height: 1.2;
    }
    h2 { 
        font-size: 2rem; 
        line-height: 1.3;
    }
    h3 { 
        font-size: 1.5rem; 
        line-height: 1.4;
    }
    
    p {
        font-size: 0.95rem;
        line-height: 1.6;
    }
}

@media (max-width: 992px) {
  body {
    font-size: 16px;
  }
}

@media (max-width: 768px) {
  body {
    font-size: 16.5px; /* slightly larger for readability */
    line-height: 1.7;
  }

  /* Backdrop for hero text over image/gradient for better contrast */
  .hero-content {
    background: rgba(0, 0, 0, 0.35);
    padding: 1rem 1.25rem;
    border-radius: 12px;
  }

  .hero-content .hero-title,
  .hero-content .hero-description {
    text-shadow: none; /* backdrop already gives contrast */
  }

  /* Ensure controls have spacing for touch */
  .hero-buttons .btn {
    width: 100%;
    margin-bottom: 0.75rem;
  }

  .hero-buttons .btn:last-child { margin-bottom: 0; }
}

/* Section Titles with Golden Ratio Scaling */
.section-title {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
    margin-bottom: var(--space-md);
    text-align: center;
    font-size: clamp(2rem, 5vw, 3rem);
    line-height: 1.2;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: clamp(1rem, 2.5vw, 1.3rem);
    margin-bottom: var(--space-xl);
    text-align: center;
    max-width: 50ch;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.618;
}

.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Specific gradient for hero "Solutions Equipment" */
.hero-title .gradient-text {
    background: linear-gradient(135deg, #FFD700 0%, #FF6B35 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Body padding for fixed navbar */
body {
    padding-top: 80px; /* Space for fixed navbar */
}

@media (max-width: 768px) {
    body {
        padding-top: 70px; /* Reduced space on mobile */
    }
}

@media (max-width: 576px) {
    body {
        padding-top: 65px; /* Further reduced on small mobile */
    }
}

/* Navigation */
.navbar {
    min-height: 80px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition);
    padding: 1rem 0;
}

@media (max-width: 768px) {
    .navbar {
        min-height: 70px;
        padding: 0.75rem 0;
    }
}

@media (max-width: 576px) {
    .navbar {
        min-height: 65px;
        padding: 0.5rem 0;
    }
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 4px 20px var(--shadow-light);
}

/* Dark theme navbar adjustments */
.theme-dark .navbar {
    background: rgba(15, 18, 33, 0.9);
    border-bottom-color: rgba(255,255,255,0.06);
}
.theme-dark .navbar.scrolled {
    background: rgba(15, 18, 33, 0.95);
}
.theme-dark .navbar-light .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255,255,255,0.9)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.navbar-brand {
    display: flex;
    align-items: center;
    font-weight: 700;
    color: var(--text-primary) !important;
    text-decoration: none;
}

/* Logo Styles */
.logo-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: var(--gradient-primary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.brand-name {
    font-size: 1.4rem;
    font-weight: 800;
    line-height: 1;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.brand-tagline {
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--text-secondary);
    line-height: 1;
    margin-top: 2px;
}

.brand-text {
    margin-left: 0.5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-link {
    font-weight: 500;
    color: var(--text-primary) !important;
    margin: 0 0.5rem;
    padding: 0.5rem 1rem !important;
    border-radius: var(--border-radius);
    transition: var(--transition);
    position: relative;
}

.nav-link:hover {
    color: var(--primary-color) !important;
    background: rgba(0, 102, 255, 0.1);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: var(--transition);
    transform: translateX(-50%);
}

.nav-link:hover::after {
    width: 80%;
}

/* Navbar mobile accessibility */
.navbar-toggler {
	border: 1px solid rgba(0,0,0,0.2);
	padding: 0.4rem 0.6rem;
}

.navbar-light .navbar-toggler-icon {
	background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(0,0,0,0.85)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.navbar .nav-link {
	font-size: 1rem;
}

@media (max-width: 991.98px) {
	.navbar .nav-link {
		padding-top: 0.75rem !important;
		padding-bottom: 0.75rem !important;
	}
}

/* Hero Section */
.hero-section {
    min-height: calc(100vh - 80px); /* Account for navbar height */
    position: relative;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    overflow: hidden;
    padding: var(--space-lg) 0;
    margin-top: 0; /* Reset any existing margin */
}

@media (max-width: 768px) {
    .hero-section {
        min-height: calc(90vh - 70px); /* Account for smaller navbar on mobile */
        padding: var(--space-md) 0;
    }
}

@media (max-width: 576px) {
    .hero-section {
        min-height: calc(85vh - 65px); /* Account for even smaller navbar */
        padding: var(--space-sm) 0;
    }
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('../Images/background-1.jpg') center/cover no-repeat;
    opacity: 0.1;
    z-index: 1;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    opacity: 0.9;
    z-index: 2;
}

.theme-dark .hero-section {
    background: linear-gradient(135deg, #0f1221 0%, #151935 100%);
}
.theme-dark .hero-section::before {
    opacity: 0.75;
}

.hero-content {
    position: relative;
    z-index: 3;
    color: white;
    max-width: 100%;
}

.hero-title {
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    font-weight: 800;
    margin-bottom: var(--space-md);
    line-height: 1.1;
}

.hero-description {
    font-size: clamp(1rem, 2.5vw, 1.3rem);
    margin-bottom: var(--space-lg);
    color: #ffffff;
    opacity: 1;
    max-width: 38.2ch; /* Golden ratio characters */
    line-height: 1.618; /* Golden ratio line height */
}

.hero-buttons {
    margin-bottom: var(--space-lg);
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
}

@media (max-width: 576px) {
    .hero-buttons {
        flex-direction: column;
        gap: var(--space-sm);
    }
    
    .hero-buttons .btn {
        width: 100%;
    }
}

.hero-stats {
    display: flex;
    gap: var(--space-md);
    margin-top: var(--space-lg);
    flex-wrap: wrap;
    justify-content: flex-start;
}

@media (max-width: 768px) {
    .hero-stats {
        justify-content: center;
        gap: var(--space-sm);
    }
}

@media (max-width: 576px) {
    .hero-stats {
        flex-direction: column;
        align-items: center;
        gap: var(--space-sm);
    }
}

.stat-item {
    text-align: center;
    min-width: 120px;
}

.stat-item h3 {
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 800;
    margin-bottom: var(--space-xs);
    color: #ffffff;
}

.stat-item p {
    font-size: clamp(0.85rem, 2vw, 1rem);
    color: #ffffff;
    opacity: 1;
    margin: 0;
}

/* Ensure hero stats are white in hero context */
.hero-stats .stat-item h3 { color: #ffffff; }
.hero-stats .stat-item p  { color: #ffffff; opacity: 1; }

/* Hero Visual Elements */
.hero-visual {
    position: relative;
    z-index: 3;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 500px;
}

@media (max-width: 992px) {
    .hero-visual {
        min-height: 400px;
        margin-top: var(--space-lg);
    }
}

@media (max-width: 768px) {
    .hero-visual {
        min-height: 300px;
        margin-top: var(--space-md);
    }
    
    /* Hide complex visual elements on mobile for cleaner look */
    .floating-stats {
        display: none;
    }
}

@media (max-width: 576px) {
    .hero-visual {
        min-height: 250px;
        padding: var(--space-sm);
    }
}

.automation-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
    max-width: 400px;
    width: 100%;
}

@media (max-width: 992px) {
    .automation-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-sm);
        max-width: 300px;
    }
}

@media (max-width: 768px) {
    .automation-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: var(--space-sm);
        max-width: 320px;
        justify-items: center;
        margin: 0 auto;
    }
    
    .hero-visual {
        min-height: 300px;
        margin-top: var(--space-md);
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }
    
    .hero-illustration {
        width: 100%;
        display: flex;
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .automation-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: var(--space-sm);
        max-width: 280px;
        justify-items: center;
        margin: 0 auto;
    }
}

.grid-item {
    background: rgba(255, 255, 255, 0.1);
    padding: var(--space-md) var(--space-sm);
    border-radius: var(--border-radius);
    text-align: center;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: var(--transition);
    animation: float 6s ease-in-out infinite;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

@media (max-width: 768px) {
    .grid-item {
        padding: var(--space-sm);
        min-height: 85px;
        width: 100%;
        max-width: 140px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        text-align: center;
    }
}

@media (max-width: 576px) {
    .grid-item {
        padding: var(--space-sm);
        min-height: 80px;
        width: 100%;
        max-width: 120px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        text-align: center;
    }
}

.grid-item:nth-child(even) {
    animation-delay: 1s;
}

.grid-item:nth-child(3n) {
    animation-delay: 2s;
}

.grid-item:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-5px);
}

.grid-item i {
    font-size: clamp(1.2rem, 3vw, 2rem);
    color: var(--accent-color);
    margin-bottom: var(--space-xs);
    display: block;
}

.grid-item span {
    font-size: clamp(0.75rem, 2vw, 0.9rem);
    color: white;
    font-weight: 500;
    line-height: 1.2;
}

.floating-stats {
    position: absolute;
    right: -20px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

@media (max-width: 1200px) {
    .floating-stats {
        position: static;
        flex-direction: row;
        justify-content: center;
        margin-top: var(--space-lg);
        transform: none;
        gap: var(--space-md);
    }
}

@media (max-width: 768px) {
    .floating-stats {
        display: none; /* Hide on mobile for cleaner design */
    }
}

.stat-card {
    background: white;
    padding: var(--space-md);
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: 0 15px 35px var(--shadow-medium);
    min-width: 120px;
    animation: float 6s ease-in-out infinite 3s;
}

@media (max-width: 992px) {
    .stat-card {
        min-width: 100px;
        padding: var(--space-sm);
    }
}

.stat-card:last-child {
    animation-delay: 4s;
}

.stat-card i {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-card h5 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.stat-card p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin: 0;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

/* Buttons */
.btn-modern {
    padding: 0.75rem 2rem;
    border-radius: var(--border-radius-lg);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: var(--transition);
    border: none;
    position: relative;
    overflow: hidden;
}

.btn-primary.btn-modern {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 8px 25px rgba(0, 102, 255, 0.3);
}

.btn-primary.btn-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(0, 102, 255, 0.4);
}

.btn-outline-light.btn-modern {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    backdrop-filter: blur(10px);
}

.btn-outline-light.btn-modern:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

/* Section Spacing with Golden Ratio */
section {
    padding: var(--space-xl) 0;
}

@media (max-width: 992px) {
    section {
        padding: var(--space-lg) 0;
    }
}

@media (max-width: 768px) {
    section {
        padding: var(--space-md) 0;
    }
}

/* Benefits Section */
.benefits-section {
    background: var(--surface-color);
    padding: var(--space-xl) 0;
}

/* Responsive Grid System */
.benefit-card, .industry-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: var(--space-lg);
    height: 100%;
    text-align: center;
    transition: var(--transition);
    box-shadow: 0 4px 6px var(--shadow-light);
}

@media (max-width: 768px) {
    .benefit-card, .industry-card {
        padding: var(--space-md);
        margin-bottom: var(--space-md);
    }
}

.benefit-card:hover, .industry-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px var(--shadow-medium);
}

.benefit-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    opacity: 0;
    transition: var(--transition);
    z-index: 1;
}

.benefit-card:hover::before {
    left: 0;
    opacity: 0.05;
}

.benefit-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px var(--shadow-medium);
}

.benefit-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
}

.benefit-icon i {
    font-size: 2rem;
    color: white;
}

.benefit-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    position: relative;
    z-index: 2;
}

.benefit-card p {
    color: var(--text-secondary);
    line-height: 1.6;
    position: relative;
    z-index: 2;
}

/* Services Section */
.services-section {
    padding: var(--space-xl) 0;
    background: white;
}

.service-item {
    margin-bottom: var(--space-xl);
    padding: var(--space-lg) 0;
}

@media (max-width: 992px) {
    .service-item {
        margin-bottom: var(--space-lg);
        padding: var(--space-md) 0;
    }
}

.service-content {
    max-width: 100%;
}

.service-content h3 {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    margin-bottom: var(--space-md);
    color: var(--text-primary);
    line-height: 1.3;
}

.service-content p {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: var(--text-secondary);
    margin-bottom: var(--space-lg);
    line-height: 1.618;
    max-width: 65ch;
}

.service-features {
    list-style: none;
    padding: 0;
}

.service-features li {
    display: flex;
    align-items: center;
    margin-bottom: 0.75rem;
    font-weight: 500;
    font-size: 1rem;
}

.service-features li i {
    color: var(--accent-color);
    margin-right: 1rem;
    font-size: 1.1rem;
}

/* Service Illustrations */
.service-illustration, .automation-visualization, .supply-chain-visual {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 350px;
    padding: 2rem;
}

/* Design Process Visualization */
.design-process {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 300px;
    width: 100%;
}

.process-step {
    display: flex;
    align-items: center;
    padding: 1.5rem;
    background: var(--surface-color);
    border-radius: var(--border-radius);
    border-left: 4px solid var(--border-color);
    transition: var(--transition);
    position: relative;
}

.process-step.active {
    border-left-color: var(--primary-color);
    background: linear-gradient(135deg, rgba(0, 102, 255, 0.1) 0%, rgba(0, 212, 170, 0.05) 100%);
}

.process-step:hover {
    border-left-color: var(--primary-color);
    background: linear-gradient(135deg, rgba(0, 102, 255, 0.1) 0%, rgba(0, 212, 170, 0.05) 100%);
    transform: translateX(10px);
}

.process-step i {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-right: 1rem;
    width: 30px;
    text-align: center;
}

.process-step span {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1.1rem;
}

/* Factory Layout Visualization */
.factory-layout {
    background: var(--surface-color);
    padding: 2rem;
    border-radius: var(--border-radius-lg);
    border: 2px solid var(--border-color);
    position: relative;
    max-width: 400px;
    width: 100%;
}

.production-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.machine-unit {
    background: white;
    padding: 1rem;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: 0 4px 15px var(--shadow-light);
    flex: 1;
    min-width: 80px;
    border: 2px solid var(--primary-color);
    animation: pulse 3s ease-in-out infinite;
}

.machine-unit:nth-child(even) {
    animation-delay: 1s;
}

.machine-unit:nth-child(3n) {
    animation-delay: 2s;
}

@keyframes pulse {
    0%, 100% { 
        border-color: var(--primary-color);
        box-shadow: 0 4px 15px var(--shadow-light);
    }
    50% { 
        border-color: var(--accent-color);
        box-shadow: 0 8px 25px rgba(0, 212, 170, 0.3);
    }
}

.machine-unit i {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    display: block;
}

.machine-unit span {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

.connection-line {
    width: 30px;
    height: 2px;
    background: var(--primary-color);
    position: relative;
    margin: 0 0.5rem;
}

.connection-line::after {
    content: '';
    position: absolute;
    right: -5px;
    top: -3px;
    width: 0;
    height: 0;
    border-left: 8px solid var(--primary-color);
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
}

.control-center {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: 0 8px 25px rgba(0, 102, 255, 0.3);
}

.control-center i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    display: block;
}

.control-center span {
    font-weight: 600;
    font-size: 1.1rem;
}

/* Supply Chain Visualization */
.supply-flow {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--surface-color);
    padding: 2rem;
    border-radius: var(--border-radius-lg);
    border: 2px solid var(--border-color);
    max-width: 500px;
    width: 100%;
    flex-wrap: wrap;
    gap: 1rem;
}

.flow-step {
    background: white;
    padding: 1.5rem 1rem;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: 0 4px 15px var(--shadow-light);
    flex: 1;
    min-width: 120px;
    border: 2px solid transparent;
    transition: var(--transition);
}

.flow-step:hover {
    border-color: var(--primary-color);
    transform: translateY(-5px);
    box-shadow: 0 8px 25px var(--shadow-medium);
}

.flow-step i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    display: block;
}

.flow-step h5 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.flow-step p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0;
}

.flow-arrow {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin: 0 0.5rem;
    animation: moveRight 2s ease-in-out infinite;
}

@keyframes moveRight {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(5px); }
}

/* Partners Section */
.partners-section {
    background: var(--surface-color);
    padding: 5rem 0;
}

/* About Section */
.about-section {
    background: white;
}
.theme-dark .about-section { background: var(--background-color); }
.about-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.25rem;
    height: 100%;
    transition: var(--transition);
}
.about-card i { color: var(--primary-color); font-size: 1.2rem; }
.about-card h5 { margin-top: 0.5rem; color: var(--text-primary); }
.about-card p { margin: 0; }
.about-card:hover { transform: translateY(-6px); box-shadow: 0 10px 24px var(--shadow-light); }
.about-visual { background: var(--surface-color); }

/* Industries */
.industries-section { background: var(--surface-color); }
.industry-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    height: 100%;
    text-align: center;
    transition: var(--transition);
}
.industry-card i { font-size: 2rem; color: var(--primary-color); margin-bottom: 0.75rem; display: block; }
.industry-card h5 { color: var(--text-primary); }
.industry-card p { margin: 0; }
.industry-card:hover { transform: translateY(-6px); box-shadow: 0 12px 26px var(--shadow-light); }

/* Testimonials */
.testimonials-section { background: white; }
.theme-dark .testimonials-section { background: var(--background-color); }
.testimonial-card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    max-width: 760px;
    text-align: center;
}
.testimonial-card i { color: var(--accent-color); font-size: 1.5rem; margin-bottom: 1rem; }
.testimonial-card h6 { margin: 0; color: var(--text-primary); }

/* FAQ */
.faq-section { background: var(--surface-color); }
.accordion-button { font-weight: 600; }
.theme-dark .accordion-button { background: var(--surface-color); color: var(--text-primary); }
.accordion-button:not(.collapsed) { color: var(--primary-color); box-shadow: none; }
.accordion-item { border-color: var(--border-color); }

/* CTA */
.cta-section {
    background: var(--gradient-secondary);
    color: white;
}
.cta-section h3 { font-weight: 800; }
.cta-section p { color: #ffffff; }

/* Partners Section Enhanced */
.partners-section {
    background: var(--surface-color);
    padding: var(--space-xl) 0;
}

.partners-carousel {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
}

.partner-logo {
    max-height: 120px;
    width: auto;
    max-width: 100%;
    filter: grayscale(100%) opacity(0.8);
    transition: var(--transition);
    padding: var(--space-md);
    object-fit: contain;
}

@media (max-width: 768px) {
    .partner-logo {
        max-height: 80px;
        padding: var(--space-sm);
    }
}

@media (max-width: 576px) {
    .partner-logo {
        max-height: 60px;
        padding: var(--space-xs);
    }
}

.partner-logo:hover {
    filter: grayscale(0%) opacity(1);
    transform: scale(1.05);
}

/* Partner Grid Layout */
.partners-carousel .row {
    align-items: center;
    justify-content: center;
    min-height: 160px;
}

@media (max-width: 768px) {
    .partners-carousel .row {
        min-height: 120px;
    }
}

@media (max-width: 576px) {
    .partners-carousel .row {
        min-height: 100px;
    }
}

.carousel-control-prev,
.carousel-control-next {
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.8;
    transition: var(--transition);
}

.carousel-control-prev {
    left: -75px;
}

.carousel-control-next {
    right: -75px;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    opacity: 1;
    transform: translateY(-50%) scale(1.1);
}

.carousel-control-prev i,
.carousel-control-next i {
    color: white;
    font-size: 1.2rem;
}

/* Contact Section */
.contact-section {
    padding: var(--space-xl) 0;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
}

.contact-section .section-title {
    background: white;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.contact-section .section-subtitle {
    color: rgba(255, 255, 255, 0.8);
}

.contact-form-wrapper {
    background: rgba(255, 255, 255, 0.1);
    padding: var(--space-xl);
    border-radius: var(--border-radius-lg);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin-bottom: var(--space-xl);
}

@media (max-width: 768px) {
    .contact-form-wrapper {
        padding: var(--space-lg);
        margin-bottom: var(--space-lg);
    }
}

@media (max-width: 576px) {
    .contact-form-wrapper {
        padding: var(--space-md);
    }
}

.contact-form .form-control {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: var(--border-radius);
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: var(--transition);
    color: var(--text-primary);
}

.contact-form .form-control:focus {
    background: white;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
    outline: none;
}

.contact-form .form-control::placeholder {
    color: var(--text-secondary);
    opacity: 0.8;
}

.contact-info {
    text-align: center;
    margin-bottom: var(--space-lg);
    padding: var(--space-md);
    border-radius: var(--border-radius);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    transition: var(--transition);
}

.contact-info:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-4px);
}

@media (max-width: 768px) {
    .contact-info {
        margin-bottom: var(--space-md);
        padding: var(--space-sm);
    }
}

.contact-info i {
    font-size: clamp(2rem, 4vw, 3rem);
    color: var(--accent-color);
    margin-bottom: var(--space-sm);
    display: block;
}

.contact-info h4 {
    margin-bottom: var(--space-sm);
    font-size: clamp(1.1rem, 2.5vw, 1.4rem);
}

.contact-info p {
    margin: 0;
    opacity: 0.9;
    color: white;
}

.contact-info a {
    color: var(--accent-color);
    text-decoration: none;
    transition: var(--transition);
}

.contact-info a:hover {
    color: white;
    text-decoration: underline;
}

/* Footer Enhanced */
.footer {
    background: linear-gradient(135deg, var(--text-primary) 0%, #1a1a2e 100%);
    color: white;
    padding: var(--space-xl) 0 var(--space-lg) 0;
    position: relative;
    overflow: hidden;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, var(--accent-color) 50%, transparent 100%);
}

@media (max-width: 768px) {
    .footer {
        padding: var(--space-lg) 0 var(--space-md) 0;
    }
}

.theme-dark .footer { 
    background: linear-gradient(135deg, #0b0e1d 0%, #151935 100%);
}

.footer-brand {
    display: flex;
    align-items: center;
    margin-bottom: var(--space-md);
    padding: var(--space-md);
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--border-radius);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition);
}

.footer-brand:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .footer-brand {
        justify-content: center;
        text-align: center;
        margin-bottom: var(--space-md);
        padding: var(--space-sm);
    }
}

.footer .logo-container {
    gap: var(--space-sm);
}

.footer .logo-icon {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
    background: var(--gradient-primary);
    box-shadow: 0 4px 12px rgba(0, 102, 255, 0.3);
}

@media (max-width: 768px) {
    .footer .logo-icon {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
}

.footer .brand-name {
    font-size: clamp(1rem, 2.5vw, 1.3rem);
    color: white;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer .brand-tagline {
    font-size: clamp(0.6rem, 1.5vw, 0.75rem);
    color: rgba(255, 255, 255, 0.7);
}

.footer-contact {
    background: rgba(255, 255, 255, 0.03);
    padding: var(--space-md);
    border-radius: var(--border-radius);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

@media (max-width: 768px) {
    .footer-contact {
        text-align: center;
        padding: var(--space-sm);
    }
}

.footer-contact p {
    margin: 0;
    opacity: 0.9;
    font-size: clamp(0.8rem, 2vw, 0.95rem);
    line-height: 1.6;
    margin-bottom: var(--space-xs);
}

.footer-contact p:last-child {
    margin-bottom: 0;
}

.footer-contact a {
    color: var(--accent-color);
    text-decoration: none;
    transition: var(--transition);
    font-weight: 500;
}

.footer-contact a:hover {
    color: white;
    text-decoration: underline;
}

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 1000;
    box-shadow: 0 8px 25px rgba(0, 102, 255, 0.3);
}

.scroll-to-top.show {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(0, 102, 255, 0.4);
}

/* Theme toggle button minor tweak */
#themeToggle.btn { border-color: var(--border-color); color: var(--text-primary); }
#themeToggle.btn:hover { background: var(--surface-color); }

/* 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);
    }
}

/* Responsive Design Enhanced */
@media (max-width: 1400px) {
    .hero-visual {
        min-height: 400px;
    }
    
    .automation-grid {
        max-width: 350px;
        gap: var(--space-sm);
    }
}

@media (max-width: 1200px) {
    /* Tablet Landscape */
    .hero-stats {
        justify-content: center;
        margin-top: var(--space-lg);
    }
    
    .floating-stats {
        position: static;
        flex-direction: row;
        justify-content: center;
        margin-top: var(--space-lg);
        transform: none;
        gap: var(--space-md);
    }
    
    .automation-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-sm);
        max-width: 300px;
    }
    
    .service-content {
        margin-bottom: var(--space-lg);
    }
}

@media (max-width: 992px) {
    /* Tablet Portrait */
    .carousel-control-prev,
    .carousel-control-next {
        display: none;
    }
    
    .production-line {
        flex-direction: column;
        gap: var(--space-sm);
    }
    
    .connection-line {
        width: 2px;
        height: 30px;
        margin: var(--space-xs) 0;
    }
    
    .connection-line::after {
        right: -3px;
        top: auto;
        bottom: -5px;
        border-left: 4px solid transparent;
        border-right: 4px solid transparent;
        border-top: 8px solid var(--primary-color);
        border-bottom: none;
    }
    
    .supply-flow {
        flex-direction: column;
        gap: var(--space-sm);
    }
    
    .flow-arrow {
        transform: rotate(90deg);
    }
    
    /* Improve tablet grid layout */
    .benefit-card, .industry-card {
        min-height: 200px;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    /* Mobile Landscape */
    .grid-item {
        padding: var(--space-sm);
    }
    
    .grid-item i {
        font-size: 1.5rem;
    }
    
    .grid-item span {
        font-size: 0.85rem;
    }
    
    .design-process {
        max-width: 100%;
    }
    
    .process-step {
        padding: var(--space-sm);
    }
    
    .process-step i {
        font-size: 1.2rem;
    }
    
    .process-step span {
        font-size: 1rem;
    }
    
    .factory-layout,
    .supply-flow {
        padding: var(--space-md);
        max-width: 100%;
    }
    
    .machine-unit {
        padding: var(--space-sm);
        min-width: 70px;
    }
    
    .machine-unit i {
        font-size: 1.2rem;
    }
    
    .machine-unit span {
        font-size: 0.8rem;
    }
    
    .flow-step {
        padding: var(--space-sm);
        min-width: 100px;
    }
    
    .flow-step i {
        font-size: 1.5rem;
    }
    
    .flow-step h5 {
        font-size: 1rem;
    }
    
    .flow-step p {
        font-size: 0.85rem;
    }
    
    .footer-brand {
        justify-content: center;
        text-align: center;
        margin-bottom: var(--space-md);
    }
    
    .footer-contact {
        text-align: center;
    }
}

@media (max-width: 576px) {
    /* Mobile Portrait */
    .automation-grid {
        grid-template-columns: 1fr;
        gap: var(--space-xs);
        max-width: 200px;
    }
    
    .floating-stats {
        flex-direction: column;
        align-items: center;
        gap: var(--space-sm);
    }
    
    .stat-card {
        min-width: 100px;
        padding: var(--space-sm);
    }
    
    .benefit-card, .industry-card {
        padding: var(--space-md);
        min-height: 180px;
    }
    
    .benefit-icon {
        width: 60px;
        height: 60px;
        margin-bottom: var(--space-sm);
    }
    
    .benefit-icon i {
        font-size: 1.5rem;
    }
    
    .process-step {
        padding: var(--space-xs);
        flex-direction: column;
        text-align: center;
    }
    
    .process-step i {
        margin-right: 0;
        margin-bottom: var(--space-xs);
    }
    
    .factory-layout,
    .supply-flow {
        padding: var(--space-sm);
    }
    
    .machine-unit {
        padding: var(--space-xs);
        min-width: 60px;
    }
    
    .machine-unit span,
    .flow-step p {
        font-size: 0.75rem;
    }
    
    .control-center {
        padding: var(--space-sm);
    }
    
    .control-center i {
        font-size: 1.5rem;
    }
    
    .control-center span {
        font-size: 1rem;
    }
}

/* Loading Animation */
.loading {
    opacity: 0;
    animation: fadeInUp 0.6s ease-out forwards;
}

/* Utility Classes */
.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bg-gradient {
    background: var(--gradient-primary);
}

.shadow-modern {
    box-shadow: 0 10px 30px var(--shadow-medium);
}

.border-radius-modern {
    border-radius: var(--border-radius-lg);
}

/* Mobile contrast adjustments for hero and titles */
@media (max-width: 768px) {
  /* Keep numbers intact (e.g., 24/7) and slightly reduce size to avoid wrapping */
  .stat-item h3 {
    font-size: 2rem;
    white-space: nowrap;
    color: #000000 !important; /* Black text for mobile visibility */
    text-shadow: none;
  }
  .stat-item p {
    font-size: 0.95rem;
    color: #000000 !important; /* Black text for mobile visibility */
    text-shadow: none;
  }

  /* High-contrast stats cards on mobile */
  .hero-stats .stat-item {
    background: rgba(255, 255, 255, 0.95);
    color: #000000;
    padding: var(--space-sm) var(--space-md);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    width: 100%;
    max-width: 280px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: var(--space-xs);
  }
  .hero-stats .stat-item h3 {
    color: #000000 !important;
  }
  .hero-stats .stat-item p {
    color: #000000 !important;
    opacity: 0.85;
  }

  /* High-contrast contact cards on dark gradient background */
  .contact-info {
    background: rgba(255, 255, 255, 0.95);
    color: var(--text-primary);
    border-radius: 12px;
    padding: 1.25rem 1rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  }
  .contact-info h4 { color: var(--text-primary); }
  .contact-info p { color: var(--text-primary); opacity: 0.9; }
  .contact-info a { color: var(--primary-color); }
  .contact-info i { color: var(--primary-color); }
}

@media (max-width: 576px) {
  /* Force solid white instead of gradient for key title part */
  .gradient-text {
    background: none !important;
    -webkit-text-fill-color: #ffffff !important;
    color: #ffffff !important;
  }
}
