@layer base {

  :root,
  [data-color-mode="light"] {
    --primary-color: #19387c;
    --primary-color-rgb: 25, 56, 124;
    --secondary-color: #009966;
    --secondary-color-rgb: 0, 153, 102;
    /* --accent-color: #f4c20d;
    --accent-color: #00cccc;
    --accent-color: #ff5e57; */
    --accent-color: #ff9933;
    --accent-color-rgb: 255, 153, 51;
    --alt-color: #013243;
    --alt-color-rgb: 1, 50, 67;
    /* --color-prop-1: #xxx;
    --color-prop-n: #xxx; */
    --body-font: "Roboto", sans-serif;
    /* --heading-font: "Merriweather", serif; */
    --heading-font: "Montserrat", sans-serif;
    --menu-font: var(--heading-font);
    --breakpoint-min: 414;
    --breakpoint-max: 1200;
    --breakpoint-range: calc(var(--breakpoint-max) - var(--breakpoint-min));
    --breakpoint-diff: calc(100vw - (var(--breakpoint-min) * 1px));
    --fs-large-banner: clamp(2rem,
        calc((16 * 4) * (var(--breakpoint-diff) / var(--breakpoint-range))),
        4rem);
    --fs-title: clamp(1.75rem,
        calc((16 * 2.75) * (var(--breakpoint-diff) / var(--breakpoint-range))),
        2.75rem);
    --fs-small-banner: clamp(1.3125rem,
        calc((16 * 2) * (var(--breakpoint-diff) / var(--breakpoint-range))),
        2rem);
    --fs-sub-title: clamp(1.25rem,
        calc((16 * 1.5) * (var(--breakpoint-diff) / var(--breakpoint-range))),
        1.5rem);
    --fs-caption: clamp(1.1875rem,
        calc((16 * 1.25) * (var(--breakpoint-diff) / var(--breakpoint-range))),
        1.25rem);
    --fs-lead: 1.125rem;
    --fs-text: 1rem;
    --fs-small: 0.875rem;
    --button-padding-y: clamp(0.25rem,
        calc((16 * 0.5) * (var(--breakpoint-diff) / var(--breakpoint-range))),
        0.5rem);
    --button-padding-x: clamp(0.75rem,
        calc((16 * 1) * (var(--breakpoint-diff) / var(--breakpoint-range))),
        1rem);
    --border-roundness: clamp(0.5rem,
        calc((16 * 1) * (var(--breakpoint-diff) / var(--breakpoint-range))),
        1rem);
    --top-bar-height: 0;
    --menu-height: 0;
    --body-color: #636363;
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--menu-height) + 16px);
  }

  [data-color-mode="dark"] {
    --body-color: #dddddd;
    /* --primary-color: color-mix(in srgb,
                rgb(var(--primary-color-rgb)) 100%,
                white 25%); */
  }

  /* =====================
    SECTION: Resets
    ====================== */
  body {
    font-family: var(--body-font);
    color: var(--body-color);
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    background: rgba(var(--secondary-color-rgb), 0.025);
    position: relative;
    overflow-x: hidden;
  }

  :is(h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6) {
    font-family: var(--heading-font);
    font-weight: 600;
  }

  :is(ul, ol):not([role="list"]) {
    list-style: none;
    padding-inline-start: 0;
    margin-bottom: 0;
  }

  :is(ul, ol)[role="list"]>li {
    margin-block-end: 0.5rem;
  }

  :is(ul, ol)[style*="--list-margin"]>li {
    margin-block-end: var(--list-margin);
  }

  :is(ul, ol)[style*="--list-marker"]>li::marker {
    content: var(--list-marker);
  }

  img {
    max-width: 100%;
  }

  a:not([class]) {
    text-decoration: none;
    color: inherit;
  }

  p {
    line-height: 1.6em;
  }
}

