:root {
  --RoboJobBeige: #f1f0ee;
  --RoboJobLightBeige: #f7f5f4;
  --text: #1f2937;
  --RoboJobGray: #6b7280;
  --RoboJobDarkBlue: #0a132b;
  --RoboJobRed: #e72c2a;
  --highlight: #0a132b31;
  --border: #e0dedd;
  --document: rgba(43, 43, 149);
  --radius-1: 100%;
}

@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("../fonts/PlusJakartaSans/PlusJakartaSans-VariableFont_wght.ttf") format("truetype");
  font-weight: 400;
  font-style: medium;
  font-type: swap;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Plus Jakarta Sans", sans-serif;
  background: var(--RoboJobBeige);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

header {
  position: relative;
  background: var(--RoboJobDarkBlue);
  color: white;
  padding: 2rem 1rem;
  text-align: center;
  font-weight: bold;
}

.section-divider {
  line-height: 0;
  margin-top: -1px; 
}

.section-divider svg {
  display: block;
  width: 100%;
  height: 50px;
}

.divider__bottom {
  fill: var(--RoboJobBeige); 
}

.divider__top {
  fill: var(--RoboJobDarkBlue); 
}

.header-top {
  position: absolute;
  top: 1rem;
  right: 1rem;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.header-logo {
  text-align: left;
}

.language-select select {
  padding: 0.5rem 0.75rem;
  border: none;
  border-radius: 999px;
  font-size: 0.95rem;
  background: var(--RoboJobBeige);
  color: var(--RoboJobDarkBlue);
  font-weight: bold;
  cursor: pointer;
}

.contact-select {
  position: relative;
}

.contact-select summary {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 0.75rem;
  border-radius: 999px;
  font-size: 0.95rem;
  background: var(--RoboJobBeige);
  color: var(--RoboJobDarkBlue);
  font-weight: bold;
  cursor: pointer;
  white-space: nowrap;
  list-style: none;
}

.contact-select summary::-webkit-details-marker {
  display: none;
}

/* The contact icon is shown only on small screens (see media query). */
.contact-icon {
  display: none;
}

.contact-icon svg {
  display: block;
  width: 20px;
  height: 20px;
}

.contact-panel {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  width: max-content;
  max-width: calc(100vw - 1.5rem);
  padding: 0.6rem;
  background: var(--RoboJobBeige);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  z-index: 1000;
}

.contact-langs {
  display: flex;
  gap: 0.4rem;
}

.contact-langs button {
  padding: 0.3rem 0.7rem;
  border: 1px solid var(--RoboJobBeige);
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: bold;
  background: #fff;
  color: var(--RoboJobDarkBlue);
  cursor: pointer;
}

.contact-langs button:hover {
  background: var(--highlight);
}

.contact-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.5);
  z-index: 2000;
}

.contact-modal[hidden] {
  display: none;
}

.contact-modal__box {
  position: relative;
  width: min(640px, 100%);
  max-height: 90vh;
  overflow: auto;
  padding: 2.5rem 1.5rem 1.5rem;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

#contactFormContainer,
.contact-modal__box .hs-form-frame {
  width: 100%;
}

.contact-modal__box .hs-form-frame iframe {
  width: 100% !important;
  max-width: 100%;
}

.contact-modal__close {
  position: absolute;
  top: 0.5rem;
  right: 0.75rem;
  border: none;
  background: none;
  font-size: 1.75rem;
  line-height: 1;
  color: var(--RoboJobDarkBlue);
  cursor: pointer;
}

header h1 {
  margin: 0;
  font-size: 2rem;
}

header p {
  margin: 0.5rem 0 0;
}

.search-wrap {
  display: flex;
  justify-content: center;
  align-items: stretch;
  gap: 0.5rem;
  margin: 1rem 0 1rem 0;
}

#searchInput {
  flex: 1 1 auto;
  max-width: 520px;
  padding: 0.8rem 1.25rem;
  border: none;
  border-radius: 999px;
  font-size: 1rem;
}

