:root {
  --body-bg: #f8fafc;
  --base-color: #ffffff;
  --base-variant: #e8e9ed;
  --text-color: #111528;
  --secondary-text: #232738;
  --secondary-color: #3a435d;
  --accent-color: #0071ff;
  --accent-hover: #1e4fcb;
  --border-light: #e5e7eb;
  --border-strong: #d1d5db;
  /* Tables */
  --table-header-bg: #f1f3f5;
  --table-header-text: #212529;
  --table-row-even-bg: #ffffff;
  --table-row-odd-bg: #f8f9fa;
  --table-row-hover-bg: #ebf2ff;
  --table-border: #dee2e6;
  /* Header and Footer */
  --header-bg: #e3f2ff;
  --header-text: #0b1e3a;
  --footer-bg: #d9e8ff;
  --footer-text: #2c3e50;
  /* Theme */
  --theme: #0d1f3f;
  /* GREEN AND RED */
  --green: #16a34a;
  --red: #dc2626;

  /* SHADOW */
  --shadow: rgba(0, 0, 0, 0.24);
  /* Cards */
  --card-title: var(--accent-color);
  /* Search */
  --search-background: #ffffff;
  --search-text: #555555;
}

.darkmode {
  --body-bg: #0f172a;
  --base-color: #070b1d;
  --base-variant: #101425;
  --text-color: #ffffff;
  --secondary-text: #cccccc;
  --secondary-color: #3a435d;
  --accent-color: #0071ff;
  --border-light: #2d3748;
  --border-strong: #334155;
  /* Tables */
  --table-header-bg: #0d122a;
  --table-header-text: #e6e8ef;
  --table-row-even-bg: #0a0f24;
  --table-row-odd-bg: #0e142d;
  --table-row-hover-bg: #132447;
  --table-border: #1a2036;
  /* Header and Footer */
  --header-bg: #0a0f24;
  --header-text: #e6e8ef;
  --footer-bg: #050a18;
  --footer-text: #a5a8b5;
  /* Theme */
  --theme: #ffffff;
  /* GREEN AND RED */
  --green: #22c55e;
  --red: #ef4444;

  /* SHADOW */
  --shadow: rgba(0, 255, 255, 0.24);
  /* Cards */
  --card-title: #4ea1ff;
  /* Search */
  --search-background: #1e293b;
  --search-text: #94a3b8;
}

/* GENERAL RULES START */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Rubik", Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
}

html {
  font-size: 62.5%;
  scroll-behavior: smooth;
}

body {
  background: var(--body-bg);
}

.heading-secondary {
  font-size: 2.4rem;
  margin-bottom: 1.6rem;
  color: var(--text-color);
}

h3 {
  font-size: 1.6rem;
}

section {
  margin-bottom: 4.8rem;
}

/* GENERAL RULES END */

#header {
  background: var(--header-bg);
  color: var(--header-text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2.8rem 4.8rem;
}

header p {
  margin-bottom: 0;
}

main {
  width: 100%;
  display: flex;
  justify-content: center;
  gap: 1.2rem;
  padding: 1.6rem;
}

.container {
  max-width: 90rem;
  margin: auto;
  padding: 0;
}

.ads {
  /* background: var(--body-bg); */
  /* background-color: red; */
  font-size: 1.6rem;
  color: var(--footer-text);
}

.mid-ad {
  display: none;
}

.side-ad {
  max-width: 20rem;
  flex-shrink: 5;
  height: 80vh;
  position: sticky;
  top: 1.6rem;
  width: auto;
}

.nav-wrapper {
  display: grid;
  grid-template-columns: auto auto;
  justify-content: center;
  align-items: flex-end;
}

.navigation {
  font-size: 1.8rem;
  display: flex;
  align-items: flex-end;
  position: relative;
}
.navigation .link {
  margin-right: 2.4rem;
  text-decoration: none;
  color: var(--text-color);
  font-weight: 400;
  display: grid;
  grid-template-columns: auto auto auto;
  align-items: flex-end;
  gap: 0.4rem;
  justify-content: flex-start;
}

.navigation svg {
  width: 2.4rem;
  height: 2.4rem;
  align-self: flex-start;
  fill: var(--text-color);
}

.navigation .link .caret {
  align-self: flex-end;
  margin-bottom: -0.4rem;
}

.navigation .link span {
  margin-bottom: -0.2rem;
  display: inline-block;
  align-self: flex-end;
}

.navigation a:hover {
  cursor: pointer;
  transform: scale(1.05);
}

.jobs-main {
  position: relative;
  cursor: pointer;
}

.jobs-dropdown {
  position: absolute;
  top: 160%;
  left: 10%;
  background: var(--base-color);
  box-shadow: rgba(0, 0, 0, 0.12) 0px 2px 6px, rgba(0, 0, 0, 0.24) 0px 2px 6px;
  z-index: 1000;
  padding: 1.2rem 2.4rem;
  border-radius: 0.8rem;
  display: none;
  transition: 0.4s;
}

