global.css

I’ll build this as a strong assets/css/global.css foundation for RX Theme: reset, design tokens, layout helpers, accessibility, typography, WordPress blocks, medical-site components, dark mode, print, and performance-friendly utilities.

Below is a strong advanced starter for:

rx-theme/assets/css/global.css

/*!
Theme Name: RX Theme
File: assets/css/global.css
Purpose: Global foundation CSS for RX Theme
Author: RxHarun
Version: 1.0.0
*/

/* =========================================================
   01. CSS Cascade Layers
========================================================= */

@layer reset, tokens, base, layout, components, wordpress, utilities, print;


/* =========================================================
   02. Reset Layer
========================================================= */

@layer reset {
  *,
  *::before,
  *::after {
    box-sizing: border-box;
  }

  * {
    margin: 0;
    padding: 0;
  }

  html {
    min-height: 100%;
    font-size: 100%;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-behavior: smooth;
  }

  body {
    min-height: 100%;
    line-height: 1.5;
    text-rendering: optimizeSpeed;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }

  img,
  picture,
  svg,
  video,
  canvas {
    display: block;
    max-width: 100%;
    height: auto;
  }

  input,
  button,
  textarea,
  select {
    font: inherit;
  }

  button {
    cursor: pointer;
    background: none;
    border: 0;
  }

  a {
    color: inherit;
    text-decoration: none;
  }

  ul,
  ol {
    list-style: none;
  }

  table {
    border-collapse: collapse;
    border-spacing: 0;
    width: 100%;
  }

  textarea {
    resize: vertical;
  }

  iframe {
    max-width: 100%;
    border: 0;
  }

  :target {
    scroll-margin-block: 6rem;
  }

  [hidden] {
    display: none !important;
  }

  @media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
      scroll-behavior: auto !important;
      animation-duration: 0.001ms !important;
      animation-iteration-count: 1 !important;
      transition-duration: 0.001ms !important;
    }
  }
}


/* =========================================================
   03. Design Tokens
========================================================= */

@layer tokens {
  :root {
    /* Brand Colors */
    --rx-color-primary: #0067ff;
    --rx-color-primary-hover: #0052cc;
    --rx-color-primary-soft: #eaf2ff;

    --rx-color-secondary: #00a884;
    --rx-color-secondary-hover: #008d70;
    --rx-color-secondary-soft: #e7fff8;

    --rx-color-accent: #ff7a00;
    --rx-color-accent-soft: #fff3e6;

    --rx-color-danger: #d92d20;
    --rx-color-danger-soft: #fff1f0;

    --rx-color-warning: #f79009;
    --rx-color-warning-soft: #fff7e6;

    --rx-color-success: #039855;
    --rx-color-success-soft: #ecfdf3;

    --rx-color-info: #0ba5ec;
    --rx-color-info-soft: #eaf8ff;

    /* Text Colors */
    --rx-color-text: #152033;
    --rx-color-text-muted: #5c667a;
    --rx-color-text-soft: #7a8499;
    --rx-color-heading: #101828;

    /* Background Colors */
    --rx-color-bg: #ffffff;
    --rx-color-bg-soft: #f8fafc;
    --rx-color-bg-muted: #f1f5f9;
    --rx-color-surface: #ffffff;
    --rx-color-surface-alt: #f9fbff;

    /* Border Colors */
    --rx-color-border: #e5e7eb;
    --rx-color-border-strong: #cbd5e1;

    /* Medical Tone Colors */
    --rx-medical-blue: #0575e6;
    --rx-medical-green: #12b76a;
    --rx-medical-red: #f04438;
    --rx-medical-cyan: #06aed5;
    --rx-medical-purple: #7c3aed;

    /* Typography */
    --rx-font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --rx-font-serif: Georgia, "Times New Roman", serif;
    --rx-font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

    --rx-font-size-xs: clamp(0.75rem, 0.72rem + 0.1vw, 0.8125rem);
    --rx-font-size-sm: clamp(0.875rem, 0.84rem + 0.12vw, 0.9375rem);
    --rx-font-size-base: clamp(1rem, 0.96rem + 0.16vw, 1.0625rem);
    --rx-font-size-md: clamp(1.125rem, 1.06rem + 0.25vw, 1.25rem);
    --rx-font-size-lg: clamp(1.25rem, 1.12rem + 0.5vw, 1.5rem);
    --rx-font-size-xl: clamp(1.5rem, 1.25rem + 1vw, 2rem);
    --rx-font-size-2xl: clamp(1.875rem, 1.5rem + 1.5vw, 2.75rem);
    --rx-font-size-3xl: clamp(2.25rem, 1.75rem + 2.2vw, 3.75rem);

    --rx-line-height-tight: 1.15;
    --rx-line-height-heading: 1.25;
    --rx-line-height-body: 1.75;

    --rx-font-weight-normal: 400;
    --rx-font-weight-medium: 500;
    --rx-font-weight-semibold: 600;
    --rx-font-weight-bold: 700;
    --rx-font-weight-black: 800;

    /* Spacing */
    --rx-space-0: 0;
    --rx-space-1: 0.25rem;
    --rx-space-2: 0.5rem;
    --rx-space-3: 0.75rem;
    --rx-space-4: 1rem;
    --rx-space-5: 1.25rem;
    --rx-space-6: 1.5rem;
    --rx-space-8: 2rem;
    --rx-space-10: 2.5rem;
    --rx-space-12: 3rem;
    --rx-space-16: 4rem;
    --rx-space-20: 5rem;
    --rx-space-24: 6rem;

    /* Layout */
    --rx-container-xs: 42rem;
    --rx-container-sm: 56rem;
    --rx-container-md: 72rem;
    --rx-container-lg: 82rem;
    --rx-container-xl: 96rem;

    --rx-container-padding: clamp(1rem, 4vw, 2rem);
    --rx-content-width: 760px;
    --rx-wide-width: 1180px;

    /* Radius */
    --rx-radius-xs: 0.25rem;
    --rx-radius-sm: 0.375rem;
    --rx-radius-md: 0.625rem;
    --rx-radius-lg: 0.875rem;
    --rx-radius-xl: 1.25rem;
    --rx-radius-2xl: 1.75rem;
    --rx-radius-pill: 999px;

    /* Shadows */
    --rx-shadow-xs: 0 1px 2px rgb(16 24 40 / 0.06);
    --rx-shadow-sm: 0 4px 10px rgb(16 24 40 / 0.08);
    --rx-shadow-md: 0 10px 24px rgb(16 24 40 / 0.10);
    --rx-shadow-lg: 0 20px 45px rgb(16 24 40 / 0.14);
    --rx-shadow-focus: 0 0 0 4px rgb(0 103 255 / 0.18);

    /* Transitions */
    --rx-transition-fast: 160ms ease;
    --rx-transition-base: 240ms ease;
    --rx-transition-slow: 360ms ease;

    /* Z Index */
    --rx-z-base: 1;
    --rx-z-dropdown: 50;
    --rx-z-sticky: 100;
    --rx-z-fixed: 200;
    --rx-z-modal: 500;
    --rx-z-toast: 800;
    --rx-z-max: 9999;

    /* Header */
    --rx-header-height: 72px;

    /* Forms */
    --rx-input-height: 48px;
    --rx-input-bg: #ffffff;
    --rx-input-border: #d0d5dd;
    --rx-input-placeholder: #98a2b3;

    /* Article */
    --rx-article-gap: 1.25rem;
    --rx-article-font-size: clamp(1rem, 0.94rem + 0.2vw, 1.125rem);
  }

  @media (prefers-color-scheme: dark) {
    :root {
      --rx-color-text: #d7deea;
      --rx-color-text-muted: #a8b3c7;
      --rx-color-text-soft: #8b95a8;
      --rx-color-heading: #f8fafc;

      --rx-color-bg: #0b1120;
      --rx-color-bg-soft: #101827;
      --rx-color-bg-muted: #172033;
      --rx-color-surface: #121a2b;
      --rx-color-surface-alt: #111827;

      --rx-color-border: #263247;
      --rx-color-border-strong: #3b475e;

      --rx-input-bg: #101827;
      --rx-input-border: #344054;
      --rx-input-placeholder: #7a8499;

      --rx-color-primary-soft: rgb(0 103 255 / 0.15);
      --rx-color-secondary-soft: rgb(0 168 132 / 0.16);
      --rx-color-danger-soft: rgb(217 45 32 / 0.15);
      --rx-color-warning-soft: rgb(247 144 9 / 0.16);
      --rx-color-success-soft: rgb(3 152 85 / 0.16);
      --rx-color-info-soft: rgb(11 165 236 / 0.16);
    }
  }

  [data-theme="light"] {
    color-scheme: light;
    --rx-color-text: #152033;
    --rx-color-text-muted: #5c667a;
    --rx-color-text-soft: #7a8499;
    --rx-color-heading: #101828;
    --rx-color-bg: #ffffff;
    --rx-color-bg-soft: #f8fafc;
    --rx-color-bg-muted: #f1f5f9;
    --rx-color-surface: #ffffff;
    --rx-color-surface-alt: #f9fbff;
    --rx-color-border: #e5e7eb;
    --rx-color-border-strong: #cbd5e1;
  }

  [data-theme="dark"] {
    color-scheme: dark;
    --rx-color-text: #d7deea;
    --rx-color-text-muted: #a8b3c7;
    --rx-color-text-soft: #8b95a8;
    --rx-color-heading: #f8fafc;
    --rx-color-bg: #0b1120;
    --rx-color-bg-soft: #101827;
    --rx-color-bg-muted: #172033;
    --rx-color-surface: #121a2b;
    --rx-color-surface-alt: #111827;
    --rx-color-border: #263247;
    --rx-color-border-strong: #3b475e;
  }
}


