/* ============================================
   GBMM — Industrial Machinery Web Template
   Custom Styles (Bootstrap 5.3 companion)
   ============================================ */

.offcanvas {
  background: var(--clr-primary-dark);
  color: #fff;
  width: 280px !important;
}

.offcanvas .btn-close {
  filter: invert(1);
}

.form-control-lg {
  font-size: 1rem;
  padding-top: 0.6875rem;
  padding-bottom: 0.6875rem;
}

/* ---------- CSS Custom Properties ---------- */
:root {
  /* Brand palette */
  --clr-primary:      #1B5E20;     /* Dark green */
  --clr-primary-dark:  #0D3B12;
  --clr-primary-light: #2E7D32;
  --clr-cta:           #D32F2F;    /* Red CTA */
  --clr-cta-hover:     #B71C1C;
  --clr-cta-soft:      rgba(211, 47, 47, .35);
  --clr-primary-soft:  rgba(27, 94, 32, .10);
  --clr-dark:          #1A1A1A;
  --clr-body:          #333;
  --clr-muted:         #6c757d;
  --clr-light-bg:      #F5F7F6;
  --clr-white:         #ffffff;

  /* Typography */
  --ff-body: 'Inter', system-ui, -apple-system, sans-serif;

  /* Spacing */
  --section-py: 6rem;

  /* Transitions */
  --transition: .3s cubic-bezier(.4, 0, .2, 1);
}

/* ---------- Global Resets ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

html,
body {
  overflow-x: hidden;
}

body {
  font-family: var(--ff-body);
  color: var(--clr-body);
}

img { max-width: 100%; height: auto; }

/* ---------- Utility classes ---------- */
.fw-600  { font-weight: 600 !important; }
.fw-700  { font-weight: 700 !important; }
.fw-800  { font-weight: 800 !important; }
.fw-900  { font-weight: 900 !important; }
.fs-7    { font-size: .85rem !important; }
.z-2     { z-index: 2; }

.text-primary  { color: var(--clr-primary) !important; }
.text-cta      { color: var(--clr-cta) !important; }
.text-white-75 { color: rgba(255, 255, 255, .75); }
.text-white-50 { color: rgba(255, 255, 255, .50); }

.bg-primary-soft { background-color: var(--clr-primary-soft) !important; }
.bg-cta-soft     { background-color: var(--clr-cta-soft) !important; }

.section-padding {
  padding-top: var(--section-py);
  padding-bottom: var(--section-py);
}

/* ---------- NAVBAR ---------- */
.navbar {
  padding: .75rem 0;
  transition: background var(--transition), box-shadow var(--transition), padding var(--transition);
  background: transparent;
}

.navbar.scrolled {
  background: var(--clr-primary-dark) !important;
  box-shadow: 0 2px 20px rgba(0, 0, 0, .15);
  padding: .5rem 0;
}

.navbar-brand {
  font-size: 1.6rem;
  letter-spacing: -.5px;
  max-width: 200px;
  overflow: hidden;
  height: 70px;
  padding-top: 0;
  padding-bottom: 0;
  margin-top: 0.3125rem;
  margin-bottom: 0.3125rem;
}

.navbar-brand img {
  height: 100%;
  width: 100%;
  object-fit: contain;
}

.footer-logo {
  max-width: 200px;
  overflow: hidden;
  height: 100px;
  padding-top: 0;
  padding-bottom: 0;
  margin-top: 0.3125rem;
  margin-bottom: 0.3125rem;
}

.footer-logo img {
  height: 100%;
  width: 100%;
  object-fit: contain;
}

.nav-link {
  color: rgba(255, 255, 255, .8) !important;
  font-weight: 500;
  font-size: 1rem;
  padding: .5rem 1rem !important;
  transition: color var(--transition);
}

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

/* ---------- CTA Button ---------- */
.btn-cta {
  background: var(--clr-cta);
  color: var(--clr-white);
  border: none;
  font-weight: 600;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-cta:hover,
.btn-cta:focus {
  background: var(--clr-cta-hover);
  color: var(--clr-white);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(211, 47, 47, .35);
}

.btn-cta:active {
  transform: translateY(0);
}

/* ---------- HERO ---------- */
.hero-section {
  position: relative;
  min-height: 100vh;
  background:
    url('https://images.unsplash.com/photo-1581092160607-ee22621dd758?w=1600&q=80') center center / cover no-repeat;
  background-attachment: scroll;
}

@media (min-width: 992px) {
  .hero-section {
    background-attachment: fixed;
  }
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(13, 59, 18, .92) 0%,
    rgba(27, 94, 32, .80) 50%,
    rgba(13, 59, 18, .88) 100%
  );
  z-index: 1;
}

