/* ==========================================================================
   TERMS & PRIVACY POLICY MODULE — Optimized (AX • SEO • Perf)
   Classes unchanged; works with Settings/Content/Media regrouping
   ========================================================================== */

.terms-privacy,
.terms-privacy * { box-sizing: border-box; font-family: inherit; }

/* Wrapper */
.terms-privacy {
  --tp-bg: #083043;
  --tp-text: #ffffff;
  --tp-sub: #cfe7f2;
  --tp-muted: #e6f0f3;               /* used for description text */
  --tp-card-grad-a: rgba(255,255,255,0.02);
  --tp-card-grad-b: rgba(255,255,255,0.04);
  --tp-focus: var(--focus-ring, #2684ff);

  background-color: var(--tp-bg);
  color: var(--tp-text);
  color-scheme: dark;
  width: 100%;
  max-width: 100vw;
  padding-block: clamp(2.5rem, 5vw, 4rem);
  padding-inline: clamp(1rem, 3.5vw, 1.5rem);
  margin: 0;
  overflow-x: hidden;
}

/* Container */
.terms-privacy__content {
  max-width: 1400px;
  margin-inline: auto;
  text-align: center;
}

/* Headings */
.terms-privacy__headline {
  font-weight: var(--theme-heading-weight, 800);
  letter-spacing: var(--theme-heading-tracking, normal);
  font-size: clamp(1.75rem, 2.6vw, 2.25rem);
  line-height: 1.2;
  margin: 0 0 1.25rem;
  color: var(--tp-text);
}
.terms-privacy__subheadline {
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  font-weight: 500;
  color: var(--tp-sub);
  line-height: 1.8;
  max-width: min(75%, 900px);
  margin: 0 auto clamp(1.5rem, 3.5vw, 2.5rem);
}

/* List/Grid */
.terms-privacy__items {
  list-style: none;
  padding: 0;
  margin: clamp(0.5rem, 1.5vw, 1rem) auto 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 320px));
  justify-content: center;
  gap: clamp(1rem, 2.5vw, 2rem) clamp(1rem, 3vw, 2.5rem);
  max-width: 80%;
}

/* Card */
.terms-privacy__item {
  background: linear-gradient(to bottom right, var(--tp-card-grad-a), var(--tp-card-grad-b));
  border-radius: 16px;
  padding: 2rem 1rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;

  width: 100%;
  max-width: 320px;
  min-height: 260px; /* mild CLS guard */
  box-shadow: 0 0 0 transparent;
  transition: transform .25s ease, box-shadow .25s ease;
}
.terms-privacy__item:hover,
.terms-privacy__item:focus-within {
  transform: translateY(-8px);
  box-shadow: 0 10px 25px rgba(0,0,0,.15);
}
/* Visible focus when tabbing into controls inside the card */
.terms-privacy__item:focus-within {
  outline: 2px solid var(--tp-focus);
  outline-offset: 4px;
  border-radius: 16px;
}

/* Media */
.terms-privacy__image {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}
.terms-privacy__image img {
  width: 60px;
  height: 60px;
  object-fit: contain;
  display: block;
  -webkit-user-drag: none;
  user-select: none;
}

/* Card text */
.terms-privacy__item-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--tp-text);
  margin: 0 0 .5rem;
  line-height: 1.4;
}
.terms-privacy__item-description {
  font-size: 1.05rem;
  color: var(--tp-muted);
  line-height: 1.6;
  margin: 0 auto;
  max-width: 34ch;
}

/* Keyboard focus (general controls) */
.terms-privacy a:focus-visible,
.terms-privacy button:focus-visible,
.terms-privacy [tabindex]:focus-visible {
  outline: 3px solid var(--tp-focus);
  outline-offset: 3px;
  border-radius: 6px;
}
@media (forced-colors: active) {
  .terms-privacy a:focus-visible,
  .terms-privacy button:focus-visible,
  .terms-privacy [tabindex]:focus-visible {
    outline: 2px solid CanvasText;
    outline-offset: 2px;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .terms-privacy__item,
  .terms-privacy__item:hover,
  .terms-privacy__item:focus-within {
    transition: none !important;
    transform: none !important;
    box-shadow: none !important;
  }
}

/* Responsive tweaks */
@media (max-width: 1024px) {
  .terms-privacy__items { max-width: 92%; }
}

/* Mobile — unify width with Feature Grid */
@media (max-width: 768px) {
  .terms-privacy__headline   { font-size: 2rem; }