/* =========================================================
   04. Base Elements
========================================================= */

@layer base {
  body {
    font-family: var(--rx-font-sans);
    font-size: var(--rx-font-size-base);
    font-weight: var(--rx-font-weight-normal);
    line-height: var(--rx-line-height-body);
    color: var(--rx-color-text);
    background: var(--rx-color-bg);
    overflow-x: hidden;
  }

  body.admin-bar .rx-site-header.is-sticky {
    top: 32px;
  }

  @media (max-width: 782px) {
    body.admin-bar .rx-site-header.is-sticky {
      top: 46px;
    }
  }

  h1,
  h2,
  h3,
  h4,
  h5,
  h6 {
    color: var(--rx-color-heading);
    line-height: var(--rx-line-height-heading);
    font-weight: var(--rx-font-weight-bold);
    letter-spacing: -0.02em;
    text-wrap: balance;
  }

  h1 {
    font-size: var(--rx-font-size-3xl);
  }

  h2 {
    font-size: var(--rx-font-size-2xl);
  }

  h3 {
    font-size: var(--rx-font-size-xl);
  }

  h4 {
    font-size: var(--rx-font-size-lg);
  }

  h5 {
    font-size: var(--rx-font-size-md);
  }

  h6 {
    font-size: var(--rx-font-size-base);
  }

  p {
    margin-block: 0 1rem;
  }

  strong,
  b {
    font-weight: var(--rx-font-weight-bold);
  }

  small {
    font-size: var(--rx-font-size-sm);
  }

  mark {
    padding: 0.1em 0.25em;
    border-radius: var(--rx-radius-xs);
    background: var(--rx-color-warning-soft);
    color: var(--rx-color-heading);
  }

  a {
    color: var(--rx-color-primary);
    text-underline-offset: 0.18em;
    transition:
      color var(--rx-transition-fast),
      background-color var(--rx-transition-fast),
      border-color var(--rx-transition-fast),
      box-shadow var(--rx-transition-fast);
  }

  a:hover {
    color: var(--rx-color-primary-hover);
  }

  a:focus-visible,
  button:focus-visible,
  input:focus-visible,
  textarea:focus-visible,
  select:focus-visible,
  summary:focus-visible {
    outline: 0;
    box-shadow: var(--rx-shadow-focus);
  }

  hr {
    border: 0;
    border-top: 1px solid var(--rx-color-border);
    margin-block: var(--rx-space-8);
  }

  code,
  kbd,
  samp,
  pre {
    font-family: var(--rx-font-mono);
  }

  code {
    padding: 0.15em 0.35em;
    border-radius: var(--rx-radius-xs);
    background: var(--rx-color-bg-muted);
    font-size: 0.92em;
  }

  pre {
    overflow-x: auto;
    padding: var(--rx-space-5);
    border-radius: var(--rx-radius-lg);
    background: #0f172a;
    color: #e2e8f0;
    line-height: 1.7;
  }

  pre code {
    padding: 0;
    background: transparent;
    color: inherit;
  }

  blockquote {
    margin-block: var(--rx-space-6);
    padding: var(--rx-space-5) var(--rx-space-6);
    border-left: 4px solid var(--rx-color-primary);
    border-radius: 0 var(--rx-radius-lg) var(--rx-radius-lg) 0;
    background: var(--rx-color-primary-soft);
    color: var(--rx-color-heading);
    font-size: var(--rx-font-size-md);
  }

  blockquote cite {
    display: block;
    margin-top: var(--rx-space-3);
    color: var(--rx-color-text-muted);
    font-size: var(--rx-font-size-sm);
    font-style: normal;
  }

  ::selection {
    background: var(--rx-color-primary);
    color: #fff;
  }

  img {
    border-radius: inherit;
  }
}


