/* Define Custom Properties (CSS Variables) */
:root {
  --primary-color: #0d47a1;
  /* Deep Professional Blue */
  --primary-dark: #002171;
  --primary-light: #5472d3;
  --secondary-color: #ffffff;
  --accent-color: #ffca28;
  /* Vibrant Accent Yellow */
  --accent-dark: #c59700;
  --accent-light: #ffd54f;

  --bg-white: #FFFFFF;
  --bg-light: #f4f7fb;
  --bg-gray: #e9ecef;

  --text-dark: #121a2f;
  --text-muted: #5e6b7e;
  --heading-dark: #091326;

  --border-radius-sm: 6px;
  --border-radius-md: 12px;
  --border-radius-lg: 20px;

  --shadow-sm: 0 4px 10px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 10px 25px rgba(0, 33, 113, 0.1);
  --shadow-lg: 0 15px 35px rgba(0, 33, 113, 0.15);
  --shadow-hover: 0 15px 40px rgba(0, 33, 113, 0.2);

  --transition: all 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
  --transition-fast: all 0.2s ease-in-out;
}

/* Global Styles */
body {
  font-family: 'Inter', sans-serif;
  color: var(--text-dark);
  background-color: var(--bg-white);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  color: var(--heading-dark);
}

a {
  text-decoration: none;
  transition: var(--transition);
}

/* Custom Utilities */
.text-primary-custom {
  color: var(--primary-color) !important;
}

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

.text-heading-dark {
  color: var(--heading-dark) !important;
}

.bg-primary-custom {
  background-color: var(--primary-color) !important;
}

.bg-secondary-custom {
  background-color: var(--secondary-color) !important;
}

.bg-light-custom {
  background-color: var(--bg-light) !important;
}

.bg-dark-custom {
  background-color: var(--heading-dark) !important;
}

/* Animation Overlay Utilities */
.fade-in-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in-up.active {
  opacity: 1;
  transform: translateY(0);
}

