:root {
  --mais-orange: #ff9933;
  --mais-orange-dark: #e77c12;
  --mais-brown: #a84b17;
  --mais-cream: #fcdfc0;
  --mais-black: #171717;
  --mais-dark: #202020;
  --mais-text: #292929;
  --mais-width: 960px;
}

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

html {
  font-family: Arial, Helvetica, sans-serif;
  color: var(--mais-text);
}

body {
  margin: 0;
  background: var(--mais-black);
  color: var(--mais-text);
  font-size: 16px;
  line-height: 1.55;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: #873b12;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

a:hover,
a:focus {
  color: #4f2008;
}

.container {
  width: min(calc(100% - 32px), var(--mais-width));
  margin-inline: auto;
}

#section-support {
  position: relative;
  z-index: 500;
  width: 100%;
  padding: 9px 0;
  background: var(--mais-orange);
  color: #fff;
  font-weight: 700;
  text-align: center;
}

#section-support a { color: #fff; }

#section-menu {
  position: relative;
  z-index: 900;
  width: 100%;
  background: var(--mais-black);
  border-bottom: 3px solid var(--mais-orange);
}

#section-menu .navigation h2,
#section-menu .navigation .block__title {
  display: none;
}

.menu-toggle {
  display: none;
  width: 100%;
  padding: 14px 0;
  border: 0;
  background: transparent;
  color: #fff;
  font: inherit;
  font-weight: 700;
  text-align: left;
  text-transform: uppercase;
  cursor: pointer;
}

#section-menu .navigation nav > ul,
#section-menu .navigation > ul {
  display: flex !important;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  width: auto;
  margin: 0;
  padding: 9px 0;
  list-style: none;
}

#section-menu .navigation nav > ul > li,
#section-menu .navigation > ul > li {
  position: relative;
  display: block;
  flex: 0 0 auto;
  width: auto !important;
  margin: 0;
  padding: 0;
  list-style: none;
}

#section-menu .navigation li::marker { content: ""; }

#section-menu .navigation nav > ul > li > a,
#section-menu .navigation > ul > li > a {
  display: block;
  padding: 11px 15px;
  border-radius: 7px;
  color: #f5f5f5;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  text-transform: uppercase;
  transition: color 150ms ease, background-color 150ms ease, transform 150ms ease;
}

#section-menu .navigation nav > ul > li > a:hover,
#section-menu .navigation nav > ul > li > a:focus,
#section-menu .navigation nav > ul > li > a.is-active,
#section-menu .navigation > ul > li > a:hover,
#section-menu .navigation > ul > li > a:focus,
#section-menu .navigation > ul > li > a.is-active {
  background: var(--mais-orange);
  color: var(--mais-black);
}

#section-menu .navigation nav > ul > li > ul,
#section-menu .navigation > ul > li > ul {
  position: absolute;
  z-index: 1000;
  top: calc(100% + 5px);
  left: 0;
  display: none;
  min-width: 220px;
  margin: 0;
  padding: 7px;
  border: 1px solid #3b3b3b;
  border-radius: 8px;
  background: var(--mais-dark);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.32);
  list-style: none;
}

#section-menu .navigation li:hover > ul,
#section-menu .navigation li:focus-within > ul {
  display: block;
}

#section-menu .navigation li > ul li {
  position: relative;
  margin: 0;
  padding: 0;
  list-style: none;
}

#section-menu .navigation li > ul a {
  display: block;
  padding: 10px 12px;
  border-radius: 5px;
  color: #f5f5f5;
  font-size: 13px;
  line-height: 1.3;
  text-decoration: none;
  white-space: nowrap;
}

#section-menu .navigation li > ul a:hover,
#section-menu .navigation li > ul a:focus,
#section-menu .navigation li > ul a.is-active {
  background: var(--mais-orange);
  color: var(--mais-black);
}

#section-header {
  width: 100%;
  padding: 14px 0;
  background: var(--mais-brown);
  color: #fff;
}

#section-header .brand {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 100px;
}

#section-header .site-logo {
  display: block;
  flex: 0 0 100px;
  width: 100px;
  height: 100px;
}

#section-header .site-logo img {
  display: block;
  width: 100px;
  height: 100px;
  object-fit: contain;
}

#section-header .site-name,
#section-header .site-name a {
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
  text-decoration: none;
}

#section-header .site-name a:hover,
#section-header .site-name a:focus { color: var(--mais-cream); }

