/* ========================================
   MOTION ENGINEERINGS - MASTER STYLESHEET
   ======================================== */

/* CSS Variables */
:root {
    --primary: #dc3545;
    --secondary: #343a40;
    --accent: #007bff;
    --success: #28a745;
    --warning: #ffc107;
    --info: #17a2b8;
    --light: #f8f9fa;
    --dark: #343a40;
    --white: #ffffff;
    
    /* Layout */
    --navbar-height: 80px;
    --border-radius: 10px;
    --border-radius-lg: 15px;
    --box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    --box-shadow-hover: 0 8px 25px rgba(0,0,0,0.15);
    
    /* Typography */
    --font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    
    /* Transitions */
    --transition: all 0.3s ease;
    --transition-fast: all 0.2s ease;
}

/* ========================================
   BASE STYLES
   ======================================== */

* {
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--dark);
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: var(--font-weight-semibold);
    color: var(--dark);
    line-height: 1.3;
    margin-bottom: 1rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: var(--font-weight-bold);
    color: var(--secondary);
    margin-bottom: 3rem;
    text-align: center;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--primary);
    margin: 15px auto 0;
}

/* ========================================
   NAVIGATION
   ======================================== */

.navbar {
    z-index: 1050 !important;
    background: var(--white) !important;
    box-shadow: var(--box-shadow);
    height: var(--navbar-height);
}

.navbar-brand {
    font-weight: var(--font-weight-bold);
    font-size: 1.5rem;
}

.navbar-nav .nav-link {
    font-weight: var(--font-weight-medium);
    transition: var(--transition);
    padding: 0.5rem 1rem;
}

.navbar-nav .nav-link.active {
    color: var(--primary) !important;
    font-weight: var(--font-weight-semibold);
}

.navbar-nav .nav-link:hover {
    color: var(--primary) !important;
}

/* ========================================
   HERO SLIDER SYSTEM
   ======================================== */

.hero-slider {
    position: relative;
    height: 100vh;
    overflow: hidden;
    margin: 0;
    padding: 0;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.6s ease-in-out;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding-top: var(--navbar-height);
}

.hero-slide.active {
    opacity: 1;
    visibility: visible;
}

.hero-content {
    background: rgba(0, 0, 0, 0.5);
    padding: 3rem;
    border-radius: var(--border-radius-lg);
    backdrop-filter: blur(15px);
    border-left: 5px solid var(--primary);
    max-width: 750px;
    margin: 0;
    position: relative;
    z-index: 10;
}

.hero-slide h1 {
    color: var(--white) !important;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.9);
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.hero-slide h4 {
    color: var(--white) !important;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.8);
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: var(--font-weight-normal);
    background: rgba(220, 53, 69, 0.8);
    padding: 0.6rem 1.2rem;
    border-radius: 25px;
    display: inline-block;
    margin-bottom: 1rem;
}

.hero-slide p {
    color: rgba(255, 255, 255, 0.95) !important;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.8);
    line-height: 1.7;
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

/* Slider Navigation */
.hero-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.4);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    z-index: 1000;
    transition: var(--transition);
    opacity: 0.6;
    backdrop-filter: blur(8px);
}

.hero-nav:hover {
    background: var(--primary);
    color: var(--white);
    opacity: 1;
    transform: translateY(-50%) scale(1.1);
}

.prev-nav { left: 20px; }
.next-nav { right: 20px; }

/* Slider Indicators */
.hero-indicators {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.2);
    padding: 6px 12px;
    border-radius: 20px;
    opacity: 0.7;
    backdrop-filter: blur(8px);
}

.hero-indicators:hover { opacity: 1; }

.hero-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: var(--transition);
}

.hero-dot:hover,
.hero-dot.active {
    background: var(--white);
    transform: scale(1.3);
}

/* Key Features Badges */
.key-features {
    margin: 1.5rem 0;
}

.key-features .badge {
    font-size: 0.85rem;
    padding: 0.6rem 1.2rem;
    font-weight: var(--font-weight-medium);
    border-radius: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    margin: 0.3rem 0.2rem;
    display: inline-block;
}

/* ========================================
   BUTTONS
   ======================================== */

.btn {
    font-weight: var(--font-weight-semibold);
    transition: var(--transition);
    border-radius: var(--border-radius);
}

.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
    padding: 12px 30px;
}

.btn-primary:hover {
    background: #c82333;
    border-color: #bd2130;
    transform: translateY(-2px);
    box-shadow: var(--box-shadow-hover);
}

.btn-primary.btn-lg {
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.4);
    padding: 15px 35px;
}

