:root {
  --fa-font-path: "assets/fontawesome/webfonts";

  /* Typography */
  --body-font: "Raleway", sans-serif;

  /* Compact */
  --space-2xs: 6px;
  --space-xs: 10px;
  --space-sm: 14px;
  --space-md: 18px;

  /* Section rhythm  */
  --space-0: 0px;
  --space-20: 20px;
  --space-40: 40px;
  --space-60: 60px;
  --space-80: 80px;
  --space-120: 120px;
  --space-200: 200px;

  --ring-size: 3px;
  --ring-alpha: 35%;

  /* Typography Scale */
  --font-size-base: 18px;
  --font-size-h1: 40px;
  --font-size-h2: 35px;
  --font-size-h3: 22px;
  --font-size-h4: 18px;
  --font-size-modal-h3: 32px;
  --font-size-2xl: 50px;
  --font-size-xl: 40px;
  --font-size-lg: 32px;
  --font-size-md: 28px;
  --font-size-sm: 24px;
  --font-size-xs: 20px;
  --font-size-2xs: 15px;
  --font-size-3xs: 12px;

  /* border radius */
  --radius-5: 5px;
  --radius-10: 10px;
  --radius-16: 16px;
  --radius-20: 20px;
  --radius-50: 50px;

  /* Font weight */
  --weight-400: 400;
  --weight-600: 600;
  --weight-700: 700;
  --weight-900: 900;

  /* Base Colors */
  --primary-color: #fff;
  --second-color: #000;
  --background-color: white;
  --modal-background: white;
  --text-color: black;
  --text-second-color: white;

  /* Accent Colors */
  --green: #bcd227;
  --orange: #fcad41;
  --lightorange: rgb(252, 173, 65, 0.2);
  --lightgreen: rgb(188, 210, 39, 0.2);
  --blue: #3aaade;
  --red: rgb(250, 0, 0);
  --focus-color: var(--orange);
  --error-color: var(--red);

  /* Grays */
  --lightergray: #f0f0f0;
  --lightgray: #e2e2e2;
  --gray: #555555;
  --darkgray: #292929;

  /* Sidebar */
  --sidebar-background: #444444;

  /* Table Backgrounds */
  --td-odd-background: rgba(150, 150, 150, 0.5);
  --td-even-background: #f0f0f0;

  /* Text Hover */
  --text-hover-color: #d33f00;

  /* Buttons */
  --form-border: #555555;
  --button-border: black;
  --button-text-color: black;
  --btn-ring: #fcad41;

  /* Backgrounds */
  --dev-background: #f0f0f0;
  --card-background: rgb(188, 210, 39, 0.2);
  --feature-background: #fafafa;
  --devinsights-background: #fcad41;
  --input-bg: #f0f0f0;
  --disable-background: #eee;
  --disable-border: #ddd;
  --modal-overlay-background: rgba(0, 0, 0, 0.45);

  /* Footer */
  --footer-color: gray;

  /* Alerts */
  --success-green: #d4edda;
  --danger-red: #f8d7da;
  --warning-yellow: #fff3cd;
  --info-blue: #d1ecf1;

  /* Box Shadow */
  --shadow-5: rgba(0, 0, 0, 0.05);
  --shadow-10: rgba(0, 0, 0, 0.1);
  --shadow-15: rgba(0, 0, 0, 0.15);
  --shadow-20: rgba(0, 0, 0, 0.2);
  --shadow-35: rgba(0, 0, 0, 0.35);
  --shadow-45: rgba(0, 0, 0, 0.45);

  /* Buttons */
  --btn-focus-shadow: 0 0 0 2px var(--white), 0 0 0 4px var(--btn-ring);
  --btn-focus-shadow-dark: 0 0 0 3px var(--btn-ring);
}

[data-theme="dark"] {
  /* Base Colors */
  --text-color: white;
  --text-second-color: black;
  --background-color: #22262a;
  --modal-background: #555;

  /* Forms & Buttons */
  --form-border: #ffffff;
  --button-border: white;
  --button-text-color: white;

  /* Backgrounds */
  --dev-background: #292929;
  --card-background: #292929;
  --feature-background: #292929;
  --footer-color: #f0f0f0;
  --background-light-grey: #f7f7f7;
  --background-dark-grey: #c1c1c1;
  --input-bg: #383838;
  --disable-background: #6b6b6b;
  --disable-border: #707070;

  /* Table Backgrounds */
  --td-odd-background: rgba(0, 0, 0, 0.5);
  --td-even-background: #414447;

  /* Text Hover */
  --text-hover-color: #ffa500;
}

