/*
 * H M Pharma Machines — shared button and action layout system
 * Keeps the site's established orange, green, white and navy meanings while
 * making sizing, spacing, interaction and mobile behaviour consistent.
 */
:root {
  --hm-btn-orange: #f58220;
  --hm-btn-orange-hover: #d9680b;
  --hm-btn-green: #178f4d;
  --hm-btn-green-hover: #0f733c;
  --hm-btn-navy: #102a43;
  --hm-btn-navy-hover: #071b2b;
  --hm-btn-line: #cbd6df;
  --hm-btn-radius: 6px;
  --hm-btn-shadow: 0 8px 20px rgba(16, 42, 67, 0.14);
}

/* Main content buttons: one dependable size and typographic rhythm. */
.button,
.btn {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 160px;
  min-height: 48px;
  margin: 0;
  padding: 13px 20px;
  border: 1px solid transparent;
  border-radius: var(--hm-btn-radius);
  font: inherit;
  font-size: 0.94rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  white-space: normal;
  cursor: pointer;
  transition: background-color 180ms ease, border-color 180ms ease,
    color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
  -webkit-tap-highlight-color: transparent;
}

.button:hover,
.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--hm-btn-shadow);
  text-decoration: none;
}

.button:active,
.btn:active {
  transform: translateY(0);
  box-shadow: none;
}

.button:focus-visible,
.btn:focus-visible {
  outline: 3px solid rgba(245, 130, 32, 0.32);
  outline-offset: 3px;
}

/* Primary enquiry / product actions. */
.button-primary,
.button-orange,
.button.orange,
.button.primary,
.btn:not(.btn-light):not(.btn-outline) {
  border-color: var(--hm-btn-orange);
  background: var(--hm-btn-orange);
  color: #fff;
}

.button-primary:hover,
.button-orange:hover,
.button.orange:hover,
.button.primary:hover,
.btn:not(.btn-light):not(.btn-outline):hover {
  border-color: var(--hm-btn-orange-hover);
  background: var(--hm-btn-orange-hover);
  color: #fff;
}

/* WhatsApp / direct-response actions. */
.button-green,
.button.green,
.button.whatsapp {
  border-color: var(--hm-btn-green);
  background: var(--hm-btn-green);
  color: #fff;
}

.button-green:hover,
.button.green:hover,
.button.whatsapp:hover {
  border-color: var(--hm-btn-green-hover);
  background: var(--hm-btn-green-hover);
  color: #fff;
}

/* Secondary actions remain clear on dark and light sections. */
.button-outline,
.button-white,
.button-light,
.button.white,
.btn-light,
.btn-outline {
  border-color: var(--hm-btn-line);
  background: #fff;
  color: var(--hm-btn-navy);
}

.button-outline:hover,
.button-white:hover,
.button-light:hover,
.button.white:hover,
.btn-light:hover,
.btn-outline:hover {
  border-color: var(--hm-btn-orange);
  background: #fff8f1;
  color: #a84400;
}

.button.video-button {
  border-color: var(--hm-btn-navy);
  background: var(--hm-btn-navy);
  color: #fff;
}

.button.video-button:hover {
  border-color: var(--hm-btn-navy-hover);
  background: var(--hm-btn-navy-hover);
  color: #fff;
}

/* CTA bands intentionally use a white button, with the same shared geometry. */
.quote-band .button,
.cta-band .button {
  border-color: #fff;
  background: #fff;
  color: #a84400;
}

.quote-band .button:hover,
.cta-band .button:hover {
  border-color: #fff;
  background: #fff8f1;
  color: #7d3100;
}

/* Every button group follows the same wrapping, gap and alignment rules. */
.actions,
.hero-actions,
.card-actions,
.contact-actions,
.watch-actions,
.detail-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.actions,
.hero-actions {
  margin-top: 24px;
}

.card-actions .button,
.contact-actions .button,
.watch-actions .button,
.detail-actions .button,
.detail-actions .btn {
  flex: 1 1 160px;
}

.product-catalogue-action {
  display: flex;
  justify-content: center;
  margin-top: 28px;
}

.gallery-home-head > .button,
.blog-preview-head > .button {
  flex: 0 0 auto;
}

.button[disabled],
.btn[disabled],
.button[aria-disabled="true"],
.btn[aria-disabled="true"] {
  opacity: 0.58;
  pointer-events: none;
}

/* Header quote action stays consistent without inheriting large content buttons. */
.nav-cta {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 15px !important;
  border: 1px solid var(--hm-btn-orange) !important;
  border-radius: var(--hm-btn-radius) !important;
  background: var(--hm-btn-orange) !important;
  color: #fff !important;
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.15;
  text-align: center;
  text-decoration: none;
  transition: background-color 180ms ease, border-color 180ms ease,
    box-shadow 180ms ease, transform 180ms ease;
}

.nav-cta:hover {
  border-color: var(--hm-btn-orange-hover) !important;
  background: var(--hm-btn-orange-hover) !important;
  color: #fff !important;
  box-shadow: 0 7px 16px rgba(16, 42, 67, 0.15);
  transform: translateY(-1px);
}

@media (prefers-reduced-motion: reduce) {
  .button,
  .btn {
    transition: none;
  }
}

@media (max-width: 720px) {
  .nav-cta {
    width: 100%;
    margin: 6px 0 0 !important;
  }

  .actions,
  .hero-actions,
  .card-actions,
  .contact-actions,
  .watch-actions,
  .detail-actions {
    align-items: stretch;
    width: 100%;
  }

  .actions > .button,
  .actions > .btn,
  .hero-actions > .button,
  .hero-actions > .btn,
  .card-actions > .button,
  .card-actions > .btn,
  .contact-actions > .button,
  .contact-actions > .btn,
  .watch-actions > .button,
  .watch-actions > .btn,
  .detail-actions > .button,
  .detail-actions > .btn,
  .quote-wrap > .button,
  .cta-wrap > .button,
  .product-catalogue-action > .button,
  .gallery-home-head > .button,
  .blog-preview-head > .button {
    width: 100%;
    max-width: none;
  }

  .gallery-home-head > .button,
  .blog-preview-head > .button,
  .quote-wrap > .button,
  .cta-wrap > .button {
    margin-top: 18px;
  }
}