.btn-outline-primary {
    color: var(--primary);
    border-color: var(--primary);
}

.btn-outline-primary:hover {
    background: var(--primary);
    border-color: var(--primary);
}

/* ========================================
   CARDS & COMPONENTS
   ======================================== */

.card {
    border: none;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--box-shadow-hover);
}

.card-img-top {
    transition: transform 0.3s ease;
}

.card:hover .card-img-top {
    transform: scale(1.05);
}

/* ========================================
   COMPACT SERVICE CARDS
   ======================================== */

/* Service Cards - Compact Version */
.service-highlight-card {
    min-height: 140px !important;  /* Reduced from 220px */
    max-height: 160px !important;  /* Add max height limit */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: var(--transition);
    border: 1px solid #f0f0f0;
    overflow: hidden;
}

.service-highlight-card .card-body {
    padding: 1.25rem !important;  /* Reduced padding */
    display: flex;
    align-items: center;
    height: 100%;
}

.service-highlight-card:hover {
    transform: translateY(-3px);  /* Reduced hover effect */
    box-shadow: 0 8px 20px rgba(0,0,0,0.12) !important;
}

/* Compact Service Icon */
.service-icon {
    flex-shrink: 0;
    width: 50px !important;         /* Reduced from 60px */
    height: 50px !important;        /* Reduced from 60px */
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(220, 53, 69, 0.1);
    border-radius: 10px;           /* Reduced border radius */
    margin-right: 1rem;
}

.service-icon i {
    font-size: 1.5rem !important;  /* Reduced icon size */
    color: var(--primary);
}

/* Compact Service Text */
.service-highlight-card .card-title {
    font-size: 1rem !important;    /* Reduced font size */
    font-weight: var(--font-weight-semibold);
    margin-bottom: 0.4rem !important;
    color: var(--dark);
    line-height: 1.3;
}

.service-highlight-card .card-text {
    font-size: 0.85rem !important; /* Reduced font size */
    line-height: 1.4 !important;
    color: #666;
    margin-bottom: 0;
    display: -webkit-box;         
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Service Content Container */
.service-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}


/* Application Cards */
.application-card {
    transition: var(--transition);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    background: var(--white);
    height: 100%;
    min-height: 240px;
}

.application-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--box-shadow-hover);
}