/* =========================================================
   05. Layout System
========================================================= */

@layer layout {
  .rx-site {
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
  }

  .rx-site-main {
    flex: 1 0 auto;
  }

  .rx-container {
    width: min(100% - var(--rx-container-padding) * 2, var(--rx-container-lg));
    margin-inline: auto;
  }

  .rx-container-sm {
    width: min(100% - var(--rx-container-padding) * 2, var(--rx-container-sm));
    margin-inline: auto;
  }

  .rx-container-md {
    width: min(100% - var(--rx-container-padding) * 2, var(--rx-container-md));
    margin-inline: auto;
  }

  .rx-container-xl {
    width: min(100% - var(--rx-container-padding) * 2, var(--rx-container-xl));
    margin-inline: auto;
  }

  .rx-content {
    width: min(100% - var(--rx-container-padding) * 2, var(--rx-content-width));
    margin-inline: auto;
  }

  .rx-wide {
    width: min(100% - var(--rx-container-padding) * 2, var(--rx-wide-width));
    margin-inline: auto;
  }

  .rx-section {
    padding-block: clamp(3rem, 7vw, 6rem);
  }

  .rx-section-sm {
    padding-block: clamp(2rem, 5vw, 4rem);
  }

  .rx-section-lg {
    padding-block: clamp(4rem, 9vw, 8rem);
  }

  .rx-grid {
    display: grid;
    gap: var(--rx-space-6);
  }

  .rx-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--rx-space-6);
  }

  .rx-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--rx-space-6);
  }

  .rx-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--rx-space-6);
  }

  .rx-auto-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
    gap: var(--rx-space-6);
  }

  .rx-sidebar-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
    gap: clamp(2rem, 5vw, 4rem);
    align-items: start;
  }

  .rx-sidebar-left {
    grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
  }

  .rx-stack {
    display: flex;
    flex-direction: column;
    gap: var(--rx-space-4);
  }

  .rx-cluster {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--rx-space-3);
  }

  .rx-split {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--rx-space-4);
  }

  .rx-center {
    display: grid;
    place-items: center;
  }

  @media (max-width: 991px) {
    .rx-grid-4 {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .rx-sidebar-layout,
    .rx-sidebar-left {
      grid-template-columns: 1fr;
    }
  }

  @media (max-width: 767px) {
    .rx-grid-2,
    .rx-grid-3,
    .rx-grid-4 {
      grid-template-columns: 1fr;
    }

    .rx-split {
      align-items: flex-start;
      flex-direction: column;
    }
  }
}


/* =========================================================
   06. Header / Navigation
========================================================= */

@layer components {
  .rx-site-header {
    position: relative;
    z-index: var(--rx-z-sticky);
    background: color-mix(in srgb, var(--rx-color-bg) 92%, transparent);
    border-bottom: 1px solid var(--rx-color-border);
    backdrop-filter: blur(16px);
  }

  .rx-site-header.is-sticky {
    position: sticky;
    top: 0;
  }

  .rx-header-inner {
    min-height: var(--rx-header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--rx-space-5);
  }

  .rx-site-branding {
    display: flex;
    align-items: center;
    gap: var(--rx-space-3);
    min-width: 0;
  }

  .rx-site-logo {
    width: 44px;
    height: 44px;
    flex: 0 0 auto;
    border-radius: var(--rx-radius-md);
  }

  .rx-site-title {
    color: var(--rx-color-heading);
    font-size: var(--rx-font-size-md);
    font-weight: var(--rx-font-weight-bold);
    line-height: 1.2;
  }

  .rx-site-description {
    color: var(--rx-color-text-muted);
    font-size: var(--rx-font-size-sm);
    line-height: 1.3;
  }

  .rx-primary-nav {
    display: flex;
    align-items: center;
    gap: var(--rx-space-1);
  }

  .rx-primary-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    padding: 0.5rem 0.8rem;
    border-radius: var(--rx-radius-pill);
    color: var(--rx-color-text);
    font-weight: var(--rx-font-weight-medium);
  }

  .rx-primary-nav a:hover,
  .rx-primary-nav .current-menu-item > a,
  .rx-primary-nav .current_page_item > a {
    color: var(--rx-color-primary);
    background: var(--rx-color-primary-soft);
  }

  .rx-menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border-radius: var(--rx-radius-md);
    background: var(--rx-color-bg-soft);
    color: var(--rx-color-heading);
  }

  @media (max-width: 991px) {
    .rx-menu-toggle {
      display: inline-grid;
      place-items: center;
    }

    .rx-primary-nav {
      position: fixed;
      inset: var(--rx-header-height) var(--rx-container-padding) auto;
      display: none;
      flex-direction: column;
      align-items: stretch;
      gap: var(--rx-space-2);
      padding: var(--rx-space-4);
      border: 1px solid var(--rx-color-border);
      border-radius: var(--rx-radius-xl);
      background: var(--rx-color-surface);
      box-shadow: var(--rx-shadow-lg);
    }

    .rx-primary-nav.is-open {
      display: flex;
    }

    .rx-primary-nav a {
      border-radius: var(--rx-radius-md);
    }
  }
}


/* =========================================================
   07. Buttons
========================================================= */