.jobs-dropdown a {
  text-decoration: none;
  display: flex;
  gap: 1.2rem;
  align-items: flex-end;
  color: var(--text-color);
  margin: 1.2rem 0;
  justify-content: center;
}

.jobs-dropdown a span {
  flex: 1;
  text-wrap: nowrap;
}

.logo {
  display: flex;
  align-items: baseline;
  font-size: 3rem;
}
.logo svg {
  width: auto;
  height: 5rem;
  fill: var(--accent-color);
}

.logo p {
  font-size: 3rem;
  margin-left: 1rem;
  font-family: "Rubik Mono One", sans-serif;
  color: var(--text-color);
}

.logo .job {
  color: var(--accent-color);
  font-family: "Rubik Mono One", sans-serif;
}

.job {
  color: var(--accent-color);
}

.logo .news {
  font-size: 2rem;
  color: var(--red);
  font-family: "Rubik Mono One", sans-serif;
}

.theme-switcher {
  width: 4.8rem;
  height: 4.8rem;
  padding: 1.2rem;
  border-radius: 50%;
  background: var(--theme);
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: -1.2rem;
  cursor: pointer;
}

.theme-switcher svg {
  fill: var(--base-color);
}

/* Footer */
#footer {
  background: var(--footer-bg);
  color: var(--footer-text);
  font-size: 1.6rem;
  padding: 2.8rem 4.8rem;
  text-align: center;
  line-height: 1.6;
}

/* MENU */
.hamburger {
  position: absolute;
  left: 4.8rem;
  display: none;
  margin-bottom: -1.2rem;
  cursor: pointer;
}

.hamburger svg {
  width: auto;
  height: 4rem;
  fill: var(--text-color);
}

.hamburger .x-mark {
  display: none;
}

.sticky-ad-container {
  position: sticky;
  bottom: 0;
  max-width: 90rem;
  margin: auto;
  transition: 0.4s ease-in;
  border: solid 0.1rem var(--border-strong);
}

.sticky-ad-close,
.language-close {
  width: 2.4rem;
  height: 2.4rem;
  position: absolute;
  background: var(--theme);
  color: var(--base-color);
  font-size: 1.6rem;
  padding: 0.2rem;
  line-height: 1.8rem;
  text-align: center;
  border-radius: 50%;
  cursor: pointer;
  z-index: 1000;
}

.sticky-ad-close {
  right: 0;
  top: -1.2rem;
}

.language,
.language-container {
  display: flex;
  justify-content: center;
  font-size: 1.6rem;
}

.language-close {
  right: -1.2rem;
  bottom: -1.2rem;
}

.language {
  position: sticky;
  top: 0;
  z-index: 1000;
}

.language-container {
  background: var(--body-bg);
  padding: 0.8rem 1.6rem;
  border: solid 0.2rem var(--border-strong);
  border-radius: 0.2rem;
  gap: 1.6rem;
  position: relative;
}

.language-container a {
  text-decoration: none;
  color: var(--text-color);
}

.language-container a:hover {
  color: var(--accent-color);
}

@media (max-width: 81em) {
  .logo p {
    font-size: 2.6rem;
  }

  .logo svg {
    height: 3.8rem;
  }
}

@media (max-width: 75em) {
  header {
    flex-direction: column;
    align-items: center;
  }
  .nav-wrapper {
    margin-top: 3.2rem;
    align-items: center;
  }

  .navigation .link:last-child {
    margin-right: 0;
  }

  .theme-switcher {
    position: absolute;
    right: 4.8rem;
  }
}

.social-links {
  display: flex;
  justify-content: center;
  margin-bottom: 1.6rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.social-links a {
  font-size: 2rem;
  background: #fff;
  width: 4.4rem;
  height: 4.4rem;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #000;
  box-shadow: 0 2px 4px #00000024, 0 4px 5px #0000001f, 0 1px 10px #0003;
  transition: 0.4s;
}

.social-links a:hover {
  transform: scale(1.15);
  color: var(--accent-color);
  fill: var(--accent-color);
}

.social-links svg {
  font-size: 2rem;
  width: 2rem;
}

@media (max-width: 58em) {
  .latest-jobs,
  .all-jobs,
  .heading-secondary,
  .related-jobs {
    width: 100%;
    margin: 0 auto;
  }
  .heading-secondary {
    margin: 0 auto 1.6rem auto;
  }

  .heading-secondary {
    font-size: 2rem;
  }
  .search-container {
    width: 80%;
  }
  .side-ad {
    display: none;
  }

  .mid-ad {
    display: block;
  }
}

@media (max-width: 50em) {
  .container {
    width: 100%;
    padding: 0;
  }
  .card-container,
  .related-jobs .card-container {
    width: 100%;
  }

  .card-container.news {
    width: calc(50% - 0.8rem);
  }

  #header {
    flex-direction: row;
    padding: 2.4rem;
    position: relative;
  }
  .logo {
    margin-bottom: -1.6rem;
  }
  .hamburger {
    display: block;
    position: static;
  }
  .nav-wrapper {
    margin-top: 0;
  }
  .navigation {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.8rem;
    left: 2%;
    top: 100%;
    background: var(--base-color);
    box-shadow: rgba(0, 0, 0, 0.12) 0px 2px 6px, rgba(0, 0, 0, 0.24) 0px 2px 6px;
    z-index: 1000;
    padding: 1.6rem 3.2rem;
    border-radius: 0.8rem;
    display: none;
  }
  .navigation .link {
    gap: 1.2rem;
  }

  .theme-switcher {
    position: static;
  }

  .navigation::before {
    content: "";
    display: inline-block;
    width: 3rem;
    height: 3rem;
    position: absolute;
    background: var(--base-color);
    top: -1rem;
    left: 1rem;
    transform: rotate(45deg);
  }
  .search-container {
    width: 90%;
  }
}