.application-icon {
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.application-card .card-title {
    font-weight: var(--font-weight-semibold);
    color: var(--dark);
    font-size: 1.1rem;
    line-height: 1.3;
}

.application-card .card-text {
    font-size: 0.95rem;
    line-height: 1.5;
    color: #666;
}

/* ========================================
   SECTIONS
   ======================================== */

/* Stats Section */
.stats-section {
    background: linear-gradient(135deg, var(--primary) 0%, #c82333 100%);
    color: var(--white);
    padding: 1rem 0;
}

.stat-item {
    text-align: center;
    padding: 2rem 1rem;
}

.stat-number {
    font-size: 3rem;
    font-weight: var(--font-weight-bold);
    display: block;
    margin-bottom: 0.5rem;
}

.stat-item p {
    font-size: 1.1rem;
    margin: 0;
    opacity: 0.9;
}

/* Industries Scroll */
.industries-scroll-container {
    position: relative;
    overflow: hidden;
    padding: 10px 0;
}

.industries-scroll-wrapper {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding-bottom: 10px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.industries-scroll-wrapper::-webkit-scrollbar {
    display: none;
}

.industry-card {
    flex: 0 0 220px;
    height: 180px;
}

/* ========================================
   FOOTER
   ======================================== */

.footer {
    background: linear-gradient(135deg, var(--secondary) 0%, #23272b 100%);
    color: var(--white);
    padding: 3rem 0 1rem;
}

.footer h5, .footer h6 {
    color: var(--white);
    margin-bottom: 1rem;
}

.footer .nav-link {
    color: #adb5bd !important;
    padding: 0.25rem 0;
    transition: var(--transition);
}

.footer .nav-link:hover {
    color: var(--white) !important;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    color: var(--white);
    border-radius: 50%;
    transition: var(--transition);
    text-decoration: none;
    margin-right: 0.5rem;
}

.social-links a:hover {
    background: var(--primary);
    transform: translateY(-2px);
}

/* ========================================
   UTILITY CLASSES
   ======================================== */

.text-white-75 {
    color: rgba(255, 255, 255, 0.75) !important;
}

.bg-gradient-primary {
    background: linear-gradient(135deg, var(--primary), #c82333) !important;
}

.shadow-lg {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15) !important;
}

/* Scroll Offset */
section[id] {
    scroll-margin-top: var(--navbar-height);
}

/* Loading Animation */
.loading-spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Flash Messages */
.flash-message {
    position: fixed;
    top: 100px;
    right: 20px;
    z-index: 9999;
    min-width: 300px;
    animation: slideInRight 0.5s ease;
}

@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Animation Classes */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 768px) {
    :root {
        --navbar-height: 70px;
    }
    
    .hero-slide {
        padding-top: var(--navbar-height);
    }
    
    .hero-content {
        padding: 2rem;
        margin: 1rem;
        max-width: 95%;
    }
    
    .display-3 {
        font-size: 2.2rem;
    }
    
    .hero-nav {
        display: none;
    }
    
    .key-features .badge {
        font-size: 0.75rem;
        padding: 0.4rem 0.8rem;
        margin: 0.2rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
    
    .navbar-brand {
        font-size: 1.2rem;
    }
    
    .industry-card {
        flex: 0 0 180px;
        height: 160px;
    }
    
    .application-card {
        min-height: 200px;
    }
    
    .service-highlight-card {
        min-height: 180px;
    }
}

@media (max-width: 576px) {
    .hero-content {
        padding: 1.5rem;
    }
    
    .display-3 {
        font-size: 1.8rem;
    }
    
    .lead {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
    
    /* .stats-section {
        padding: 2rem 0;
    } */
    
    .stat-item {
        padding: 1rem 0.5rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .industry-card {
        flex: 0 0 160px;
        height: 140px;
    }
}

/* ========================================
   ACCESSIBILITY & FOCUS STATES
   ======================================== */

.btn:focus,
.hero-dot:focus,
.hero-nav:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* ========================================
   PRINT STYLES
   ======================================== */

@media print {
    .hero-slider,
    .footer,
    .navbar,
    .hero-nav,
    .hero-indicators {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    h1, h2, h3 {
        page-break-after: avoid;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* Mobile Responsive for Service Cards */
@media (max-width: 768px) {
    .service-highlight-card {
        min-height: 120px !important;
        max-height: 140px !important;
    }
    
    .service-highlight-card .card-body {
        padding: 1rem !important;
    }
    
    .service-icon {
        width: 45px !important;
        height: 45px !important;
        margin-right: 0.75rem;
    }
    
    .service-icon i {
        font-size: 1.3rem !important;
    }
    
    .service-highlight-card .card-title {
        font-size: 0.95rem !important;
    }
    
    .service-highlight-card .card-text {
        font-size: 0.8rem !important;
    }
}

@media (max-width: 576px) {
    .service-highlight-card {
        min-height: 100px !important;
        max-height: 120px !important;
    }
    
    .service-highlight-card .card-body {
        padding: 0.875rem !important;
        flex-direction: column;
        text-align: center;
    }
    
    .service-icon {
        margin-right: 0;
        margin-bottom: 0.5rem;
    }
    
}

.navbar-brand img { max-height: 36px; max-width: 48px; }
.navbar-brand span { font-size: 1rem; white-space: nowrap; }

.navbar-toggler { margin-left: auto; }

@media (max-width: 375px) {
  .navbar { height: 56px; }
  .navbar-brand span { font-size: 0.96rem; }
  .navbar-brand img { max-height: 32px; }
}

@media (max-width: 360px) {
    .navbar-brand span { display: none; }
}

/* Product highlight banner – bright, modern look */
/* Shared gradient like 'Our Products' section */
#product-banner {
  background: linear-gradient(90deg, #f43f5e 0%, #ec4899 22%, #6366f1 55%, #0ea5e9 100%);
  color: #f9fafb;
}

/* Text hierarchy */
#product-banner h2 {
  color: #ffffff;
}

#product-banner h5,
#product-banner p {
  color: #e5e7eb;
}

/* Badges to show “new / unique” */
#product-banner .flag-badges {
  margin-bottom: 1rem;
}

#product-banner .flag-badges .badge {
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

#product-banner .badge-new {
  background: rgba(15,23,42,0.95);
  color: #f97316;
}

#product-banner .badge-unique {
  background: rgba(15,23,42,0.9);
  color: #e5e7eb;
  border: 1px solid rgba(248,250,252,0.18);
}

/* CTA button kept solid so it stands on gradient */
#product-banner #banner-cta.btn-primary {
  background: #111827;
  border-color: transparent;
  box-shadow: 0 14px 30px rgba(15,23,42,0.6);
}

#product-banner #banner-cta.btn-primary:hover {
  background: #020617;
  transform: translateY(-1px);
}