@layer utilities {

  /* =====================
    SECTION: Helpers
    ====================== */
  .sc_py {
    padding-block: clamp(2rem, calc(2rem + 1.5vw), 3.5rem);
  }

  .sc_pt {
    padding-block-start: clamp(2rem, calc(2rem + 1.5vw), 3.5rem);
  }

  .sc_pb {
    padding-block-end: clamp(2rem, calc(2rem + 1.5vw), 3.5rem);
  }

  [class*="color-"] {
    --text-opacity: 1;
  }

  .color-primary {
    color: rgba(var(--primary-color-rgb), var(--text-opacity)) !important;
  }

  .color-secondary {
    color: rgba(var(--secondary-color-rgb), var(--text-opacity)) !important;
  }

  .color-accent {
    color: rgba(var(--accent-color-rgb), var(--text-opacity)) !important;
  }

  .color-alt {
    color: rgba(var(--alt-color-rgb), var(--text-opacity)) !important;
  }

  [class*="background-"] {
    --bg-opacity: 1;
  }

  .background-primary {
    background: rgba(var(--primary-color-rgb), var(--bg-opacity)) !important;
  }

  .background-secondary {
    background: rgba(var(--secondary-color-rgb), var(--bg-opacity)) !important;
  }

  .background-accent {
    background: rgba(var(--accent-color-rgb), var(--bg-opacity)) !important;
  }

  .sticky-lg-top,
  .sticky-top {
    top: -1px;
  }

  .sticky-padding {
    top: var(--menu-height);
  }

  .hidden {
    display: none;
  }

  /* =====================
    SECTION: Typography
    ====================== */
  .text-justify {
    text-align: justify;
  }

  .line-clamp {
    overflow: hidden;
    display: -webkit-box;
    line-clamp: 7;
    -webkit-line-clamp: 7;
    -webkit-box-orient: vertical;
  }

  .section__title {
    color: var(--primary-color);
    font-size: var(--fs-title);
    font-family: var(--heading-font);
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.33em;
  }

  .text-banner {
    font-weight: 700;
    font-family: var(--heading-font);
    font-size: var(--fs-large-banner);
  }

  .text-title {
    font-weight: 700;
    font-family: var(--heading-font);
    font-size: var(--fs-title);
  }

  .text-heading {
    font-weight: 700;
    font-family: var(--heading-font);
    font-size: var(--fs-small-banner);
  }

  .text-heading-2 {
    font-weight: 600;
    font-family: var(--heading-font);
    font-size: var(--fs-sub-title);
  }

  .text-caption {
    font-size: var(--fs-caption);
    font-weight: 500;
  }

  .text-lead {
    font-size: var(--fs-lead);
    font-weight: 500;
    margin-bottom: 0.33em;
  }

  .text-wrap-pretty {
    text-wrap: pretty;
  }

  .text-wrap-balance {
    text-wrap: balance;
  }

  .sublist-increment {
    counter-reset: item;
  }

  .sublist-increment>li::before {
    counter-increment: item;
    content: counter(item) " ";
    margin-inline-start: -4px;
  }

  /* =====================
      SECTION: Extras
      ====================== */
  .form-honeypot {
    position: absolute;
    top: 0;
    left: 0;
    height: 0;
    width: 0;
    opacity: 0;
    z-index: -1;
  }

  .pattern-text {
    display: none;
    font-size: 9pt;
  }

  .pattern-error+.pattern-text {
    display: block;
  }

}