/* Dark Theme – Image and Icon Adjustments */
[data-theme="dark"] .socials img,
[data-theme="dark"] .devinsights__item img,
[data-theme="dark"] .feature-card img,
[data-theme="dark"] .card-body svg {
  filter: invert(100%) brightness(116%);
}

/* Specific Filter for Team Images */
[data-theme="dark"] .feature-card.team img {
  filter: invert(20%) sepia(100%) saturate(0%) hue-rotate(288deg)
    brightness(100%) contrast(87%);
}

/* Dark Mode Toggle Animation */
[data-theme="dark"] .sun {
  opacity: 0;
  transform: scale(0.8);
}
[data-theme="dark"] .moon {
  opacity: 1;
  transform: scale(1.5);
}

/* Typography  */
html {
  font-size: var(--font-size-base);
}

body {
  font-family: var(--body-font);
}

h1 {
  font-size: var(--font-size-h1);
}

h2 {
  font-size: var(--font-size-h2);
}

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

.modals h3 {
  font-size: var(--font-size-lg);
}

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

input,
textarea,
select,
input::placeholder,
textarea::placeholder {
  font-size: var(--font-size-xs);
}

.sidebar-menu-toggle,
.carousel-card .subheading,
.carousel-controls i,
.timeline-navigation i {
  font-size: var(--font-size-md);
}

.timeline-container .event {
  font-size: var(--font-size-2xs);
}

/*** Font weight ***/
h6,
h5,
h4,
h3 {
  font-weight: var(--weight-600);
}

h2,
h1 {
  font-weight: var(--weight-700);
}

.fa-solid {
  font-family: "Font Awesome 6 Free";
  font-weight: var(--weight-900);
}
.fa-regular {
  font-family: "Font Awesome 6 Free";
  font-weight: var(--weight-400);
}
.fa-brands {
  font-family: "Font Awesome 6 Brands";
  font-weight: var(--weight-400);
}

/*** Border radius ***/
.pill,
.dark-mode-toggle,
.sun,
.moon {
  border-radius: var(--radius-50);
}

.button-pill,
.rounded,
.modal-box {
  border-radius: var(--radius-20);
}

/*** Outline ***/
a:focus-visible,
.button-secondary:focus-visible,
.button:disabled:focus-visible,
.sidebar-menu-toggle:focus-visible,
.dropdown .dropbtn:focus-visible,
.dropbtn:focus-visible,
[role="tab"]:focus-visible,
.event:focus-visible,
.timeline-navigation i:focus-visible,
.ss-arrow:focus-visible,
.slideshow-bullet-controls .dot:focus-visible,
.accordion-title [role="button"]:focus-visible {
  outline: 2px solid var(--btn-ring);
  outline-offset: 3px;
}

.checkbox input:focus-visible ~ .checkmark,
.radio input:focus-visible ~ .checkmark {
  outline: 3px solid var(--orange);
  outline-offset: 2px;
}

/*** Background ***/
.modal-overlay {
  background: var(--modal-overlay-background);
}
body,
option,
.accordion-content,
.dropdown-content {
  background: var(--background-color);
}

.accordion-title,
.cards,
.tab-nav,
.tab-nav-active,
.code-example {
  background-color: var(--modal-background);
}

tbody tr:nth-child(odd) {
  background: var(--td-odd-background);
}

thead th,
tbody tr:nth-child(even) {
  background: var(--td-even-background);
}

.sidebar {
  background: var(--sidebar-background);
}

.radio input:disabled ~ .checkmark,
.checkbox input:disabled ~ .checkmark {
  background: var(--disable-background);
}

.button:hover {
  background: var(--text-color);
}

.input-toggle :is(input, textarea):disabled,
.input-form-controls select:disabled {
  background: var(--disable-background, transparent);
}

.input-toggle :is(input, textarea)[readonly] {
  background: var(--input-bg);
}

.radio input:checked ~ .checkmark,
.checkbox input:checked ~ .checkmark,
.checkbox.rounded input:checked ~ .checkmark {
  background: var(--focus-color);
}

.modal-content,
.modal-box,
.modal-box.scroll {
  background: var(--modal-background);
}

.dismissable-alert-banner.success,
.alert-banner.success {
  background: var(--success-green);
}
.dismissable-alert-banner.danger,
.alert-banner.danger {
  background: var(--danger-red);
}
.dismissable-alert-banner.warning,
.alert-banner.warning {
  background: var(--warning-yellow);
}
.dismissable-alert-banner.info,
.alert-banner.info {
  background: var(--info-blue);
}

.sun,
.dark-mode-toggle,
.radio input:checked ~ .checkmark::after,
.timeline-container .event {
  background: var(--primary-color);
}