/* Primary Button */
.btn-primary-custom {
  background-color: var(--primary-color);
  border: 1px solid var(--primary-color);
  color: var(--secondary-color);
  font-weight: 600;
  padding: 0.75rem 1.75rem;
  border-radius: var(--border-radius-sm);
  transition: var(--transition);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-primary-custom:hover {
  background-color: var(--primary-dark);
  border-color: var(--primary-dark);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(13, 71, 161, 0.3);
}

/* Accent Button */
.btn-accent-custom {
  background-color: var(--accent-color);
  border: 1px solid var(--accent-color);
  color: var(--heading-dark);
  font-weight: 600;
  padding: 0.75rem 1.75rem;
  border-radius: var(--border-radius-sm);
  transition: var(--transition);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-accent-custom:hover {
  background-color: var(--accent-dark);
  border-color: var(--accent-dark);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(255, 202, 40, 0.4);
}

/* Outline Secondary Button */
.btn-outline-secondary-custom {
  background-color: transparent;
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
  font-weight: 600;
  padding: 0.75rem 1.75rem;
  border-radius: var(--border-radius-sm);
  transition: var(--transition);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-outline-secondary-custom:hover {
  background-color: var(--primary-color);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(13, 71, 161, 0.2);
}

/* SJ Logo Monogram */
.sj-monogram {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-color);
  color: #fff !important;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 1.6rem;
  position: relative;
  border: 2px solid var(--accent-color);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  letter-spacing: -1px;
}

.sj-monogram::after {
  content: '';
  position: absolute;
  top: -4px;
  right: -4px;
  bottom: -4px;
  left: -4px;
  border: 1px dashed rgba(255, 202, 40, 0.6);
  border-radius: 14px;
}

/* Navbar styles */
.navbar {
  padding: 1.25rem 0;
  transition: var(--transition);
  background-color: transparent;
  box-shadow: none;
}

.navbar.scrolled {
  padding: 0.5rem 0;
  box-shadow: var(--shadow-md);
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
}

.navbar-brand {
  font-family: 'Outfit', sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff !important;
  display: flex;
  align-items: center;
  gap: 15px;
}

.brand-text-container {
  font-size: 0.95rem;
  white-space: normal;
  max-width: 60vw;
}

.brand-subtext {
  font-size: 0.75rem;
}

.navbar .text-heading-dark {
  color: #ffffff !important;
  transition: var(--transition-fast);
}

.navbar .text-muted {
  color: rgba(255, 255, 255, 0.7) !important;
  transition: var(--transition-fast);
}

.nav-link {
  font-weight: 600;
  color: #fff !important;
  margin: 0 0.5rem;
  position: relative;
  font-size: 1rem;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 3px;
  background-color: var(--accent-color);
  transition: var(--transition-fast);
  border-radius: 2px;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-link:hover,
.nav-link.active {
  color: var(--accent-light) !important;
}

/* Scrolled Navbar Overrides */
.navbar.scrolled .navbar-brand {
  color: var(--heading-dark) !important;
}

.navbar.scrolled .text-heading-dark {
  color: var(--heading-dark) !important;
}

.navbar.scrolled .text-muted {
  color: var(--text-muted) !important;
}

.navbar.scrolled .nav-link {
  color: var(--text-dark) !important;
}

.navbar.scrolled .nav-link:hover,
.navbar.scrolled .nav-link.active {
  color: var(--primary-color) !important;
}

/* Hero Section */
.hero-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: url('../images/hero.png') center/cover no-repeat fixed;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(9, 19, 38, 0.95) 0%, rgba(13, 71, 161, 0.75) 100%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  color: #fff;
  max-width: 800px;
  padding-top: 80px;
}

.hero-content h1 {
  color: #fff;
  font-size: 4rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1.5rem;
  text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3);
}

.hero-content h1 .highlight-text {
  color: var(--accent-color);
}

.hero-content p {
  font-size: 1.25rem;
  margin-bottom: 2.5rem;
  opacity: 0.95;
  font-weight: 400;
  max-width: 650px;
}

.hero-stats {
  display: flex;
  gap: 2rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-item h4 {
  color: var(--accent-color);
  font-size: 2rem;
  margin-bottom: 0.25rem;
}

.stat-item p {
  font-size: 0.95rem;
  margin-bottom: 0;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Section Styling */
.section-padding {
  padding: 6rem 0;
}

.section-title {
  font-size: 2.5rem;
  margin-bottom: 3rem;
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -15px;
  left: 0;
  width: 60px;
  height: 5px;
  background-color: var(--accent-color);
  border-radius: 5px;
}

.text-center .section-title::after {
  left: 50%;
  transform: translateX(-50%);
}

/* Feature Cards (Why Choose Us) - Premium style */
.feature-card {
  background: var(--bg-white);
  padding: 2.5rem 2rem;
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-sm);
  text-align: center;
  transition: var(--transition);
  height: 100%;
  border: 1px solid rgba(0, 0, 0, 0.03);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 0;
  background-color: var(--primary-color);
  transition: var(--transition);
  z-index: -1;
}

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

.feature-card:hover::before {
  height: 10px;
}

.feature-icon-wrapper {
  width: 75px;
  height: 75px;
  background-color: var(--bg-light);
  color: var(--primary-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.25rem;
  margin: 0 auto 1.5rem;
  transition: var(--transition);
  border: 2px solid transparent;
}

.feature-card:hover .feature-icon-wrapper {
  background-color: var(--accent-color);
  color: var(--heading-dark);
  transform: scale(1.1) rotate(5deg);
  border-color: var(--accent-light);
}

/* Filter Buttons */
.filter-btn {
  background-color: var(--bg-white);
  color: var(--text-muted);
  border: 2px solid var(--bg-gray);
  padding: 0.5rem 1.5rem;
  border-radius: 30px;
  font-weight: 500;
  margin: 0.25rem;
  transition: var(--transition-fast);
}

.filter-btn:hover,
.filter-btn.active {
  background-color: var(--primary-color);
  color: var(--secondary-color);
  border-color: var(--primary-color);
  box-shadow: var(--shadow-sm);
}

/* Equipment Grid & Cards */
.equipment-grid {
  margin-top: 2rem;
}

.machine-card {
  background: var(--bg-white);
  border-radius: var(--border-radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  height: 100%;
  border: 1px solid rgba(0, 0, 0, 0.03);
  display: flex;
  flex-direction: column;
}

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

.machine-img-wrapper {
  height: 250px;
  overflow: hidden;
  position: relative;
  background-color: #f8f9fa;
  display: flex;
  align-items: center;
  justify-content: center;
}

.machine-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.machine-card:hover .machine-img-wrapper img {
  transform: scale(1.1);
}

.machine-badge {
  position: absolute;
  top: 15px;
  left: 15px;
  background-color: var(--accent-color);
  color: var(--heading-dark);
  padding: 5px 15px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  z-index: 2;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.machine-details {
  padding: 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.machine-details h4 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.machine-details p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.machine-actions {
  display: flex;
  gap: 10px;
}

.machine-actions .btn {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  flex: 1;
}

/* Contact/Enquiry Form */
.contact-card {
  background-color: var(--bg-white);
  padding: 3.5rem 3rem;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-lg);
  border-top: 5px solid var(--primary-color);
}

.form-control,
.form-select {
  padding: 0.85rem 1.25rem;
  border: 1px solid #dee2e6;
  border-radius: var(--border-radius-sm);
  background-color: var(--bg-light);
  transition: var(--transition-fast);
}

.form-control:focus,
.form-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.25rem rgba(13, 71, 161, 0.15);
  background-color: var(--bg-white);
}

.form-label {
  font-weight: 500;
  color: var(--heading-dark);
}

.contact-info-item {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  margin-bottom: 1rem;
  padding: 1rem 1.25rem;
  background: var(--bg-white);
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.contact-info-item:hover {
  transform: translateX(10px);
  box-shadow: var(--shadow-md);
}

.contact-info-icon {
  width: 60px;
  height: 60px;
  background-color: var(--bg-light);
  color: var(--primary-color);
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  flex-shrink: 0;
}

.contact-info-content h5 {
  margin-bottom: 0.35rem;
  font-size: 1.15rem;
}

/* Footer */
footer {
  background-color: var(--heading-dark);
  color: rgba(255, 255, 255, 0.7);
  padding: 5rem 0 0;
}

footer h5 {
  color: #fff;
  margin-bottom: 1.75rem;
  font-size: 1.2rem;
  position: relative;
  padding-bottom: 0.5rem;
}

footer h5::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 3px;
  background-color: var(--accent-color);
  border-radius: 2px;
}

footer a {
  color: rgba(255, 255, 255, 0.7);
  transition: var(--transition-fast);
}

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

.footer-bottom {
  background-color: rgba(0, 0, 0, 0.4);
  padding: 1.75rem 0;
  margin-top: 4rem;
  text-align: center;
  font-size: 0.95rem;
}

/* WhatsApp Float */
.whatsapp-float {
  position: fixed;
  width: 65px;
  height: 65px;
  bottom: 30px;
  right: 30px;
  background-color: #25d366;
  color: #FFF !important;
  border-radius: 50px;
  text-align: center;
  font-size: 35px;
  box-shadow: 0 5px 20px rgba(37, 211, 102, 0.5);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.whatsapp-float:hover {
  background-color: #1ebe56;
  transform: scale(1.1) translateY(-5px);
  box-shadow: 0 8px 25px rgba(37, 211, 102, 0.6);
}

/* Back to Top */
.back-to-top {
  position: fixed;
  bottom: 30px;
  left: 30px;
  width: 50px;
  height: 50px;
  background-color: var(--primary-color);
  color: #fff;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  border: none;
  box-shadow: 0 5px 15px rgba(13, 71, 161, 0.3);
}

.back-to-top.active {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background-color: var(--primary-dark);
  transform: translateY(-5px);
  color: #fff;
}

/* Responsive adjustments */
@media (max-width: 992px) {
  .hero-content h1 {
    font-size: 3rem;
  }

  .section-title {
    font-size: 2rem;
  }

  .navbar {
    background-color: var(--bg-white);
    box-shadow: var(--shadow-sm);
    padding: 0.5rem 0;
  }

  .navbar .nav-link {
    color: var(--text-dark) !important;
  }

  .navbar .nav-link:hover,
  .navbar .nav-link.active {
    color: var(--primary-color) !important;
  }

  .navbar-toggler {
    border: none !important;
    color: var(--primary-color) !important;
    font-size: 1.5rem;
  }

  .navbar-toggler:focus {
    box-shadow: none;
  }

  .brand-text-container {
    font-size: 0.8rem;
    max-width: 220px;
    line-height: 1.3;
  }

  .brand-subtext {
    font-size: 0.65rem;
  }
}

@media (max-width: 768px) {
  .hero-content {
    padding-top: 100px;
    text-align: center;
  }

  .hero-content h1 {
    font-size: 2.25rem;
  }

  .hero-content p {
    font-size: 1.1rem;
  }

  .hero-stats {
    flex-direction: column;
    gap: 1rem;
  }

  .section-padding {
    padding: 4rem 0;
  }
}

/* Modal Customization */
.modal-content {
  border-radius: var(--border-radius-lg);
  border: none;
  box-shadow: var(--shadow-lg);
}

.modal-header {
  border-bottom: 1px solid var(--bg-gray);
  padding: 1.5rem;
}

.modal-body {
  padding: 2rem;
}

.modal-footer {
  border-top: 1px solid var(--bg-gray);
  padding: 1.5rem;
}

.modal-img-preview {
  width: 100%;
  height: auto;
  border-radius: var(--border-radius-md);
  margin-bottom: 1.5rem;
}

/* New styles for inline equipment grid expansion */
#equipmentInlineContainer {
  transition: all 0.4s ease-in-out;
  border-color: rgba(13, 71, 161, 0.1) !important;
}

.machine-list-card {
  transition: all 0.3s ease;
  border: 1px solid rgba(0, 0, 0, 0.05) !important;
}

.machine-list-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 33, 113, 0.08);
  border-color: rgba(13, 71, 161, 0.3) !important;
}

.category-view-btn {
  border-radius: 8px;
  padding: 0.8rem 1rem;
  font-size: 0.95rem;
}

/* Category Image Hover */
.feature-card .category-img img {
  transition: transform 0.6s ease;
}

.feature-card:hover .category-img img {
  transform: scale(1.08);
}