/**
 * Workspace Cards Widget Styles
 *
 * "Find Your Perfect Workspace" — dark section with a 2x2 (configurable) grid
 * of image-backed workspace cards. Each card has a bottom-anchored content
 * block (icon badge + title + caption + CTA) on top of a dark gradient that
 * keeps the text readable over any photo.
 *
 * @package BongoHive
 */

.bh-workspace-cards {
  --bh-wc-font-heading: "Ubuntu", "PT Sans", Arial, sans-serif;
  --bh-wc-font-body: "Ubuntu", "Noto Sans", Arial, sans-serif;
  --bh-wc-white: #ffffff;
  --bh-wc-muted: #f2f2f2;
  --bh-wc-gold-light: #f4c765;
  --bh-wc-gold: #f0af24;
  --bh-wc-gold-dark: #c08c1c;
  --bh-wc-shark: #1d2229;

  background-color: var(--bh-wc-shark);
  color: var(--bh-wc-white);
  display: flex;
  flex-direction: column;
  gap: 64px;
  padding: 80px 24px;
  width: 100%;
}

/* ==========================================================================
   Section header
   ========================================================================== */

.bh-workspace-cards__header {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 0 auto;
  max-width: 720px;
  text-align: center;
}

.bh-workspace-cards__heading {
  color: var(--bh-wc-white);
  font-family: var(--bh-wc-font-heading);
  font-size: clamp(28px, 2.5vw + 14px, 44px);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.2;
  margin: 0;
}

.bh-workspace-cards__subheading {
  color: var(--bh-wc-muted);
  font-family: var(--bh-wc-font-body);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  margin: 0;
}

/* ==========================================================================
   Grid
   ========================================================================== */

.bh-workspace-cards__grid {
  display: grid;
  gap: 28px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 100%;
}

.bh-workspace-cards__card {
  background-color: var(--bh-wc-shark);
  border-radius: 4px;
  height: 500px;
  overflow: hidden;
  position: relative;
  transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.bh-workspace-cards__card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.09);
}

.bh-workspace-cards__image {
  display: block;
  height: 100%;
  inset: 0;
  object-fit: cover;
  object-position: center;
  position: absolute;
  width: 100%;
}

/* The inner block holds the bottom-anchored content and the gradient wash.
   --bh-wc-overlay is exposed so the Elementor "Overlay Color" control can
   tweak the wash without re-declaring the whole gradient. */
.bh-workspace-cards__inner {
  --bh-wc-overlay: rgba(0, 0, 0, 0.8);
  background-image: linear-gradient(
    to top,
    var(--bh-wc-overlay) 18%,
    rgba(0, 0, 0, 0) 65%
  );
  display: flex;
  flex-direction: column;
  gap: 20px;
  height: 100%;
  justify-content: flex-end;
  padding: 24px;
  position: relative;
}

/* ==========================================================================
   Title row — icon badge + title/caption stack
   ========================================================================== */

.bh-workspace-cards__heading-row {
  align-items: flex-start;
  display: flex;
  gap: 16px;
  width: 100%;
}

.bh-workspace-cards__badge {
  align-items: center;
  background-color: #000000;
  border-radius: 4px;
  color: var(--bh-wc-white);
  display: inline-flex;
  flex-shrink: 0;
  height: 40px;
  justify-content: center;
  line-height: 1;
  width: 40px;
}

.bh-workspace-cards__badge i,
.bh-workspace-cards__badge svg {
  font-size: 18px;
  height: 20px;
  width: 20px;
}

.bh-workspace-cards__badge svg {
  fill: currentColor;
}

.bh-workspace-cards__text {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.bh-workspace-cards__title {
  color: var(--bh-wc-white);
  font-family: var(--bh-wc-font-heading);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.4;
  margin: 0;
}

.bh-workspace-cards__caption {
  color: var(--bh-wc-gold-light);
  font-family: var(--bh-wc-font-body);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  margin: 0;
}

/* ==========================================================================
   CTA button
   ========================================================================== */

.bh-workspace-cards__cta {
  align-self: flex-start;
  background-color: var(--bh-wc-gold);
  border-radius: 2px;
  color: #000000;
  display: inline-flex;
  font-family: var(--bh-wc-font-body);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
  margin-left: 56px; /* line up under the title, past the 40px badge + 16px gap */
  padding: 14px 24px;
  text-decoration: none;
  transition: background-color 200ms ease, transform 200ms ease;
}

.bh-workspace-cards__cta:hover,
.bh-workspace-cards__cta:focus-visible {
  background-color: var(--bh-wc-gold-dark);
  color: #000000;
  transform: translateY(-1px);
}

.bh-workspace-cards__cta--disabled {
  cursor: default;
  pointer-events: none;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1024px) {
  .bh-workspace-cards {
    padding: 64px 24px;
  }
}

@media (max-width: 768px) {
  .bh-workspace-cards {
    gap: 40px;
    padding: 48px 16px;
  }

  .bh-workspace-cards__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  .bh-workspace-cards__card {
    height: 420px;
  }

  .bh-workspace-cards__cta {
    margin-left: 0;
  }
}

@media (max-width: 480px) {
  .bh-workspace-cards__title {
    font-size: 18px;
  }

  .bh-workspace-cards__card {
    height: 380px;
  }

  .bh-workspace-cards__cta {
    padding: 12px 20px;
    font-size: 13px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bh-workspace-cards__card {
    transition: none;
  }
  .bh-workspace-cards__card:hover {
    transform: none;
  }
  .bh-workspace-cards__cta {
    transition: none;
  }
  .bh-workspace-cards__cta:hover,
  .bh-workspace-cards__cta:focus-visible {
    transform: none;
  }
}