.moon,
.button,
.paginations a.active,
.paginations-nav a.active,
.condensed-paginations a.active,
.modal-box.scroll ::-webkit-scrollbar-thumb {
  background: var(--orange);
}

.scrollable-table tr th:first-child,
.scrollable-table tr td:first-child,
.do {
  background: var(--gray);
}

.dot.active,
.carousel-card,
.tab-nav-active button.active,
.topnav .dropdown.open,
.dropdown-content a:hover,
.sidenav-dropdown-content a:hover,
.active-sidenav a.active,
.active-topnav a.active,
.timeline-container .event::before,
.timeline-container .individual-timeline::after,
.timeline-container .event::after,
.timeline-container .individual-timeline.active .event {
  background: var(--blue);
}

.scrollable-table::-webkit-scrollbar-thumb {
  background: var(--background-dark-grey);
}

.modal-overlay.fullscreen {
  background: var(--shadow-10);
}

.button[disabled] {
  background: none;
}

.button:focus-visible {
  box-shadow: var(--btn-focus-shadow);
}
.dark .button:focus-visible {
  box-shadow: var(--btn-focus-shadow-dark);
}

/*** Text ***/
h6,
h5,
h4,
h3,
h2,
h1,
p,
a,
input,
textarea,
select,
input::placeholder,
textarea::placeholder,
.button:disabled,
.button[aria-disabled="true"],
.btn-secondary.button,
table th,
table td,
.input-number::after,
.input-number::before,
.input-form-body::after,
.input-toggle :is(input, textarea)[readonly],
.input-toggle button,
.standard-modals,
.feature-modals,
.confirmation-modals,
.full-screen-modals,
.close-btn,
.search-wrapper i,
ul.breadcrumb li,
ul.clickable-breadcrumb li,
ul.collapsed-breadcrumb li,
nav.breadcrumb ol li,
nav.clickable-breadcrumb ol li,
nav.collapsed-breadcrumb ol li,
ul.breadcrumb.slashes li + li:before,
ul.clickable-breadcrumb.slashes li + li:before,
ul.collapsed-breadcrumb.slashes li + li:before,
nav.breadcrumb.slashes ol li + li:before,
nav.clickable-breadcrumb.slashes ol li + li:before,
nav.collapsed-breadcrumb.slashes ol li + li:before,
ul.breadcrumb.arrow li + li:before,
ul.clickable-breadcrumb.arrow li + li:before,
ul.collapsed-breadcrumb.arrow li + li:before,
nav.breadcrumb.arrow ol li + li:before,
nav.clickable-breadcrumb.arrow ol li + li:before,
nav.collapsed-breadcrumb.arrow ol li + li:before,
.collapsed-breadcrumb .ellipsis span,
.dropdown .dropbtn,
.sidenav-dropdown .dropbtn,
.tab-nav button,
.tab-nav-active button,
.cards,
.carousel-controls i:hover,
.timeline-navigation i:hover,
#timeline-paragraph-container-one .sub-paragraph,
#timeline-paragraph-container-two .sub-paragraph,
#timeline-paragraph-container-three .sub-paragraph,
.ss-arrow,
.accordion-title .button-text,
.accordion-content,
.code-example {
  color: var(--text-color);
}

.button:hover {
  color: var(--text-second-color);
}
.input-toggle :is(input, textarea)[aria-invalid="true"]::placeholder,
.input-toggle :is(input.error, textarea.error)::placeholder {
  color: var(--error-color);
}

.sidebar,
.sidebar-nav ul li a,
.sidebar-menu-toggle,
.scrollable-table tr th:first-child,
.scrollable-table tr td:first-child,
.dropdown-content a:hover,
.topnav .dropdown.open .dropbtn,
.active-topnav a.active,
.active-sidenav a.active,
.sidenav-dropdown-content a:hover,
.topnav .dropdown.open button,
.tab-nav-active button.active,
.paginations a.active,
.paginations-nav a.active,
.condensed-paginations a.active,
.carousel-card,
.carousel-card .subheading,
.timeline-container .individual-timeline.active .event,
.timeline-container .event-text .subheading {
  color: var(--primary-color);
}

.button,
.dismissable-alert-banner,
.alert-banner,
.alerts p,
.alert-banner .button-text {
  color: var(--second-color);
}

.input small {
  color: var(--red);
}

.standard-modals p:hover,
.close-btn:hover,
.tab-nav button:hover,
.carousel-controls i:hover,
.ss-arrow:hover {
  color: var(--orange);
}