@layer components {

  /* =====================
    SECTION: Toggle Color Mode
    ====================== */
  .colorModeSwitch {
    position: fixed;
    left: 0;
    bottom: 0;
    z-index: 11;
    padding-bottom: 1rem;
  }

  #modeSwitchButton {
    --sun-color: var(--bs-orange);
    --moon-color: var(--bs-light);
    position: relative;
    isolation: isolate;
    display: inline-flex;
    padding: 0 0.25rem;
    border-radius: 50vw;
    border: 1px solid var(--bs-border-color);
  }

  #modeSwitchButton label {
    display: inline-flex;
    padding: 0.25rem;
    line-height: 1;
    cursor: pointer;
  }

  #modeSwitchButton .toggleColorIcons {
    display: inline-flex;
    flex-direction: row;
    column-gap: 0.5em;
    position: relative;
    font-size: small;
  }

  #modeSwitchButton .toggleColorIcons::before {
    content: "";
    position: absolute;
    width: 1.25em;
    height: 1.25em;
    background: var(--sun-color);
    border-radius: 50%;
    top: 50%;
    left: -2px;
    transform: translateY(-50%);
    transition: 250ms ease-out;
  }

  #modeSwitchButton input:checked+label .toggleColorIcons::before {
    background: var(--moon-color);
    left: 50%;
  }

  #modeSwitchButton .toggleColorIcons i[class*="sun"] {
    color: var(--sun-color);
  }

  #modeSwitchButton label span i[class*="moon"] {
    color: var(--moon-color);
  }

  /* =====================
      SECTION: Scroll Top
      ====================== */
  .scrollToTop {
    position: fixed;
    bottom: 4rem;
    right: 1rem;
    background-color: rgba(var(--secondary-color-rgb), 0.5);
    color: var(--bs-light);
    border: none;
    border-radius: 50%;
    padding: 1rem;
    line-height: 1;
    z-index: -1;
    transform: translateY(1rem);
    opacity: 0;
    transition: 500ms ease-in-out 150ms;
  }

  .scrollToTop.show {
    z-index: 1111;
    transform: translateY(0);
    opacity: 1;
  }

  /* =====================
    SECTION: FORM
    ====================== */
  input::placeholder {
    opacity: 0.5;
  }

  .form-control:focus,
  .form-select:focus {
    box-shadow: none;
  }

  #txEditor :is(ul, ol) {
    list-style: revert;
    padding: revert;
  }

  :user-invalid~.invalid-feedback,
  :user-invalid~.invalid-tooltip,
  .is-invalid~.invalid-feedback,
  .is-invalid~.invalid-tooltip,
  .was-validated :invalid~.invalid-feedback,
  .was-validated :invalid~.invalid-tooltip {
    display: revert;
  }

  .input-file-browser {
    padding: 1rem;
    border: 2px dashed var(--bs-secondary);
    border-radius: 0.25rem;
    text-align: center;
    position: relative;
    isolation: isolate;
  }

  .input-file-browser+input {
    height: 1px;
    opacity: 0;
    pointer-events: none;
    padding: 0;
  }

  .input-file-browser.invalid {
    border: 2px dashed var(--bs-danger);
  }

  .input-file-browser.valid {
    border: 2px dashed var(--bs-success);
  }

  .input-file-browser.hover .file-upload {
    opacity: 0.5;
  }

  .input-file-browser .file-upload {
    background: rgba(var(--bs-dark-rgb), 0.05);
    padding: 0.5rem;
    border-radius: 0.25rem;
  }

  .input-file-browser .file-upload_icons {
    font-size: 1.5rem;
    color: #bbb;
  }

  .input-file-browser .file-upload_icons .bi-cloud-upload-fill {
    font-size: 3rem;
  }

  .input-file-browser .file-upload_icons .bi-file-earmark-pdf-fill::before {
    transform: rotate(-25deg);
  }

  .input-file-browser .file-upload_icons .bi-file-earmark-image-fill::before {
    transform: rotate(5deg);
  }

  .input-file-browser p {
    margin-bottom: 0.25rem;
  }

  .input-file-browser button {
    border: none;
  }

  .input-file-browser .file-display {
    display: none;
  }

  .input-file-browser .file-display.visible {
    position: relative;
    z-index: 1;
    display: flex;
    row-gap: 0.5rem;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
  }

  .input-file-browser .file-display .file-display_buttons {
    flex-shrink: 0;
  }

  .input-file-browser .file-display button {
    border-radius: 0.25rem;
  }

  .input-file-browser .file-display button i {
    font-size: 1.5rem;
    padding-inline: 1rem;
  }

  .input-file-browser .file-display button.changeUpload {
    background: linear-gradient(315deg, #6aab76, #d9e5d2);
    color: #fff;
  }

  .input-file-browser .file-display button.changeUpload i {
    background: linear-gradient(315deg, #ffffff, #f3f9f5);
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
  }

  .input-file-browser .file-display button.cancelUpload {
    background: var(--bs-danger);
    color: var(--bs-light);
  }

  .input-file-browser .file-error {
    color: var(--bs-danger);
    font-size: var(--fs-small);
  }

  .input-file-browser .file-error:not(:empty) {
    margin-top: 0.5rem;
  }

  /* =====================
      SECTION: Lightbox
      ====================== */
  [data-lightbox-target] {
    cursor: pointer;
  }

  .lightbox__container .modal-body {
    padding: 0;
  }

  .lightbox__container .lightbox__controls {
    position: fixed;
    width: 100%;
    top: 0;
    background: var(--bs-dark);
    padding: 0.25rem;
    display: flex;
    justify-content: end;
    z-index: 1;
  }

  .lightbox__container .carousel-control-prev,
  .lightbox__container .carousel-control-next {
    mix-blend-mode: difference;
  }

  .lightbox__container .carousel-indicators {
    bottom: -1.5rem;
    background: rgb(0 0 0 / 65%);
    border-radius: 50vw;
    margin: 0;
  }

  .lightbox__container .carousel-indicators [data-bs-target] {
    background-color: #fafafa;
  }

  .lightbox__container .carousel-control-next-icon,
  .lightbox__container .carousel-control-prev-icon {
    filter: none;
  }

  .lightbox__container :is(img, video, iframe) {
    max-height: 80svh;
    object-fit: contain;
    display: block;
    margin-inline: auto;
    max-width: 100%;
  }

  /* =====================
      SECTION: Date Picker
      ====================== */
  .date-picker {
    position: absolute;
    border: 1px solid var(--bs-border-color);
    background: var(--bs-body-bg);
    padding: var(--bs-border-radius);
    box-shadow: var(--bs-box-shadow);
    border-radius: var(--bs-border-radius);
    text-align: center;
    z-index: 11;
  }

  .date-picker--content {
    width: 320px;
  }

  .date-picker--days,
  .date-picker--dates {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    grid-template-rows: auto;
    gap: 0.25rem;
  }

  .date-picker--days {
    margin-bottom: 0.5rem;
  }

  .date-picker--days span {
    font-weight: 500;
    background: var(--bs-tertiary-bg);
    border-radius: 0.25rem;
  }

  .date-picker--dates span {
    aspect-ratio: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    border-radius: 0.25rem;
  }

  .date-picker--past,
  .date-picker--future {
    opacity: 0.325;
  }

  .date-picker--disabled {
    opacity: 0.325;
    cursor: not-allowed;
    pointer-events: none;
  }

  .date-picker--months {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: auto;
    gap: 0.25rem;
  }

  .date-picker--months span {
    padding: 0.5rem;
    cursor: pointer;
    background: var(--bs-tertiary-bg);
    border-radius: 0.25rem;
  }

  .date-picker--years {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: auto;
    gap: 0.25rem;
  }

  .date-picker--years span {
    padding: 1rem;
    cursor: pointer;
    background: var(--bs-tertiary-bg);
    border-radius: 0.25rem;
  }

  .date-picker .selected {
    background-color: var(--primary-color);
    color: #fff;
  }

  .date-picker .selected.muted {
    background-color: var(--bs-secondary-bg);
    color: revert;
  }

  .date-picker .navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
  }

  .date-picker .navigation button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2em;
  }

  .date-picker .navigation span {
    cursor: pointer;
    font-size: 1.2em;
  }

  /* ==================> 
  SEGMENTED INPUT
  <================== */
  .segmented__input {
    text-align: center;
  }

  .segmented__input input {
    border: 2px solid lightgrey;
    border-radius: 0.25rem;
    line-height: 2;
    font-size: 2.5rem;
    width: 3ch;
    min-height: 4ch;
    text-align: center;
  }

  .segmented__input input:focus {
    border-color: #0084ff;
  }

  .segmented__input.invalid input,
  .segmented__input.invalid input:focus {
    border-color: #d40f0f;
  }

  .segmented__input.valid input,
  .segmented__input.valid input:focus {
    border-color: #07a722;
  }

  /* ==================> 
  RANGE SLIDER
  <================== */

  .range-slider {
    position: relative;
    width: 100%;
  }

  .range-slider-track {
    position: absolute;
    width: 100%;
    height: 5px;
    background: #ddd;
    border-radius: 5px;
  }

  .range-slider-indicator {
    position: absolute;
    height: 5px;
    background: var(--primary-color);
    border-radius: 5px;
  }

  .range-slider input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 5px;
    background: transparent;
    outline: none;
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: none;
  }

  .range-slider input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: var(--primary-color);
    cursor: pointer;
    pointer-events: auto;
    border-radius: 50%;
    position: relative;
    z-index: 2;
    outline: 1px solid var(--secondary-color);
  }

  .range-slider input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: var(--primary-color);
    cursor: pointer;
    pointer-events: auto;
    border-radius: 50%;
    position: relative;
    z-index: 2;
    outline: 1px solid var(--secondary-color);
  }

  /* =====================
    SECTION: Scroller
    ====================== */

  #scroller {
    display: flex;
    column-gap: 4rem;
    width: max-content;
  }

  #scroller .scroll-items {
    --scroll-seperator: "|";
    --scroll-gap: 1rem;
    display: flex;
    column-gap: var(--scroll-gap);
    width: max-content;
    color: var(--secondary-color);
  }

  #scroller .scroll-items .scroll-item {
    flex: 1 0 auto;
    font-size: 1rem;
    position: relative;
  }

  #scroller .scroll-items .scroll-item:not(:last-child):after {
    content: var(--scroll-seperator);
    position: absolute;
    color: var(--bs-body-color);
    margin-inline-start: calc(var(--scroll-gap) * 0.25);
  }

  #scroller .scroll-items .scroll-item a {
    color: var(--secondary-color);
    letter-spacing: 0.75px;
  }


  /* =====================
      SECTION: Ticker
      ====================== */
  #ticker {
    --ticker-background: var(--bs-body-bg);
    position: relative;
    background: var(--ticker-background);
    padding: 1rem;
  }

  #ticker .ticker-controls>* {
    position: absolute;
    width: 3rem;
    aspect-ratio: 1;
    left: 50%;
    background: var(--ticker-background);
    border: none;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    font-size: 1.5rem;
  }

  #ticker .ticker-controls .ticker-prev {
    top: 0;
    transform: translate(-50%, -50%);
    align-items: start;
  }

  #ticker .ticker-controls .ticker-next {
    bottom: 0;
    transform: translate(-50%, 50%);
    align-items: end;
  }

  #ticker .ticker-wrapper {
    overflow: hidden;
    position: relative;
    height: 3rem;
    /* Adjust based on your content */
  }

  #ticker .ticker-items {
    display: flex;
    flex-direction: column;
    transition: transform 0.6s ease-in-out;
  }

  #ticker .ticker-item {
    padding: 0.5rem 0;
    /* display: none; */
  }

}