/* ===========================
   GLOBAL LAYOUT - UWM
   =========================== */

/* Globalny padding (has-global-padding) oparty o zmienne z PHP:
   --uwm-global-padding-y / --uwm-global-padding-x
*/
.uwm-container {
  width: 100%;
  max-width: var(--uwm-content-width);
  margin-inline: auto;
  padding-inline: var(--uwm-inner-padding-x, var(--uwm-global-padding-x, 1rem));
  box-sizing: border-box;
}

:where(
  .wp-block-uwm-hero-half,
  .wp-block-uwm-info-banner,
  .wp-block-uwm-info-modules,
  .wp-block-uwm-faq,
  .wp-block-uwm-quick-links,
  .wp-block-uwm-footer,
  .uwm-header-nav,
  .uwm-top-bar,
  .uwm-breadcrumbs,
  .uwm-hero
) {
  color: var(--uwm-color-text, #1f2933);
  font-size: var(--uwm-font-size-base, 1rem);
  line-height: var(--uwm-line-height-base, 1.6);
  box-sizing: border-box;
}

:where(
    .wp-block-uwm-hero-half,
    .wp-block-uwm-info-banner,
    .wp-block-uwm-info-modules,
    .wp-block-uwm-faq,
    .wp-block-uwm-quick-links,
    .wp-block-uwm-footer,
    .uwm-header-nav,
    .uwm-top-bar,
    .uwm-breadcrumbs,
    .uwm-hero
  )
  *,
:where(
    .wp-block-uwm-hero-half,
    .wp-block-uwm-info-banner,
    .wp-block-uwm-info-modules,
    .wp-block-uwm-faq,
    .wp-block-uwm-quick-links,
    .wp-block-uwm-footer,
    .uwm-header-nav,
    .uwm-top-bar,
    .uwm-breadcrumbs,
    .uwm-hero
  )
  *::before,
:where(
    .wp-block-uwm-hero-half,
    .wp-block-uwm-info-banner,
    .wp-block-uwm-info-modules,
    .wp-block-uwm-faq,
    .wp-block-uwm-footer,
    .uwm-header-nav,
    .uwm-top-bar,
    .uwm-breadcrumbs,
    .uwm-hero
  )
  *::after {
  box-sizing: inherit;
}

/* ===========================
   UNIFIED TYPOGRAPHY LAYER
   ===========================
   Single source of truth for headings, eyebrows and descriptive text
   across every UWM block. Selectors use :where() so they expose
   zero specificity - individual block rules can still override
   when a block genuinely needs a different look (dark background,
   centered alignment, max-width, etc.).
*/

/* Page-level H1 (hero, breadcrumb title) */
:where(.uwm-breadcrumbs__title, .uwm-hero-half__content h1) {
  color: var(--uwm-dark, #003366);
  font-size: var(--uwm-font-size-2xl, clamp(2.25rem, 2.5vw + 1rem, 3rem));
  font-weight: var(--uwm-font-weight-bold, 700);
  line-height: var(--uwm-line-height-tight, 1.15);
  margin: 0 0 var(--uwm-spacing-m, 1.5rem);
}

/* Section-level H2 (the main "title" of every content block) */
:where(
  .uwm-image-text__heading,
  .uwm-campus-map__heading,
  .uwm-news-section__heading,
  .uwm-research-cards__header h2,
  .uwm-quick-links__header h2,
  .uwm-fields-of-study__title,
  .uwm-stats__title,
  .uwm-timeline__title,
  .uwm-testimonials__title
) {
  color: var(--uwm-dark, #003366);
  font-size: var(--uwm-font-size-xl, clamp(2rem, 2vw + 1rem, 2.625rem));
  font-weight: var(--uwm-font-weight-bold, 700);
  line-height: var(--uwm-line-height-tight, 1.15);
  margin: 0 0 var(--uwm-spacing-m, 1.5rem);
}

/* Compact section H2 (inline banner, FAQ) - deliberately smaller */
:where(.uwm-info-banner__heading, .faq-section__heading) {
  color: var(--uwm-dark, #003366);
  font-size: var(--uwm-font-size-l, clamp(1.375rem, 1.2vw + 1rem, 1.75rem));
  font-weight: var(--uwm-font-weight-bold, 700);
  line-height: var(--uwm-line-height-tight, 1.15);
  margin: 0 0 var(--uwm-spacing-m, 1.5rem);
}

/* Card-level H3 (news card, research card, fields-of-study card) */
:where(
  .uwm-news-card__title,
  .uwm-research-card__content h3,
  .uwm-fields-of-study__card-title
) {
  color: var(--uwm-dark, #003366);
  font-size: var(--uwm-font-size-m, 1.125rem);
  font-weight: var(--uwm-font-weight-bold, 700);
  line-height: var(--uwm-line-height-snug, 1.3);
  margin: 0 0 var(--uwm-spacing-xs, 0.5rem);
}

/* Eyebrows - small uppercase labels above headings */
:where(.uwm-image-text__eyebrow, .uwm-campus-map__eyebrow) {
  display: inline-block;
  align-self: flex-start;
  background: var(--uwm-yellow, #ffcc00);
  color: var(--uwm-dark, #003366);
  padding: 0.25rem 0.75rem;
  font-size: var(--uwm-font-size-xs, 0.8125rem);
  font-weight: var(--uwm-font-weight-bold, 700);
  line-height: var(--uwm-line-height-tight, 1.15);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 0 0 var(--uwm-spacing-s, 1rem);
}

/* Eyebrows with a leading yellow rule (Quick Links, Fields of Study, Stats) */
:where(
  .uwm-quick-links__eyebrow,
  .uwm-fields-of-study__eyebrow,
  .uwm-stats__eyebrow,
  .uwm-timeline__eyebrow,
  .uwm-testimonials__eyebrow
) {
  display: inline-flex;
  align-items: center;
  gap: var(--uwm-spacing-xs, 0.5rem);
  color: var(--uwm-blue, #0059a7);
  font-size: var(--uwm-font-size-xs, 0.8125rem);
  font-weight: var(--uwm-font-weight-bold, 700);
  line-height: var(--uwm-line-height-tight, 1.15);
  letter-spacing: var(--uwm-letter-spacing-wide, 0.16em);
  text-transform: uppercase;
}

:where(
  .uwm-quick-links__eyebrow,
  .uwm-fields-of-study__eyebrow,
  .uwm-stats__eyebrow,
  .uwm-timeline__eyebrow,
  .uwm-testimonials__eyebrow
)::before {
  content: "";
  width: 28px;
  height: 2px;
  background: var(--uwm-yellow, #ffcc00);
}

/* Section descriptions / leads */
:where(.uwm-image-text__description, .uwm-campus-map__description) {
  color: var(--uwm-color-muted, #4b5563);
  font-size: var(--uwm-font-size-m, 1.125rem);
  line-height: var(--uwm-line-height-base, 1.6);
  margin: 0 0 var(--uwm-spacing-m, 1.5rem);
}

:where(.uwm-research-cards__lead, .uwm-news-section__lead) {
  max-width: 720px;
  margin: 0 auto var(--uwm-spacing-xl, 3rem);
  color: var(--uwm-color-muted, #4b5563);
  font-size: var(--uwm-font-size-base, 1rem);
  line-height: var(--uwm-line-height-base, 1.6);
}