/* Drupal system branding block */
#section-header .block-system-branding-block {
  display: flex;
  align-items: center;
  gap: 24px;
  width: 100%;
}

#section-header .block-system-branding-block > a:first-child {
  display: block;
  flex: 0 0 100px;
  width: 100px;
  height: 100px;
}

#section-header .block-system-branding-block > a:first-child img {
  display: block;
  width: 100px;
  height: 100px;
  object-fit: contain;
}

#section-header .block-system-branding-block a,
#section-header .block-system-branding-block .site-name,
#section-header .block-system-branding-block .site-name a,
#section-header .block-system-branding-block .site-branding__name,
#section-header .block-system-branding-block .site-branding__name a {
  color: #fff;
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 700;
  line-height: 1.15;
  text-decoration: none;
}

#section-header .block-system-branding-block a:hover,
#section-header .block-system-branding-block a:focus {
  color: var(--mais-cream);
}

/* Fallback for branding markup imported from older Drupal versions. */
#section-header .brand a {
  color: #fff !important;
  font-size: clamp(26px, 3vw, 36px) !important;
  font-weight: 700 !important;
  line-height: 1.15;
  text-decoration: none !important;
}

#section-header .brand a:hover,
#section-header .brand a:focus {
  color: var(--mais-cream) !important;
}

#section-header .brand a:has(img) {
  flex: 0 0 100px;
  font-size: 0 !important;
}

#section-content {
  width: 100%;
  min-height: 320px;
  padding: 32px 0;
  background: var(--mais-cream);
}

#section-content .block { margin-bottom: 24px; }
#section-content .block:last-child { margin-bottom: 0; }

h1,
h2,
h3,
h4 {
  margin-top: 0;
  color: #222;
  line-height: 1.25;
}

h1 {
  margin-bottom: 24px;
  font-size: clamp(28px, 4vw, 38px);
}

h2 {
  margin-top: 28px;
  margin-bottom: 14px;
  font-size: 25px;
}

h3 {
  margin-top: 22px;
  margin-bottom: 12px;
  font-size: 20px;
}

p {
  margin-top: 0;
  margin-bottom: 16px;
}

.breadcrumb {
  margin-bottom: 20px;
  font-size: 14px;
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.messages { margin: 16px 0; }

#section-partners {
  width: 100%;
  padding: 28px 0;
  background: var(--mais-cream);
}

#section-partners h2 { margin-top: 0; }

#section-partners img {
  display: inline-block;
  width: auto;
  max-width: 90px;
  max-height: 72px;
  margin: 6px 8px;
  vertical-align: middle;
  object-fit: contain;
}

#section-contact {
  width: 100%;
  padding: 30px 0;
  background: var(--mais-brown);
  color: #fff;
}

#section-contact h2,
#section-contact h3,
#section-contact h4 { color: #fff; }

#section-contact a,
#section-contact a:visited {
  color: var(--mais-cream);
  font-weight: 700;
}

#section-contact a:hover,
#section-contact a:focus { color: #fff; }

#section-footer {
  width: 100%;
  padding: 16px 0;
  background: var(--mais-black);
  color: #aaa;
  text-align: center;
}

#section-footer p { margin: 0; }
#section-footer a { color: #ddd; }

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

th,
td {
  padding: 9px;
  border: 1px solid rgba(0, 0, 0, 0.18);
  text-align: left;
}

input,
select,
textarea,
button {
  max-width: 100%;
  font: inherit;
}

input[type="text"],
input[type="email"],
input[type="password"],
select,
textarea {
  padding: 9px 11px;
  border: 1px solid #aaa;
  border-radius: 5px;
  background: #fff;
}

button,
input[type="submit"] {
  padding: 10px 16px;
  border: 0;
  border-radius: 6px;
  background: var(--mais-orange);
  color: var(--mais-black);
  font-weight: 700;
  cursor: pointer;
}

button:hover,
input[type="submit"]:hover { background: var(--mais-orange-dark); }

.tabs ul {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 12px 0;
  padding: 0;
  list-style: none;
}

.tabs a {
  display: block;
  padding: 8px 12px;
  border-radius: 5px;
  background: #eee;
  text-decoration: none;
}

.tabs a.is-active {
  background: var(--mais-orange);
  color: var(--mais-black);
}

