/* No SCSS includes here; plain CSS only. */

.grid-locked-container {
  /* Center the entire grid container */
  margin: 0 auto;
  padding: 0;
  position: relative;
}

.grid-locked-grid {
  display: grid;
  gap: 0;
  width: 100%;
  margin: 0 auto; /* ensure grid aligns center within container */
}

/* Full-width breakout */
.grid-locked--full {
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

.grid-locked-item {
  position: relative;
  background: var(--color-white);
  border: 1px solid var(--color-black);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  min-height: 351px;
  text-decoration: none;
  color: black;
  transition: all 0.3s ease;
  cursor: var(--grid-locked-cursor, default);
  box-sizing: border-box;
}

.grid-locked-item:hover,
.grid-locked-item:focus {
  background: rgba(8, 23, 40, 0.65); /* #081728 at 65% */
  color: white;
  text-decoration: none;
  outline: none;
  border-color: rgba(8, 23, 40, 0.65);
}

.grid-locked-content {
  text-align: center;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.grid-locked-title {
  /* Inline h4 typography (from _typography.scss) */
  font-family: var(--font-family-heading, 'Inter', sans-serif);
  font-weight: var(--font-weight-medium, 500);
  line-height: var(--line-height-normal, 130%);
  font-size: var(--font-size-h4-mobile, 24px);
  letter-spacing: var(--letter-spacing-normal, 0);
  word-wrap: break-word;
  hyphens: auto;
  margin: 0;
  transition: transform 0.3s ease, color 0.3s ease;
}

/* Hidden by default; revealed on hover */
.grid-locked-description {
  font-family: var(--font-family-body, 'Raleway', sans-serif);
  font-weight: 500;
  line-height: 150%;
  text-align: center;
  margin: 8px 0 0 0;
  color: inherit;
  opacity: 0;
  transform: translateY(12px);
  max-height: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease, max-height 0.3s ease, color 0.3s ease;
}

.grid-locked-item:hover .grid-locked-title,
.grid-locked-item:focus .grid-locked-title {
  transform: translateY(-6px);
}

.grid-locked-item:hover .grid-locked-description,
.grid-locked-item:focus .grid-locked-description {
  opacity: 1;
  transform: translateY(0);
  max-height: 240px; /* enough space for a couple lines */
  pointer-events: auto;
}

/* Responsive Design */
/* Desktop override: promote to h4-desktop scale at >= 992px */
@media (min-width: 992px) {
  .grid-locked-title {
    font-size: var(--font-size-h4-desktop, 30px);
    line-height: var(--line-height-normal, 130%);
  }
}

@media (max-width: 1199px) {
  .grid-locked-item {
    min-height: 280px;
    padding: 16px;
  }
}

@media (max-width: 767px) {
  .grid-locked-item {
    min-height: 200px;
    padding: 16px;
  }
}

@media (max-width: 480px) {
  .grid-locked-item {
    min-height: 160px;
    padding: 12px;
  }
}

.grid-locked-item:focus-visible {
  outline: 2px solid var(--color-brand-primary);
  outline-offset: 2px;
}

.grid-locked-item {
  transform: translateZ(0);
}

.grid-locked-item:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

@media (prefers-contrast: high) {
  .grid-locked-item {
    border-color: black;
    border-width: 2px;
  }

  .grid-locked-item:hover,
  .grid-locked-item:focus {
    border-color: white;
    border-width: 2px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .grid-locked-item {
    transition: none;
  }

  .grid-locked-item:hover {
    transform: none;
    box-shadow: none;
  }
}