@media (max-width: 42.5em) {
  .theme-switcher {
    width: 4rem;
    height: 4rem;
    padding: 0.8rem;
  }

  .hamburger svg {
    height: 3.6rem;
  }
  .search-container {
    width: 96%;
  }
  td,
  dt,
  dd {
    padding: 1rem 2rem;
    font-size: 1.5rem;
  }
}

@media (max-width: 37.5em) {
  main {
    padding: 1.2rem;
  }
  #header {
    padding: 1.8rem;
  }

  .logo p {
    margin-left: 0.6rem;
  }

  .theme-switcher {
    width: 3.8rem;
    height: 3.8rem;
    flex: 1;
  }

  .hamburger svg {
    height: 3.2rem;
  }

  .search-container {
    width: calc(100% - 3.6rem);
  }

  .latest-jobs,
  .all-jobs,
  .heading-secondary,
  .related-jobs {
    width: 100%;
  }
  .heading-secondary {
    font-size: 1.8rem;
  }
  .card-container.news {
    width: 100%;
  }
  td,
  dt,
  dd {
    padding: 0.8rem 1rem;
    font-size: 1.4rem;
  }
}

@media (max-width: 33em) {
  .logo p {
    margin-left: 0.6rem;
  }

  .search-container {
    margin: 3.2rem 1.6rem;
  }
  .search-results .card-container p {
    font-size: 1.6rem;
  }
}

@media (max-width: 29em) {
  #header {
    align-items: flex-end;
  }
  .logo p {
    font-size: 2.4rem;
  }
  .logo .news {
    font-size: 1.6rem;
  }

  .logo svg {
    height: 3.6rem;
  }
  #search-bar {
    padding: 0.8rem 1.6rem;
  }
  .search-container {
    margin: 1.8rem 1.8rem 2.2rem 1.8rem;
  }
  .search-container svg {
    height: 2.6rem;
    right: 1.4rem;
  }
  .card-container,
  .search-results {
    padding: 1.2rem;
  }
  .start,
  .last {
    font-size: 1.4rem;
  }
  h1.heading-primary,
  h1 {
    font-size: 2.2rem;
  }
  h2 {
    font-size: 1.8rem;
  }
}

@media (max-width: 26em) {
  .theme-switcher {
    width: 3.6rem;
    height: 3.6rem;
    flex: 1;
  }

  .hamburger svg {
    height: 3rem;
  }
  .logo p {
    font-size: 2.4rem;
    margin-left: 0.4rem;
  }
  .logo .news {
    font-size: 1.2rem;
  }

  .logo svg {
    height: 3.6rem;
  }

  .card-container {
    padding: 1rem;
  }
  .card p {
    font-size: 1.8rem;
  }
  .start,
  .last {
    font-size: 1.3rem;
  }
  h1.heading-primary,
  h1 {
    font-size: 2rem;
  }
  h2 {
    font-size: 1.6rem;
  }
}

@media (max-width: 24em) {
  .logo p {
    font-size: 2.1rem;
  }

  .logo svg {
    height: 3.2rem;
  }
  .card-container {
    padding: 0.4rem;
  }
}

@media (max-width: 22em) {
  html {
    font-size: 56%;
  }

  .logo p {
    font-size: 2.1rem;
    margin-left: 0.4rem;
    font-weight: 200;
  }

  .logo svg {
    height: 3.2rem;
  }

  .theme-switcher {
    width: 3.8rem;
    height: 3.8rem;
    padding: 0.8rem;
  }

  .hamburger svg {
    height: 3rem;
  }
}

@media (max-width: 20em) {
  html {
    font-size: 50%;
  }
  #header {
    padding: 1.4rem;
  }

  .search-container,
  .latest-jobs,
  .all-jobs,
  .heading-secondary,
  .related-jobs {
    width: calc(100% - 0.8rem);
    margin: 0.4rem;
  }

  .logo p {
    font-size: 2.2rem;
    margin-left: 0.4rem;
    font-weight: 200;
  }

  .logo svg {
    height: 3.4rem;
  }

  .theme-switcher {
    width: 3.8rem;
    height: 3.8rem;
    padding: 0.8rem;
  }

  .hamburger svg {
    height: 3rem;
  }
}
