/*
 * Typography scaling system
 *
 * Font sizes across the site are tied to CSS variables configured per-website
 * in the database (--font-size-body, --font-size-h1 … --font-size-h6).
 * These variables are injected at runtime by the backend into :root.
 *
 * Many elements originally had hardcoded font sizes that differed from the
 * heading/body defaults — e.g. a label at 14px, a stat value at 24px, a
 * button at 18px. To preserve those visual proportions while still making
 * them respond to font config changes, each size was converted to a ratio:
 *
 *   ratio = original_size / default_base_size
 *   font-size: calc(var(--font-size-body, 1rem) * ratio)
 *
 * Example: a 14px label against the 16px body default → ratio 0.875
 *   font-size: calc(var(--font-size-body, 1rem) * 0.875)
 *
 * If the configured body size changes to 20px, that label scales to 17.5px,
 * maintaining the same proportion it had at the original 16px base.
 *
 * Elements that exactly matched a heading level use the heading variable
 * directly (e.g. 24px = h4 default → var(--font-size-h4, 1.5rem)).
 */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --font-main: 'Inter', sans-serif;
  --font-accent: 'Inter', sans-serif;
  --font-serif: 'Playfair Display', serif;

  /* Text Colors */
  --text-main: #1F2937;
  --text-secondary: #FFFFFF;
  --text-white: #FFFFFF;

  /* UI Colors */
  --brand-primary: #FF6B35;
  --primary-accent: #EB7E56;
  --dropdown-bg: #FFFFFF;
  --dropdown-text: #374151;

  /* Bullet Variables */
  --tb-bullet-content-default: "•";
  --tb-bullet-color-orange: #FFA500;
  --tb-bullet-color-red: #FF6B35;

  /* Defaults */
  --tb-bullet-color: var(--tb-bullet-color-red);
  --tb-bullet-content: var(--tb-bullet-content-default);

  /* Utilities */
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --border-radius: 8px;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

body {
  font-family: var(--font-body, var(--font-main));
  font-weight: var(--font-body-weight, 400);
  font-size: var(--font-size-body, 1rem);
  color: var(--text-main);
  line-height: 1.5;

  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading, var(--font-main));
  font-weight: var(--font-heading-weight, 700);
}

h1 {
  font-size: var(--font-size-h1, 2.5rem);
}

h2 {
  font-size: var(--font-size-h2, 2rem);
}

h3 {
  font-size: var(--font-size-h3, 1.75rem);
}

h4 {
  font-size: var(--font-size-h4, 1.5rem);
}

h5 {
  font-size: var(--font-size-h5, 1.25rem);
}

h6 {
  font-size: var(--font-size-h6, 1rem);
}

.h3-card {
  font-size: var(--font-size-h3-card, 1.625rem);
}

main {
  display: flex;
  flex-direction: column;
  gap: 6rem;
  padding-bottom: 3rem;
}

button,
input,
optgroup,
select,
textarea {
  font-family: inherit;
}

p a {
  text-decoration: underline;
  color: inherit;
  transition: filter 0.15s, color 0.1s;
}

p a:hover,
p a:focus-visible {
  filter: brightness(0.8);
  text-decoration: underline;
}

.tb-list,
.tb .card-list {
  margin: 0;
  padding: 0 0 0 1.5rem;
  list-style: none;
}

.tb-list li,
.tb .card-list-item {
  position: relative;
  margin: 0.25rem 0;
  padding-left: 1.4rem;
  line-height: 1.6;
}

.tb-list li::before,
.tb .card-list-item::before {
  content: var(--tb-bullet-content);
  color: var(--tb-bullet-color);
  position: absolute;
  left: 0;
  top: 0.15em;
  display: inline-block;
  font-weight: 700;
  line-height: 1;
  transition: var(--transition);
}

.tb-bullets--orange {
  --tb-bullet-color: var(--tb-bullet-color-orange) !important;
}

.tb-bullets--red {
  --tb-bullet-color: var(--tb-bullet-color-red) !important;
}

.tb-bullets--check-icon {
  --tb-bullet-content: "";
}

.tb-bullets--check-icon li::before {
  width: 14px;
  height: 14px;
  top: 0.35em;
  background-color: var(--tb-bullet-color);
  -webkit-mask-image: url("/assets/icons/bullet-check.svg");
  mask-image: url("/assets/icons/bullet-check.svg");
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-size: contain;
}

.tb-bullets--circle_check-icon {
  --tb-bullet-content: "";
}

.tb-bullets--circle_check-icon li::before {
  width: 16px;
  height: 16px;
  top: 0.25em;
  background-color: var(--tb-bullet-color);
  -webkit-mask-image: url("/assets/icons/bullet-circle_check.svg");
  mask-image: url("/assets/icons/bullet-circle_check.svg");
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-size: contain;
}

ol {
  list-style-type: decimal;
  list-style-position: outside;
  padding-left: 1.5rem;
  margin-left: 1.5rem;
}

ol.tb-list li,
.tb .card-body ol li {
  padding-left: 0.25rem;
}

ol.tb-list li::before {
  display: none !important;
}

.stats-row {
  display: flex;
}

.stat-item {
  display: flex;
  flex-direction: column;
}

.stat-value {
  font-size: var(--font-size-h2, 2rem);
  font-weight: 800;
}

.buttons-container {
  display: flex;
}

.buttons-container:has(.button-item-primary) {
  flex-direction: column;
  align-items: stretch;
}

.buttons-container .button-item.button-item-primary {
  width: 100%;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  font-size: calc(var(--font-size-body, 1rem) * 1.0625);
  line-height: 1.3;
  cursor: pointer;
  border: none;
  outline: none;
  background-color: var(--primary-color, #ff1900);
  color: var(--text-on-primary, #fff);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
  transition:
    background-color 0.2s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.18s ease,
    filter 0.18s ease;
}

.buttons-container .button-item.button-item-primary:hover,
.buttons-container .button-item.button-item-primary:focus-visible {
  background-color: color-mix(in srgb, var(--primary-color, #ff1900) 88%, #000);
  color: var(--text-on-primary, #fff);
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.16);
}

.buttons-container .button-item.button-item-primary:active {
  background-color: color-mix(in srgb, var(--primary-color, #ff1900) 78%, #000);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.14);
}

.buttons-container .button-item.button-item-primary:focus-visible {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary-color, #ff1900) 35%, transparent);
}

.buttons-container .button-item.button-item-primary::after {
  content: '→';
  margin-left: 6px;
  font-size: 1.25em;
  line-height: 1;
  transition: transform 0.2s ease;
}

.buttons-container .button-item.button-item-primary:hover::after,
.buttons-container .button-item.button-item-primary:focus-visible::after {
  transform: translateX(4px);
}

.card-icon-svg-wrapper {
  max-width: 32px;
  max-height: 32px;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.card-icon-svg-wrapper svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Global SVG Icon Colors */
.card-icon-svg-wrapper,
.btn-icon-svg,
.tabs-widget__tab-icon,
.stat-icon-card__icon,
.image_widget-label-pill__icon {
  color: var(--accent-color);
}

/* Inherit text color inside primary buttons to maintain readability */
.button-item-primary .btn-icon-svg {
  color: inherit;
}