/* ==========================================================================
   WILLIAM KERR (TRACTORS) LTD - UI COMPONENTS STYLESHEET
   Reusable components, buttons, cards, widgets, and form styling
   ========================================================================== */

/* Button Components */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 0.85rem 1.75rem;
  background-color: var(--color-forest);
  color: #FFFFFF;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 9999px;
  transition: all 0.25s ease;
  box-shadow: 0 4px 14px rgba(27, 67, 50, 0.25);
  cursor: pointer;
  border: 1px solid transparent;
}

.btn-primary:hover {
  background-color: var(--color-emerald);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(27, 67, 50, 0.35);
  color: #FFFFFF;
}

.btn-primary .btn-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.2);
  transition: transform 0.25s ease;
}

.btn-primary:hover .btn-arrow {
  transform: translateX(3px);
  background-color: var(--color-light-green);
  color: var(--color-forest);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.65rem;
  background-color: transparent;
  color: var(--color-navy);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 9999px;
  border: 1.5px solid #cbd5e1;
  transition: all 0.25s ease;
  cursor: pointer;
}

.btn-secondary:hover {
  border-color: var(--color-forest);
  background-color: #f8fafc;
  color: var(--color-forest);
  transform: translateY(-2px);
}

.btn-quote-header {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.35rem;
  background-color: #1b4332;
  color: #FFFFFF;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: 9999px;
  transition: all 0.25s ease;
}

.btn-quote-header:hover {
  background-color: #2d6a4f;
  transform: translateY(-1px);
  color: #FFFFFF;
}

/* Service Card Components (Dark & Light Styles) */
.service-card {
  position: relative;
  background: #FFFFFF;
  border-radius: 1.25rem;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 35px -10px rgba(16, 28, 44, 0.12);
  border-color: var(--color-light-green);
}

.service-card-image-wrap {
  position: relative;
  height: 220px;
  overflow: hidden;
  background: #f1f5f9;
}

.service-card-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.service-card:hover .service-card-image-wrap img {
  transform: scale(1.06);
}

.service-card-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: rgba(16, 28, 44, 0.85);
  backdrop-filter: blur(8px);
  color: #FFFFFF;
  padding: 0.35rem 0.8rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Dark Service Card for Dark Sections */
.service-card-dark {
  background: #18283b;
  border-radius: 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
  transition: all 0.35s ease;
  display: flex;
  flex-direction: column;
}

.service-card-dark:hover {
  transform: translateY(-6px);
  border-color: var(--color-light-green);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
}

.service-card-dark .card-content {
  padding: 1.75rem;
}

.service-card-dark h3 {
  color: #FFFFFF;
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.service-card-dark p {
  color: #94a3b8;
  font-size: 0.925rem;
  line-height: 1.6;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--color-light-green);
  transition: all 0.2s ease;
  margin-top: auto;
  padding-top: 1rem;
}

.link-arrow:hover {
  color: #FFFFFF;
  gap: 0.65rem;
}

/* Machinery Spec Cards */
.machinery-card {
  background: #FFFFFF;
  border-radius: 1rem;
  border: 1px solid #e2e8f0;
  overflow: hidden;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.machinery-card:hover {
  border-color: #2d6a4f;
  transform: translateY(-5px);
  box-shadow: 0 15px 30px -5px rgba(16, 28, 44, 0.1);
}

.machinery-card-media {
  position: relative;
  height: 230px;
  background-color: #f8fafc;
  overflow: hidden;
}

.machinery-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.machinery-card:hover .machinery-card-media img {
  transform: scale(1.05);
}

.machinery-tag {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: var(--color-emerald);
  color: #FFFFFF;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: 0.5rem;
  letter-spacing: 0.05em;
}

.machinery-status-used {
  background: #d97706;
}

.machinery-specs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  padding: 0.85rem;
  background: #f8fafc;
  border-radius: 0.75rem;
  margin: 1rem 0;
  font-size: 0.825rem;
}

.machinery-spec-item span:first-child {
  display: block;
  color: #64748b;
  font-size: 0.725rem;
  text-transform: uppercase;
  font-weight: 600;
}

.machinery-spec-item span:last-child {
  font-weight: 700;
  color: var(--color-navy);
}

/* Metric Stats Counter */
.stat-box {
  position: relative;
  padding: 1.5rem 1rem;
  text-align: center;
}

.stat-number {
  font-family: var(--font-heading);
  font-size: 3rem;
  font-weight: 800;
  color: var(--color-navy);
  line-height: 1;
  display: inline-flex;
  align-items: baseline;
}

.stat-number-accent {
  color: var(--color-emerald);
  font-size: 2.25rem;
  margin-left: 2px;
}

.stat-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: #64748b;
  margin-top: 0.5rem;
}

/* Feature Grid Cards */
.feature-box {
  background: #FFFFFF;
  border-radius: 1rem;
  padding: 2rem 1.75rem;
  border: 1px solid #e2e8f0;
  transition: all 0.3s ease;
}

.feature-box:hover {
  border-color: var(--color-light-green);
  box-shadow: 0 15px 30px -8px rgba(16, 28, 44, 0.08);
  transform: translateY(-4px);
}

.feature-icon-circle {
  width: 54px;
  height: 54px;
  border-radius: 1rem;
  background: #eaf5ee;
  color: var(--color-forest);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  margin-bottom: 1.25rem;
  transition: all 0.3s ease;
}

.feature-box:hover .feature-icon-circle {
  background: var(--color-forest);
  color: #FFFFFF;
}

/* Form Styling */
.form-control {
  width: 100%;
  padding: 0.85rem 1.15rem;
  border-radius: 0.75rem;
  border: 1.5px solid #cbd5e1;
  background-color: #FFFFFF;
  color: var(--color-navy);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: all 0.25s ease;
  outline: none;
}

.form-control:focus {
  border-color: var(--color-emerald);
  box-shadow: 0 0 0 3px rgba(45, 106, 79, 0.15);
}

.form-control.is-invalid {
  border-color: #ef4444;
  background-color: #fef2f2;
}

.error-feedback {
  color: #dc2626;
  font-size: 0.8rem;
  margin-top: 0.3rem;
  display: none;
}

.form-control.is-invalid + .error-feedback {
  display: block;
}

/* Breadcrumbs */
.breadcrumb-nav {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.875rem;
  color: #64748b;
  margin-bottom: 1.25rem;
}

.breadcrumb-nav a {
  color: #64748b;
  transition: color 0.2s ease;
}

.breadcrumb-nav a:hover {
  color: var(--color-forest);
}

.breadcrumb-separator {
  color: #94a3b8;
  font-size: 0.75rem;
}

.breadcrumb-current {
  color: var(--color-forest);
  font-weight: 600;
}

/* Modal Feedback */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(16, 28, 44, 0.75);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1.5rem;
}

.modal-overlay.is-active {
  display: flex;
  animation: fadeIn 0.25s ease forwards;
}

.modal-content {
  background: #FFFFFF;
  border-radius: 1.25rem;
  max-width: 520px;
  width: 100%;
  padding: 2.25rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  text-align: center;
  position: relative;
  transform: translateY(20px);
  animation: slideUp 0.3s ease forwards;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { transform: translateY(20px); }
  to { transform: translateY(0); }
}