.hero-title {
  text-shadow: 0 2px 10px rgba(0, 0, 0, .2);
}

/* ---------- SERVICE CARDS ---------- */
.service-card {
  background: var(--clr-white);
  box-shadow: 0 2px 12px rgba(0, 0, 0, .06);
  transition: transform var(--transition), box-shadow var(--transition);
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, .10);
}

.service-icon {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: var(--clr-primary-soft);
  font-size: 1.6rem;
  color: var(--clr-primary);
  transition: background var(--transition), color var(--transition);
}

.service-card:hover .service-icon {
  background: var(--clr-primary);
  color: var(--clr-white);
}

/* ---------- ABOUT IMAGE ---------- */
.about-image-wrapper {
  position: relative;
}

.about-image-wrapper::after {
  content: '';
  position: absolute;
  bottom: -12px;
  right: -12px;
  width: 50%;
  height: 50%;
  border: 4px solid var(--clr-primary);
  border-radius: 1rem;
  z-index: -1;
}

/* ---------- FLEET STATS ---------- */
.fleet-stat {
  background: var(--clr-primary-soft);
  transition: background var(--transition), transform var(--transition);
}

.fleet-stat:hover {
  background: var(--clr-primary);
  transform: translateY(-3px);
}

.fleet-stat:hover * {
  color: var(--clr-white) !important;
}

/* ---------- CTA BANNER ---------- */
.cta-banner {
  background: linear-gradient(135deg, var(--clr-primary-dark) 0%, var(--clr-primary) 100%);
  position: relative;
  overflow: hidden;
}

.cta-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .04);
}

.cta-banner::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: 5%;
  width: 250px;
  height: 250px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .03);
}

/* ---------- CONTACT ---------- */
.contact-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--clr-primary-soft);
  color: var(--clr-primary);
  font-size: 1.2rem;
}

.form-control,
.form-select {
  border: 1px solid #dee2e6;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-control:focus,
.form-select:focus {
  border-color: var(--clr-primary);
  box-shadow: 0 0 0 .2rem var(--clr-primary-soft);
}

/* ---------- FOOTER ---------- */
.site-footer {
  background: var(--clr-dark);
}

.footer-links li {
  margin-bottom: .5rem;
}

.footer-links a {
  color: rgba(255, 255, 255, .55);
  text-decoration: none;
  transition: color var(--transition), padding-left var(--transition);
  font-size: .9rem;
}

.footer-links a:hover {
  color: var(--clr-cta);
  padding-left: 4px;
}

.footer-links span {
  color: rgba(255, 255, 255, .55);
  font-size: .9rem;
}

.footer-social {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(255, 255, 255, .08);
  color: rgba(255, 255, 255, .65);
  font-size: 1.1rem;
  text-decoration: none;
  transition: background var(--transition), color var(--transition), transform var(--transition);
}

.footer-social:hover {
  background: var(--clr-cta);
  color: var(--clr-white);
  transform: translateY(-3px);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, .08);
}

/* ---------- BACK TO TOP ---------- */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--clr-primary);
  color: var(--clr-white);
  text-decoration: none;
  font-size: 1.2rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: opacity var(--transition), visibility var(--transition), transform var(--transition), background var(--transition);
  z-index: 999;
  box-shadow: 0 4px 15px rgba(27, 94, 32, .3);
}

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

.back-to-top:hover {
  background: var(--clr-cta);
  color: var(--clr-white);
}

/* ---------- BACKGROUND HELPERS ---------- */
.bg-light {
  background-color: var(--clr-light-bg) !important;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 991.98px) {
  :root {
    --section-py: 4rem;
  }

  .hero-title {
    font-size: 2.4rem;
  }

  .navbar-collapse {
    background: var(--clr-primary-dark);
    margin-top: .75rem;
    border-radius: .75rem;
    padding: 1rem;
  }

  .about-image-wrapper::after {
    display: none;
  }
}

@media (max-width: 575.98px) {
  .hero-title {
    font-size: 2rem;
  }

  .display-5 {
    font-size: 1.8rem;
  }
}

/* ---------- Selection Color ---------- */
::selection {
  background: var(--clr-primary);
  color: var(--clr-white);
}

/* ---------- Scrollbar (webkit) ---------- */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

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

.text-overflow-ellipsis {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--clr-primary-dark);
}
