/**
 * Feature Quadrants Widget Styles
 *
 * "What Makes The Hive Different" — heading on top, then a 2x2 (configurable)
 * grid of icon-led feature cells with a thin cross divider drawn between
 * them via internal cell borders.
 *
 * The divider uses border-right on non-last-column cells and border-bottom on
 * non-last-row cells, so it only paints between cells (never around the
 * outside edge) and adapts cleanly to any column count.
 *
 * @package BongoHive
 */

.bh-feature-quadrants {
  --bh-fq-font-heading: "Ubuntu", "PT Sans", Arial, sans-serif;
  --bh-fq-font-body: "Ubuntu", "Noto Sans", Arial, sans-serif;
  --bh-fq-black: #000000;
  --bh-fq-body: #444444;
  --bh-fq-gold: #f0af24;
  --bh-fq-gold-dark: #c08c1c;
  --bh-fq-gold-light: #f4c765;
  --bh-fq-bg: #ffffff;

  background-color: var(--bh-fq-bg);
  display: flex;
  flex-direction: column;
  gap: 48px;
  padding: 80px 24px;
  width: 100%;
}

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

.bh-feature-quadrants__header {
  text-align: center;
}

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

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

.bh-feature-quadrants__grid {
  --bh-fq-divider: #f4c765;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 100%;
}

.bh-feature-quadrants__cell {
  align-items: flex-start;
  background-color: inherit;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 32px;
  position: relative;
  transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

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

/* ==========================================================================
   Icon
   ========================================================================== */

.bh-feature-quadrants__icon {
  align-items: center;
  color: var(--bh-fq-gold);
  display: inline-flex;
  height: 28px;
  justify-content: flex-start;
  line-height: 1;
  width: 28px;
}

.bh-feature-quadrants__icon i {
  font-size: 24px;
}

.bh-feature-quadrants__icon svg {
  display: block;
  fill: currentColor;
  height: 24px;
  width: 24px;
}

/* ==========================================================================
   Text
   ========================================================================== */

.bh-feature-quadrants__title {
  color: var(--bh-fq-black);
  font-family: var(--bh-fq-font-heading);
  font-size: clamp(22px, 1.5vw + 12px, 28px);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.4;
  margin: 0;
}

.bh-feature-quadrants__body {
  color: var(--bh-fq-body);
  font-family: var(--bh-fq-font-body);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  margin: 0;
}

.bh-feature-quadrants__callout {
  color: var(--bh-fq-gold-dark);
  font-family: var(--bh-fq-font-body);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
  margin: 0;
  margin-top: auto;
}

/* ==========================================================================
   Cross divider — paint the grid's gap with the divider color and give every
   cell the same background as the surrounding section. With `gap: 1px` the
   only place the divider color shows through is between cells, producing a
   clean + (or grid) shape regardless of column count.
   ========================================================================== */

.bh-feature-quadrants__grid--divided {
  background-color: var(--bh-fq-divider);
  gap: 1px;
}

.bh-feature-quadrants__grid--divided .bh-feature-quadrants__cell {
  background-color: var(--bh-fq-bg);
}

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

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

@media (max-width: 768px) {
  .bh-feature-quadrants {
    gap: 32px;
    padding: 48px 16px;
  }

  .bh-feature-quadrants__grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  /* In a single-column layout, the cross becomes a vertical stack of
     dividers between rows only. Reset everything, then add a top border to
     every cell except the first. */
  .bh-feature-quadrants__grid--divided .bh-feature-quadrants__cell {
    border-width: 0;
  }

  .bh-feature-quadrants__grid--divided .bh-feature-quadrants__cell + .bh-feature-quadrants__cell {
    border-top-width: 1px;
  }

  .bh-feature-quadrants__cell {
    padding: 24px 16px;
  }
}

@media (max-width: 480px) {
  .bh-feature-quadrants__title {
    font-size: 20px;
  }

  .bh-feature-quadrants__body {
    font-size: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bh-feature-quadrants__cell {
    transition: none;
    transform: none;
  }
  .bh-feature-quadrants__cell:hover {
    transform: none;
  }
}