.success-icon,
.carousel-controls i,
.timeline-container .event,
.timeline-navigation i,
#timeline-paragraph-container-one .subheading,
#timeline-paragraph-container-two .subheading,
#timeline-paragraph-container-three .subheading {
  color: var(--blue);
}

.condensed-paginations .ellipsis {
  color: var(--lightgray);
}

/*** Border ***/
.dot,
input,
textarea,
select,
.checkbox .checkmark,
.radio .checkmark,
.tab-nav,
.tab-nav-active,
.cards,
.accordion-title,
.accordion.open .accordion-content,
.code-example {
  border: 1px solid var(--form-border);
}

.modal-box,
.checkbox .checkmark,
.radio .checkmark {
  border: 2px solid var(--form-border);
}

.scrollable-table tr th:first-child,
.scrollable-table tr td:first-child {
  border-bottom: 1px solid var(--primary-color);
}

.border-bottom,
.input-toggle .border-bottom,
.input-toggle .underline,
.input-form-controls .border-bottom,
table th,
table td {
  border-bottom: 2px solid var(--form-border) !important;
}

.accordion.border-bottom {
  border-bottom: 1px solid var(--text-color);
}

.button {
  border: 1px solid var(--second-color);
}

.checkbox input:checked ~ .checkmark::after {
  border: solid var(--primary-color);
}

.button:hover,
.btn-secondary,
.button[disabled] {
  border: 1px solid var(--orange) !important;
}

.click-loading-spinner {
  border: 3px solid var(--gray);
  border-top: 3px solid var(--primary-color);
}

.topnav,
.sidenav,
.dropdown-content,
.timeline-container .individual-timeline.active .event,
.timeline-container .event {
  border: 1px solid var(--blue);
}

.input-toggle :is(input, textarea):is(:focus, :focus-visible, :active),
.input-form-controls select:is(:focus, :focus-visible, :active),
.radio input:checked ~ .checkmark,
.checkbox input:checked ~ .checkmark,
.checkbox.rounded input:checked ~ .checkmark {
  border-color: var(--focus-color);
}

.input-toggle
  :is(.underline, .border-bottom):is(:focus, :focus-visible, :active) {
  border-bottom-color: var(--focus-color) !important;
}

.input-toggle :is(input, textarea)[aria-invalid="true"],
.input-form-controls select[aria-invalid="true"],
.input-toggle :is(input.error, textarea.error),
.input-form-controls :is(select).error {
  border-color: var(--error-color);
}

.input-toggle :is(input.underline, .border-bottom)[aria-invalid="true"],
.input-toggle :is(input.underline.error, .border-bottom.error) {
  border-bottom: 2px solid var(--error-color) !important;
}

.input-toggle :is(input, textarea):disabled,
.input-form-controls select:disabled,
.radio input:disabled ~ .checkmark,
.checkbox input:disabled ~ .checkmark {
  border-color: var(--disable-border);
}

.modal-box.scroll ::-webkit-scrollbar-thumb {
  border: 1px solid var(--background-dark-grey);
}

ul.breadcrumb,
ul.clickable-breadcrumb,
ul.collapsed-breadcrumb,
nav.breadcrumb ol,
nav.clickable-breadcrumb ol,
nav.collapsed-breadcrumb ol {
  border: 1px solid var(--text-color);
}

/*** Hover ***/
tbody tr:hover td {
  color: var(--text-hover-color);
}

a:hover,
.sidebar-nav ul li a:hover,
.sidebar-link.active {
  color: var(--orange);
}

/*** Fill ***/
.sun {
  fill: var(--orange);
}

.moon {
  fill: var(--primary-color);
}

.table td.highlight,
.table th.highlight {
  color: var(--orange);
  font-weight: 600;
  transition: background-color 0.2s ease;
}

/** Mobile **/
@media (max-width: 1060px) {
  .button:disabled .button-text {
    font-size: var(--font-size-s);
  }
}

@media (max-width: 991px) {
  h1 {
    font-size: var(--font-size-md);
  }

  h2,
  .modals h3 {
    font-size: var(--font-size-sm);
  }

  h3 {
    font-size: var(--font-size-base);
  }

  .testimonial-text p,
  .carousel-controls i {
    font-size: var(--font-size-xs);
  }

  .tab-nav button,
  .tab-nav-active button {
    border-bottom: 1px solid var(--text-color);
  }
}

@media (max-width: 320px) {
  .timeline-navigation i,
  .carousel-navigation i,
  #timeline-paragraph-container-one .sub-paragraph,
  #timeline-paragraph-container-two .sub-paragraph,
  #timeline-paragraph-container-three .sub-paragraph,
  .carousel-card .subheading,
  .carousel-controls i {
    font-size: var(--font-size-s);
  }
}