@layer components {
  .rx-btn,
  .button,
  button,
  input[type="submit"],
  input[type="button"],
  input[type="reset"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--rx-space-2);
    min-height: 44px;
    padding: 0.65rem 1.1rem;
    border: 1px solid transparent;
    border-radius: var(--rx-radius-pill);
    font-weight: var(--rx-font-weight-semibold);
    line-height: 1.2;
    text-align: center;
    transition:
      transform var(--rx-transition-fast),
      box-shadow var(--rx-transition-fast),
      background-color var(--rx-transition-fast),
      color var(--rx-transition-fast),
      border-color var(--rx-transition-fast);
  }

  .rx-btn:hover,
  .button:hover,
  button:hover,
  input[type="submit"]:hover {
    transform: translateY(-1px);
  }

  .rx-btn-primary,
  .button,
  input[type="submit"] {
    color: #fff;
    background: var(--rx-color-primary);
    border-color: var(--rx-color-primary);
    box-shadow: var(--rx-shadow-xs);
  }

  .rx-btn-primary:hover,
  .button:hover,
  input[type="submit"]:hover {
    color: #fff;
    background: var(--rx-color-primary-hover);
    border-color: var(--rx-color-primary-hover);
    box-shadow: var(--rx-shadow-sm);
  }

  .rx-btn-secondary {
    color: #fff;
    background: var(--rx-color-secondary);
    border-color: var(--rx-color-secondary);
  }

  .rx-btn-secondary:hover {
    color: #fff;
    background: var(--rx-color-secondary-hover);
    border-color: var(--rx-color-secondary-hover);
  }

  .rx-btn-outline {
    color: var(--rx-color-heading);
    background: transparent;
    border-color: var(--rx-color-border-strong);
  }

  .rx-btn-outline:hover {
    color: var(--rx-color-primary);
    border-color: var(--rx-color-primary);
    background: var(--rx-color-primary-soft);
  }

  .rx-btn-soft {
    color: var(--rx-color-primary);
    background: var(--rx-color-primary-soft);
    border-color: transparent;
  }

  .rx-btn-soft:hover {
    color: #fff;
    background: var(--rx-color-primary);
  }

  .rx-btn-sm {
    min-height: 36px;
    padding: 0.45rem 0.85rem;
    font-size: var(--rx-font-size-sm);
  }

  .rx-btn-lg {
    min-height: 54px;
    padding: 0.85rem 1.35rem;
    font-size: var(--rx-font-size-md);
  }

  .rx-btn-block {
    width: 100%;
  }

  .rx-btn[disabled],
  button[disabled],
  input[disabled] {
    cursor: not-allowed;
    opacity: 0.55;
    transform: none;
  }
}


/* =========================================================
   08. Forms
========================================================= */

@layer components {
  .rx-form {
    display: grid;
    gap: var(--rx-space-4);
  }

  label {
    display: inline-block;
    margin-bottom: var(--rx-space-2);
    color: var(--rx-color-heading);
    font-weight: var(--rx-font-weight-semibold);
  }

  input,
  select,
  textarea {
    width: 100%;
    border: 1px solid var(--rx-input-border);
    border-radius: var(--rx-radius-md);
    background: var(--rx-input-bg);
    color: var(--rx-color-text);
    transition:
      border-color var(--rx-transition-fast),
      box-shadow var(--rx-transition-fast),
      background-color var(--rx-transition-fast);
  }

  input,
  select {
    min-height: var(--rx-input-height);
    padding-inline: var(--rx-space-4);
  }

  textarea {
    min-height: 140px;
    padding: var(--rx-space-4);
  }

  input::placeholder,
  textarea::placeholder {
    color: var(--rx-input-placeholder);
  }

  input:hover,
  select:hover,
  textarea:hover {
    border-color: var(--rx-color-border-strong);
  }

  input:focus,
  select:focus,
  textarea:focus {
    border-color: var(--rx-color-primary);
    outline: none;
    box-shadow: var(--rx-shadow-focus);
  }

  input[type="checkbox"],
  input[type="radio"] {
    width: 1rem;
    min-height: auto;
    height: 1rem;
    padding: 0;
    accent-color: var(--rx-color-primary);
  }

  .rx-field {
    display: grid;
    gap: var(--rx-space-2);
  }

  .rx-field-help {
    color: var(--rx-color-text-muted);
    font-size: var(--rx-font-size-sm);
  }

  .rx-field-error {
    color: var(--rx-color-danger);
    font-size: var(--rx-font-size-sm);
  }

  .rx-search-form {
    display: flex;
    gap: var(--rx-space-2);
  }

  .rx-search-form input[type="search"] {
    flex: 1;
  }

  @media (max-width: 575px) {
    .rx-search-form {
      flex-direction: column;
    }
  }
}


/* =========================================================
   09. Cards
========================================================= */

@layer components {
  .rx-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--rx-color-border);
    border-radius: var(--rx-radius-xl);
    background: var(--rx-color-surface);
    box-shadow: var(--rx-shadow-xs);
    transition:
      transform var(--rx-transition-base),
      box-shadow var(--rx-transition-base),
      border-color var(--rx-transition-base);
  }

  .rx-card:hover {
    transform: translateY(-3px);
    border-color: color-mix(in srgb, var(--rx-color-primary) 35%, var(--rx-color-border));
    box-shadow: var(--rx-shadow-md);
  }

  .rx-card-body {
    padding: clamp(1rem, 3vw, 1.5rem);
  }

  .rx-card-title {
    margin-bottom: var(--rx-space-2);
    font-size: var(--rx-font-size-lg);
  }

  .rx-card-text {
    color: var(--rx-color-text-muted);
  }

  .rx-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--rx-space-2) var(--rx-space-4);
    color: var(--rx-color-text-soft);
    font-size: var(--rx-font-size-sm);
  }

  .rx-card-media {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--rx-color-bg-muted);
  }

  .rx-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--rx-transition-slow);
  }

  .rx-card:hover .rx-card-media img {
    transform: scale(1.04);
  }
}


/* =========================================================
   10. Blog / Article
========================================================= */