@media (max-width: 720px) {
  .container {
    width: min(calc(100% - 24px), var(--mais-width));
  }

  .menu-toggle { display: block; }
  #section-menu .navigation { display: none; }
  #section-menu .navigation.is-open { display: block; }

  #section-menu .navigation nav > ul,
  #section-menu .navigation > ul {
    display: block !important;
    padding: 0 0 12px;
  }

  #section-menu .navigation nav > ul > li,
  #section-menu .navigation > ul > li {
    width: 100% !important;
  }

  #section-menu .navigation nav > ul > li > a,
  #section-menu .navigation > ul > li > a {
    padding: 12px;
  }

  #section-menu .navigation li > ul {
    position: static !important;
    display: block;
    min-width: 0;
    margin: 3px 0 5px 15px;
    padding: 3px;
    border: 0;
    background: var(--mais-dark);
    box-shadow: none;
  }

  #section-menu .navigation li > ul a { white-space: normal; }

  #section-header .brand {
    justify-content: center;
    flex-wrap: wrap;
    text-align: center;
  }

  #section-header .block-system-branding-block {
    justify-content: center;
    flex-wrap: wrap;
    gap: 14px;
    text-align: center;
  }

  #section-header .block-system-branding-block a,
  #section-header .block-system-branding-block .site-name,
  #section-header .block-system-branding-block .site-name a,
  #section-header .block-system-branding-block .site-branding__name,
  #section-header .block-system-branding-block .site-branding__name a {
    font-size: 24px;
  }

  #section-content { padding: 24px 0; }

  #section-partners img {
    max-width: 72px;
    max-height: 58px;
    margin: 5px;
  }

  table {
    display: block;
    overflow-x: auto;
  }
}

/* Keep the MAIS wordmark beside the square logo on every screen size. */
#section-header .brand,
#section-header .brand > .region,
#section-header .brand > div,
#section-header .brand .block,
#section-header .block-system-branding-block {
  flex-direction: row !important;
  align-items: center !important;
  justify-content: center !important;
  gap: clamp(12px, 2.5vw, 24px) !important;
}

#section-header .mais-brand-name {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  margin: 0;
  color: #fff;
  font-size: clamp(18px, 3vw, 34px);
  font-weight: 700;
  line-height: 1.05;
}

#section-header .mais-brand-name__line {
  display: block;
  white-space: nowrap;
}

@media (max-width: 520px) {
  #section-header .brand a:has(img),
  #section-header .block-system-branding-block > a:first-child {
    flex-basis: 76px;
    width: 76px;
    height: 76px;
  }

  #section-header .brand img,
  #section-header .block-system-branding-block > a:first-child img {
    width: 76px;
    height: 76px;
  }

  #section-header .mais-brand-name {
    font-size: clamp(15px, 4.6vw, 22px);
  }
}

/* Final responsive branding alignment. */
#section-header .brand {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 112px;
}

#section-header .brand > .region,
#section-header .brand > div {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

#section-header .brand .block {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  width: 100%;
}

#section-header .brand a {
  display: block;
  margin: 0;
}

#section-header .brand a:has(img) {
  flex: 0 0 100px;
  width: 100px;
  height: 100px;
}

#section-header .brand img {
  display: block;
  width: 100px;
  height: 100px;
  margin: 0;
  object-fit: contain;
}

#section-header .brand .site-name,
#section-header .brand .site-name a,
#section-header .brand .site-branding__name,
#section-header .brand .site-branding__name a,
#section-header .brand a:not(:has(img)) {
  max-width: 680px;
  margin: 0;
  color: #fff !important;
  font-size: clamp(27px, 3vw, 36px) !important;
  font-weight: 700 !important;
  line-height: 1.15;
  text-align: left;
  text-decoration: none !important;
}

@media (max-width: 720px) {
  #section-header {
    padding: 22px 0;
  }

  #section-header .brand,
  #section-header .brand > .region,
  #section-header .brand > div,
  #section-header .brand .block {
    flex-direction: column;
    justify-content: center;
    gap: 14px;
    min-height: 0;
    text-align: center;
  }

  #section-header .brand .site-name,
  #section-header .brand .site-name a,
  #section-header .brand .site-branding__name,
  #section-header .brand .site-branding__name a,
  #section-header .brand a:not(:has(img)) {
    width: 100%;
    max-width: 420px;
    font-size: clamp(22px, 7vw, 29px) !important;
    line-height: 1.2;
    text-align: center;
  }
}