#resetButton {
  flex: 0 0 auto;
  padding: 0.8rem 1.25rem;
  border: none;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: bold;
  font-family: inherit;
  background: var(--RoboJobRed);
  color: #fff;
  cursor: pointer;
}

#resetButton:hover {
  opacity: 0.9;
}

.return-wrap {
  margin: 0 0 1rem 0;
}

#returnButton {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.8rem 1.25rem;
  border: none;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: bold;
  font-family: inherit;
  background: var(--RoboJobRed);
  color: #fff;
  cursor: pointer;
}

#returnButton:hover {
  opacity: 0.9;
}

.doc-viewer {
  padding: 0;
  overflow: hidden;
}

#docFrame {
  display: block;
  width: 100%;
  height: 75vh;
  border: none;
}

/* When sized to its content, the iframe scrolls with the page (no inner scrollbar). */
#docFrame.is-autosized {
  height: auto;
}

main {
  flex: 1 0 auto;
  width: 100%;
  max-width: 1000px;
  margin: 0rem auto;
  padding: 0 1rem 3rem;
}

.panel {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
  padding: 1rem 1.25rem;
}

.doc-list {
  list-style: none;
  padding-left: 0;
  margin: 0 0 1rem 0;
}

.doc-item {
  margin: 0.35rem 0;
}

.doc-item a {
  display: block;
  text-decoration: none;
  color: var(--document);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.85rem 1rem;
}

.doc-item a:hover {
  background: var(--highlight);
}

.folder-groups {
  display: grid;
  gap: 0.75rem;
}

.doc-folder {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.doc-folder > summary {
  cursor: pointer;
  list-style: none;
  font-weight: bold;
  padding: 0.95rem 1rem;
  background: #f9fbff;
  border-bottom: 1px solid var(--border);
}

.doc-folder > summary:hover {
  background: var(--highlight);
}

.doc-folder[open] > summary {
  background: var(--highlight);
}

.doc-folder > summary::-webkit-details-marker {
  display: none;
}

.doc-folder > summary::after {
  content: "▾";
  float: right;
  color: var(--RoboJobGray);
}

.doc-folder:not([open]) > summary::after {
  content: "▸";
}

.doc-folder .doc-list,
.doc-folder .folder-groups {
  padding: 0.75rem;
  margin: 0;
}

.hidden-by-search {
  display: none !important;
}

footer {
  flex-shrink: 0;
  color: var(--RoboJobLightBeige);
  background: var(--RoboJobDarkBlue);
  padding: 2.5rem 1rem;
  font-size: 0.9rem;
}

.footer__addresses {
  max-width: 1000px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2rem;
}

.footer__address h3 {
  margin: 0 0 0.75rem;
  font-size: 1.05rem;
  color: #fff;
}

.footer__address p {
  margin: 0 0 0.5rem;
  line-height: 1.5;
}

.footer__address a {
  display: block;
  color: var(--RoboJobLightBeige);
  text-decoration: none;
  margin: 0.15rem 0;
}

.footer__address a:hover {
  text-decoration: underline;
}

.footer__address span {
  display: block;
  margin-top: 0.5rem;
  color: var(--RoboJobGray);
}

#loadingMessage {
  color: var(--RoboJobGray);
}

@media (max-width: 640px) {
  header {
    padding-top: 2rem;
  }

  /* Logo and the top-right controls share the top row; keep the logo on the
     left half so it never collides with the contact icon + language selector. */
  .header-logo svg {
    max-width: 50vw;
    height: auto;
  }

  .header-top {
    top: 0.75rem;
    right: 0.75rem;
  }

  header h1 {
    font-size: 1.6rem;
  }

  /* Replace the contact text with a dark-blue icon on a white background. */
  .contact-select .contact-label {
    display: none;
  }

  .contact-select .contact-icon {
    display: inline-flex;
  }

  .contact-select summary {
    padding: 0.5rem;
    background: #fff;
    color: var(--RoboJobDarkBlue);
  }
}