@layer components {
  .rx-entry {
    max-width: var(--rx-content-width);
    margin-inline: auto;
  }

  .rx-entry-header {
    margin-bottom: clamp(2rem, 5vw, 3.5rem);
  }

  .rx-entry-title {
    margin-bottom: var(--rx-space-4);
  }

  .rx-entry-meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--rx-space-2) var(--rx-space-4);
    color: var(--rx-color-text-muted);
    font-size: var(--rx-font-size-sm);
  }

  .rx-entry-thumbnail {
    margin-block: var(--rx-space-8);
    overflow: hidden;
    border-radius: var(--rx-radius-2xl);
    background: var(--rx-color-bg-muted);
  }

  .rx-entry-content {
    font-size: var(--rx-article-font-size);
    line-height: 1.85;
  }

  .rx-entry-content > * + * {
    margin-top: var(--rx-article-gap);
  }

  .rx-entry-content h2,
  .rx-entry-content h3,
  .rx-entry-content h4 {
    margin-top: clamp(2rem, 5vw, 3rem);
  }

  .rx-entry-content h2 {
    padding-bottom: var(--rx-space-3);
    border-bottom: 1px solid var(--rx-color-border);
  }

  .rx-entry-content ul,
  .rx-entry-content ol {
    padding-left: 1.35rem;
  }

  .rx-entry-content ul {
    list-style: disc;
  }

  .rx-entry-content ol {
    list-style: decimal;
  }

  .rx-entry-content li + li {
    margin-top: var(--rx-space-2);
  }

  .rx-entry-content a {
    text-decoration: underline;
  }

  .rx-entry-content img {
    margin-inline: auto;
    border-radius: var(--rx-radius-xl);
  }

  .rx-entry-content figure {
    margin-block: var(--rx-space-8);
  }

  .rx-entry-content figcaption {
    margin-top: var(--rx-space-2);
    color: var(--rx-color-text-muted);
    font-size: var(--rx-font-size-sm);
    text-align: center;
  }

  .rx-entry-footer {
    margin-top: var(--rx-space-10);
    padding-top: var(--rx-space-6);
    border-top: 1px solid var(--rx-color-border);
  }

  .rx-post-navigation {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--rx-space-4);
    margin-top: var(--rx-space-8);
  }

  .rx-post-nav-link {
    padding: var(--rx-space-5);
    border: 1px solid var(--rx-color-border);
    border-radius: var(--rx-radius-lg);
    background: var(--rx-color-surface);
  }

  .rx-post-nav-label {
    display: block;
    color: var(--rx-color-text-muted);
    font-size: var(--rx-font-size-sm);
  }

  .rx-post-nav-title {
    display: block;
    margin-top: var(--rx-space-1);
    color: var(--rx-color-heading);
    font-weight: var(--rx-font-weight-semibold);
  }

  @media (max-width: 575px) {
    .rx-post-navigation {
      grid-template-columns: 1fr;
    }
  }
}


/* =========================================================
   11. Medical Content Components
========================================================= */

@layer components {
  .rx-medical-alert {
    padding: var(--rx-space-5);
    border: 1px solid var(--rx-color-border);
    border-left-width: 5px;
    border-radius: var(--rx-radius-lg);
    background: var(--rx-color-surface);
  }

  .rx-medical-alert strong {
    display: block;
    margin-bottom: var(--rx-space-2);
    color: var(--rx-color-heading);
  }

  .rx-alert-info {
    border-left-color: var(--rx-color-info);
    background: var(--rx-color-info-soft);
  }

  .rx-alert-warning {
    border-left-color: var(--rx-color-warning);
    background: var(--rx-color-warning-soft);
  }

  .rx-alert-danger {
    border-left-color: var(--rx-color-danger);
    background: var(--rx-color-danger-soft);
  }

  .rx-alert-success {
    border-left-color: var(--rx-color-success);
    background: var(--rx-color-success-soft);
  }

  .rx-clinical-box {
    padding: clamp(1.25rem, 3vw, 2rem);
    border: 1px solid var(--rx-color-border);
    border-radius: var(--rx-radius-xl);
    background:
      linear-gradient(
        135deg,
        color-mix(in srgb, var(--rx-color-primary-soft) 72%, transparent),
        var(--rx-color-surface)
      );
  }

  .rx-definition-box {
    padding: var(--rx-space-5);
    border-radius: var(--rx-radius-lg);
    background: var(--rx-color-bg-soft);
    border: 1px solid var(--rx-color-border);
  }

  .rx-definition-term {
    color: var(--rx-color-heading);
    font-weight: var(--rx-font-weight-bold);
  }

  .rx-symptom-list,
  .rx-cause-list,
  .rx-test-list {
    display: grid;
    gap: var(--rx-space-3);
  }

  .rx-symptom-list li,
  .rx-cause-list li,
  .rx-test-list li {
    position: relative;
    padding-left: 2rem;
  }

  .rx-symptom-list li::before,
  .rx-cause-list li::before,
  .rx-test-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 0.8rem;
    height: 0.8rem;
    border-radius: 50%;
    background: var(--rx-color-primary);
    box-shadow: 0 0 0 4px var(--rx-color-primary-soft);
  }

  .rx-treatment-step {
    counter-increment: treatment-step;
    position: relative;
    padding: var(--rx-space-5) var(--rx-space-5) var(--rx-space-5) 4rem;
    border: 1px solid var(--rx-color-border);
    border-radius: var(--rx-radius-lg);
    background: var(--rx-color-surface);
  }

  .rx-treatment-step::before {
    content: counter(treatment-step);
    position: absolute;
    left: var(--rx-space-5);
    top: var(--rx-space-5);
    width: 2rem;
    height: 2rem;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: var(--rx-color-primary);
    font-weight: var(--rx-font-weight-bold);
  }

  .rx-treatment-steps {
    counter-reset: treatment-step;
    display: grid;
    gap: var(--rx-space-4);
  }
}


/* =========================================================
   12. Badges / Labels
========================================================= */

@layer components {
  .rx-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--rx-space-1);
    padding: 0.25rem 0.65rem;
    border-radius: var(--rx-radius-pill);
    background: var(--rx-color-bg-muted);
    color: var(--rx-color-text-muted);
    font-size: var(--rx-font-size-xs);
    font-weight: var(--rx-font-weight-semibold);
    line-height: 1.2;
  }

  .rx-badge-primary {
    color: var(--rx-color-primary);
    background: var(--rx-color-primary-soft);
  }

  .rx-badge-success {
    color: var(--rx-color-success);
    background: var(--rx-color-success-soft);
  }

  .rx-badge-danger {
    color: var(--rx-color-danger);
    background: var(--rx-color-danger-soft);
  }

  .rx-badge-warning {
    color: var(--rx-color-warning);
    background: var(--rx-color-warning-soft);
  }

  .rx-badge-info {
    color: var(--rx-color-info);
    background: var(--rx-color-info-soft);
  }
}


/* =========================================================
   13. Breadcrumbs
========================================================= */

@layer components {
  .rx-breadcrumbs {
    margin-block: var(--rx-space-4);
    color: var(--rx-color-text-muted);
    font-size: var(--rx-font-size-sm);
  }

  .rx-breadcrumbs ol {
    display: flex;
    flex-wrap: wrap;
    gap: var(--rx-space-2);
  }

  .rx-breadcrumbs li {
    display: inline-flex;
    align-items: center;
    gap: var(--rx-space-2);
  }

  .rx-breadcrumbs li:not(:last-child)::after {
    content: "/";
    color: var(--rx-color-text-soft);
  }

  .rx-breadcrumbs a {
    color: var(--rx-color-text-muted);
  }

  .rx-breadcrumbs a:hover {
    color: var(--rx-color-primary);
  }
}


/* =========================================================
   14. Pagination
========================================================= */

@layer components {
  .rx-pagination,
  .nav-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--rx-space-2);
    margin-top: var(--rx-space-10);
  }

  .page-numbers {
    min-width: 42px;
    height: 42px;
    display: inline-grid;
    place-items: center;
    padding-inline: var(--rx-space-3);
    border: 1px solid var(--rx-color-border);
    border-radius: var(--rx-radius-md);
    background: var(--rx-color-surface);
    color: var(--rx-color-text);
    font-weight: var(--rx-font-weight-semibold);
  }

  .page-numbers:hover,
  .page-numbers.current {
    border-color: var(--rx-color-primary);
    background: var(--rx-color-primary);
    color: #fff;
  }
}


/* =========================================================
   15. Sidebar / Widgets
========================================================= */

@layer components {
  .rx-sidebar {
    display: grid;
    gap: var(--rx-space-5);
  }

  .widget {
    padding: var(--rx-space-5);
    border: 1px solid var(--rx-color-border);
    border-radius: var(--rx-radius-xl);
    background: var(--rx-color-surface);
    box-shadow: var(--rx-shadow-xs);
  }

  .widget-title,
  .widget h2,
  .wp-block-heading {
    margin-bottom: var(--rx-space-4);
    font-size: var(--rx-font-size-lg);
  }

  .widget ul {
    display: grid;
    gap: var(--rx-space-2);
  }

  .widget li {
    color: var(--rx-color-text-muted);
  }

  .widget a {
    color: var(--rx-color-text);
  }

  .widget a:hover {
    color: var(--rx-color-primary);
  }

  .widget_search .search-form {
    display: flex;
    gap: var(--rx-space-2);
  }

  @media (max-width: 575px) {
    .widget_search .search-form {
      flex-direction: column;
    }
  }
}


/* =========================================================
   16. Footer
========================================================= */

@layer components {
  .rx-site-footer {
    margin-top: auto;
    border-top: 1px solid var(--rx-color-border);
    background: var(--rx-color-bg-soft);
  }

  .rx-footer-widgets {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--rx-space-6);
    padding-block: var(--rx-space-12);
  }

  .rx-footer-bottom {
    padding-block: var(--rx-space-5);
    border-top: 1px solid var(--rx-color-border);
    color: var(--rx-color-text-muted);
    font-size: var(--rx-font-size-sm);
  }

  @media (max-width: 991px) {
    .rx-footer-widgets {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
  }

  @media (max-width: 575px) {
    .rx-footer-widgets {
      grid-template-columns: 1fr;
    }
  }
}


/* =========================================================
   17. WordPress Core Classes
========================================================= */

@layer wordpress {
  .alignleft {
    float: left;
    margin: 0 var(--rx-space-5) var(--rx-space-4) 0;
  }

  .alignright {
    float: right;
    margin: 0 0 var(--rx-space-4) var(--rx-space-5);
  }

  .aligncenter {
    display: block;
    margin-inline: auto;
  }

  .alignwide {
    max-width: var(--rx-wide-width);
    margin-inline: auto;
  }

  .alignfull {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
  }

  .wp-caption {
    max-width: 100%;
  }

  .wp-caption-text,
  .gallery-caption {
    margin-top: var(--rx-space-2);
    color: var(--rx-color-text-muted);
    font-size: var(--rx-font-size-sm);
    text-align: center;
  }

  .sticky {
    position: relative;
  }

  .bypostauthor {
    display: block;
  }

  .screen-reader-text {
    position: absolute !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
    white-space: nowrap;
    word-wrap: normal !important;
  }

  .screen-reader-text:focus {
    z-index: var(--rx-z-max);
    top: var(--rx-space-4);
    left: var(--rx-space-4);
    width: auto;
    height: auto;
    display: block;
    padding: var(--rx-space-3) var(--rx-space-4);
    clip: auto !important;
    border-radius: var(--rx-radius-md);
    background: var(--rx-color-primary);
    color: #fff;
    box-shadow: var(--rx-shadow-md);
  }

  .wp-block-image img {
    border-radius: var(--rx-radius-xl);
  }

  .wp-block-quote {
    border-left-color: var(--rx-color-primary);
  }

  .wp-block-pullquote {
    padding: var(--rx-space-8);
    border-top: 4px solid var(--rx-color-primary);
    border-bottom: 4px solid var(--rx-color-primary);
    color: var(--rx-color-heading);
  }

  .wp-block-table {
    overflow-x: auto;
  }

  .wp-block-table table {
    min-width: 640px;
  }

  .wp-block-table th,
  .wp-block-table td {
    padding: var(--rx-space-3);
    border: 1px solid var(--rx-color-border);
  }

  .wp-block-table th {
    background: var(--rx-color-bg-soft);
    color: var(--rx-color-heading);
    font-weight: var(--rx-font-weight-bold);
  }

  .wp-block-button__link {
    border-radius: var(--rx-radius-pill);
    background: var(--rx-color-primary);
    color: #fff;
    font-weight: var(--rx-font-weight-semibold);
  }

  .wp-block-button__link:hover {
    background: var(--rx-color-primary-hover);
    color: #fff;
  }

  .wp-block-separator {
    border: 0;
    border-top: 1px solid var(--rx-color-border);
  }

  .wp-block-cover {
    border-radius: var(--rx-radius-xl);
    overflow: hidden;
  }

  .wp-block-group.has-background {
    padding: var(--rx-space-6);
    border-radius: var(--rx-radius-xl);
  }
}


/* =========================================================
   18. Comments
========================================================= */

@layer components {
  .rx-comments {
    margin-top: var(--rx-space-12);
  }

  .comment-list {
    display: grid;
    gap: var(--rx-space-5);
    margin-top: var(--rx-space-6);
  }

  .comment {
    padding: var(--rx-space-5);
    border: 1px solid var(--rx-color-border);
    border-radius: var(--rx-radius-xl);
    background: var(--rx-color-surface);
  }

  .comment-author {
    display: flex;
    align-items: center;
    gap: var(--rx-space-3);
    color: var(--rx-color-heading);
    font-weight: var(--rx-font-weight-bold);
  }

  .comment-author img {
    border-radius: 50%;
  }

  .comment-metadata {
    margin-top: var(--rx-space-1);
    color: var(--rx-color-text-muted);
    font-size: var(--rx-font-size-sm);
  }

  .comment-content {
    margin-top: var(--rx-space-4);
  }

  .comment-reply-link {
    display: inline-flex;
    margin-top: var(--rx-space-3);
    color: var(--rx-color-primary);
    font-weight: var(--rx-font-weight-semibold);
  }

  .comment-respond {
    margin-top: var(--rx-space-8);
    padding: var(--rx-space-6);
    border: 1px solid var(--rx-color-border);
    border-radius: var(--rx-radius-xl);
    background: var(--rx-color-surface);
  }
}


/* =========================================================
   19. Tables
========================================================= */

@layer components {
  .rx-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--rx-color-border);
    border-radius: var(--rx-radius-lg);
  }

  .rx-table {
    min-width: 640px;
  }

  .rx-table th,
  .rx-table td {
    padding: var(--rx-space-3) var(--rx-space-4);
    border-bottom: 1px solid var(--rx-color-border);
    text-align: left;
  }

  .rx-table th {
    background: var(--rx-color-bg-soft);
    color: var(--rx-color-heading);
    font-weight: var(--rx-font-weight-bold);
  }

  .rx-table tr:last-child td {
    border-bottom: 0;
  }

  .rx-table tr:hover td {
    background: var(--rx-color-bg-soft);
  }
}


/* =========================================================
   20. Loading / Skeleton
========================================================= */

@layer components {
  .rx-skeleton {
    position: relative;
    overflow: hidden;
    border-radius: var(--rx-radius-md);
    background: var(--rx-color-bg-muted);
  }

  .rx-skeleton::after {
    content: "";
    position: absolute;
    inset: 0;
    transform: translateX(-100%);
    background: linear-gradient(
      90deg,
      transparent,
      rgb(255 255 255 / 0.35),
      transparent
    );
    animation: rx-skeleton-loading 1.4s infinite;
  }

  @keyframes rx-skeleton-loading {
    100% {
      transform: translateX(100%);
    }
  }

  .rx-spinner {
    width: 2rem;
    height: 2rem;
    border: 3px solid var(--rx-color-border);
    border-top-color: var(--rx-color-primary);
    border-radius: 50%;
    animation: rx-spin 0.75s linear infinite;
  }

  @keyframes rx-spin {
    to {
      transform: rotate(360deg);
    }
  }
}


/* =========================================================
   21. Modal / Overlay
========================================================= */

@layer components {
  .rx-overlay {
    position: fixed;
    inset: 0;
    z-index: var(--rx-z-modal);
    display: none;
    background: rgb(15 23 42 / 0.65);
    backdrop-filter: blur(8px);
  }

  .rx-overlay.is-active {
    display: block;
  }

  .rx-modal {
    position: fixed;
    inset: 50% auto auto 50%;
    z-index: calc(var(--rx-z-modal) + 1);
    width: min(100% - 2rem, 640px);
    max-height: min(90dvh, 720px);
    overflow-y: auto;
    display: none;
    transform: translate(-50%, -50%);
    padding: var(--rx-space-6);
    border: 1px solid var(--rx-color-border);
    border-radius: var(--rx-radius-2xl);
    background: var(--rx-color-surface);
    box-shadow: var(--rx-shadow-lg);
  }

  .rx-modal.is-active {
    display: block;
  }

  .rx-modal-close {
    position: absolute;
    top: var(--rx-space-4);
    right: var(--rx-space-4);
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--rx-color-bg-soft);
  }
}


/* =========================================================
   22. Tabs / Accordion
========================================================= */

@layer components {
  .rx-tabs {
    display: grid;
    gap: var(--rx-space-4);
  }

  .rx-tab-list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--rx-space-2);
    border-bottom: 1px solid var(--rx-color-border);
  }

  .rx-tab-button {
    padding: var(--rx-space-3) var(--rx-space-4);
    border-bottom: 2px solid transparent;
    color: var(--rx-color-text-muted);
    font-weight: var(--rx-font-weight-semibold);
  }

  .rx-tab-button[aria-selected="true"],
  .rx-tab-button.is-active {
    border-bottom-color: var(--rx-color-primary);
    color: var(--rx-color-primary);
  }

  .rx-tab-panel {
    display: none;
  }

  .rx-tab-panel.is-active {
    display: block;
  }

  .rx-accordion {
    display: grid;
    gap: var(--rx-space-3);
  }

  .rx-accordion-item {
    border: 1px solid var(--rx-color-border);
    border-radius: var(--rx-radius-lg);
    background: var(--rx-color-surface);
    overflow: hidden;
  }

  .rx-accordion summary {
    cursor: pointer;
    padding: var(--rx-space-4);
    color: var(--rx-color-heading);
    font-weight: var(--rx-font-weight-semibold);
  }

  .rx-accordion-body {
    padding: 0 var(--rx-space-4) var(--rx-space-4);
    color: var(--rx-color-text-muted);
  }
}


/* =========================================================
   23. Utilities
========================================================= */

@layer utilities {
  .rx-hidden {
    display: none !important;
  }

  .rx-block {
    display: block !important;
  }

  .rx-inline-block {
    display: inline-block !important;
  }

  .rx-flex {
    display: flex !important;
  }

  .rx-grid-u {
    display: grid !important;
  }

  .rx-relative {
    position: relative !important;
  }

  .rx-absolute {
    position: absolute !important;
  }

  .rx-sticky {
    position: sticky !important;
    top: var(--rx-space-4);
  }

  .rx-overflow-hidden {
    overflow: hidden !important;
  }

  .rx-overflow-auto {
    overflow: auto !important;
  }

  .rx-w-full {
    width: 100% !important;
  }

  .rx-h-full {
    height: 100% !important;
  }

  .rx-min-h-screen {
    min-height: 100dvh !important;
  }

  .rx-text-left {
    text-align: left !important;
  }

  .rx-text-center {
    text-align: center !important;
  }

  .rx-text-right {
    text-align: right !important;
  }

  .rx-text-balance {
    text-wrap: balance !important;
  }

  .rx-text-pretty {
    text-wrap: pretty !important;
  }

  .rx-text-muted {
    color: var(--rx-color-text-muted) !important;
  }

  .rx-text-soft {
    color: var(--rx-color-text-soft) !important;
  }

  .rx-text-primary {
    color: var(--rx-color-primary) !important;
  }

  .rx-text-success {
    color: var(--rx-color-success) !important;
  }

  .rx-text-danger {
    color: var(--rx-color-danger) !important;
  }

  .rx-bg-soft {
    background: var(--rx-color-bg-soft) !important;
  }

  .rx-bg-muted {
    background: var(--rx-color-bg-muted) !important;
  }

  .rx-bg-surface {
    background: var(--rx-color-surface) !important;
  }

  .rx-rounded {
    border-radius: var(--rx-radius-md) !important;
  }

  .rx-rounded-lg {
    border-radius: var(--rx-radius-lg) !important;
  }

  .rx-rounded-xl {
    border-radius: var(--rx-radius-xl) !important;
  }

  .rx-rounded-full {
    border-radius: var(--rx-radius-pill) !important;
  }

  .rx-shadow-sm {
    box-shadow: var(--rx-shadow-sm) !important;
  }

  .rx-shadow-md {
    box-shadow: var(--rx-shadow-md) !important;
  }

  .rx-shadow-lg {
    box-shadow: var(--rx-shadow-lg) !important;
  }

  .rx-m-0 {
    margin: 0 !important;
  }

  .rx-mt-0 {
    margin-top: 0 !important;
  }

  .rx-mt-4 {
    margin-top: var(--rx-space-4) !important;
  }

  .rx-mt-6 {
    margin-top: var(--rx-space-6) !important;
  }

  .rx-mt-8 {
    margin-top: var(--rx-space-8) !important;
  }

  .rx-mb-0 {
    margin-bottom: 0 !important;
  }

  .rx-mb-4 {
    margin-bottom: var(--rx-space-4) !important;
  }

  .rx-mb-6 {
    margin-bottom: var(--rx-space-6) !important;
  }

  .rx-mb-8 {
    margin-bottom: var(--rx-space-8) !important;
  }

  .rx-p-0 {
    padding: 0 !important;
  }

  .rx-p-4 {
    padding: var(--rx-space-4) !important;
  }

  .rx-p-6 {
    padding: var(--rx-space-6) !important;
  }

  .rx-p-8 {
    padding: var(--rx-space-8) !important;
  }

  .rx-gap-2 {
    gap: var(--rx-space-2) !important;
  }

  .rx-gap-4 {
    gap: var(--rx-space-4) !important;
  }

  .rx-gap-6 {
    gap: var(--rx-space-6) !important;
  }

  .rx-items-center {
    align-items: center !important;
  }

  .rx-justify-center {
    justify-content: center !important;
  }

  .rx-justify-between {
    justify-content: space-between !important;
  }

  .rx-object-cover {
    object-fit: cover !important;
  }

  .rx-aspect-video {
    aspect-ratio: 16 / 9 !important;
  }

  .rx-aspect-square {
    aspect-ratio: 1 / 1 !important;
  }

  .rx-visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    white-space: nowrap !important;
  }

  .rx-skip-link {
    position: absolute;
    top: var(--rx-space-4);
    left: var(--rx-space-4);
    z-index: var(--rx-z-max);
    transform: translateY(-150%);
    padding: var(--rx-space-3) var(--rx-space-4);
    border-radius: var(--rx-radius-md);
    background: var(--rx-color-primary);
    color: #fff;
    font-weight: var(--rx-font-weight-bold);
  }

  .rx-skip-link:focus {
    transform: translateY(0);
  }

  @media (max-width: 767px) {
    .rx-md-hidden {
      display: none !important;
    }

    .rx-md-text-center {
      text-align: center !important;
    }
  }
}


/* =========================================================
   24. Animation Utilities
========================================================= */

@layer utilities {
  .rx-fade-in {
    animation: rx-fade-in 500ms ease both;
  }

  .rx-slide-up {
    animation: rx-slide-up 520ms ease both;
  }

  .rx-scale-in {
    animation: rx-scale-in 420ms ease both;
  }

  @keyframes rx-fade-in {
    from {
      opacity: 0;
    }

    to {
      opacity: 1;
    }
  }

  @keyframes rx-slide-up {
    from {
      opacity: 0;
      transform: translateY(18px);
    }

    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  @keyframes rx-scale-in {
    from {
      opacity: 0;
      transform: scale(0.96);
    }

    to {
      opacity: 1;
      transform: scale(1);
    }
  }
}


/* =========================================================
   25. Print CSS
========================================================= */

@layer print {
  @media print {
    *,
    *::before,
    *::after {
      background: transparent !important;
      color: #000 !important;
      box-shadow: none !important;
      text-shadow: none !important;
    }

    html {
      font-size: 12pt;
    }

    body {
      background: #fff !important;
      color: #000 !important;
    }

    a,
    a:visited {
      text-decoration: underline;
    }

    img {
      max-width: 100% !important;
      page-break-inside: avoid;
    }

    pre,
    blockquote,
    table {
      page-break-inside: avoid;
    }

    h1,
    h2,
    h3 {
      page-break-after: avoid;
    }

    .rx-site-header,
    .rx-site-footer,
    .rx-sidebar,
    .rx-breadcrumbs,
    .rx-comments,
    .rx-post-navigation,
    .rx-pagination,
    .rx-btn,
    .rx-menu-toggle {
      display: none !important;
    }

    .rx-container,
    .rx-content,
    .rx-wide,
    .rx-entry {
      width: 100% !important;
      max-width: 100% !important;
    }
  }
}

Add it in functions.php like this:

wp_enqueue_style(
    'rx-global',
    get_template_directory_uri() . '/assets/css/global.css',
    array(),
    wp_get_theme()->get('Version')
);

Best next file after this is:

assets/css/theme.css

Use global.css for foundation, and theme.css for RX Theme visual design and page-specific polish.

Leave a Reply

Your email address will not be published. Required fields are marked *