.document-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: min(100%, 430px);
}

.document-links .document-link {
  justify-content: flex-start;
  white-space: normal;
}

.video-analysis-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 10px;
  text-decoration: none;
}

.brand .ucfr-full-brand-name {
  display: block;
  max-width: 330px;
  font-size: 20px;
  line-height: 1.18;
  letter-spacing: 0;
  text-transform: none;
}

.brand span[hidden] {
  display: none !important;
}

@media (max-width: 720px) {
  .document-links {
    width: 100%;
    min-width: 0;
  }

  .document-links .document-link {
    width: 100%;
    justify-content: center;
  }

  .topbar {
    height: 96px;
    padding: 0 12px;
  }

  .brand {
    gap: 8px;
    min-width: 0;
  }

  .brand img {
    width: 62px;
    height: 76px;
    flex: 0 0 auto;
  }

  .brand .ucfr-full-brand-name {
    max-width: 165px;
    font-size: 13px;
    line-height: 1.2;
  }

  nav {
    top: 96px;
  }
}

.brand {
  min-width: 350px;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.brand img {
  display: block;
  width: 340px !important;
  height: 116px !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: contain !important;
  object-position: left center !important;
  filter: none !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.brand > div {
  display: none !important;
}

.footer-brand img {
  width: 300px !important;
  height: auto !important;
  max-width: 100%;
  background: transparent !important;
  border-radius: 0 !important;
}

.member-card > img:first-child {
  width: 240px !important;
  height: auto !important;
  max-width: 88%;
  border-radius: 8px;
}

@media (max-width: 1350px) {
  .brand {
    min-width: 290px;
  }

  .brand img {
    width: 280px !important;
    height: 108px !important;
  }

  nav {
    gap: 16px;
  }
}

@media (max-width: 1100px) {
  .brand {
    min-width: 340px;
  }

  .brand img {
    width: 330px !important;
    height: 112px !important;
  }
}

@media (max-width: 720px) {
  .topbar {
    height: 102px;
    min-height: 102px;
  }

  .brand {
    min-width: 0;
    max-width: 238px;
  }

  .brand img {
    width: 232px !important;
    height: 84px !important;
  }

  nav {
    top: 102px;
  }

  .footer-brand img {
    width: 250px !important;
  }
}

/* Final mobile containment and header layout. */
html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

#app,
main,
.topbar,
.hero,
.section,
.membership,
.incident,
.media,
.documents-section,
footer {
  max-width: 100%;
}

img,
svg,
video,
canvas {
  max-width: 100%;
}

@media (max-width: 720px) {
  .topbar {
    width: 100% !important;
    max-width: 100vw !important;
    height: auto !important;
    min-height: 136px !important;
    padding: 8px 12px 12px !important;
    display: grid !important;
    grid-template-columns: minmax(138px, 1fr) 40px 40px 40px;
    grid-template-rows: 76px 44px;
    column-gap: 7px !important;
    row-gap: 8px !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    overflow: hidden !important;
  }

  .brand {
    grid-column: 1;
    grid-row: 1;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 170px !important;
    height: 76px;
    overflow: hidden;
  }

  .brand img {
    display: block !important;
    width: 158px !important;
    height: 76px !important;
    max-width: 100% !important;
    max-height: 76px !important;
    padding: 0 !important;
    object-fit: contain !important;
    object-position: left center !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    filter: none !important;
  }

  .actions {
    display: contents !important;
  }

  .actions .lang {
    grid-column: 2;
    grid-row: 1;
    width: 40px;
    height: 40px;
    min-width: 40px;
    padding: 0 !important;
    display: inline-grid !important;
    place-items: center;
    border-radius: 50%;
    background: #f1f5fa !important;
  }

  .actions .lang > span:last-child {
    display: none !important;
  }

  .actions .site-theme-toggle {
    grid-column: 3;
    grid-row: 1;
    width: 40px !important;
    height: 40px !important;
    min-width: 40px;
  }

  .menu {
    grid-column: 4;
    grid-row: 1;
    display: inline-grid !important;
    place-items: center;
    width: 40px;
    height: 40px;
    min-width: 40px;
    padding: 0 !important;
    border-radius: 50%;
    background: #0c2848 !important;
    color: #ffffff !important;
    font-size: 21px;
    line-height: 1;
  }

  .actions .ghost[data-modal="login"] {
    grid-column: 1 / 3;
    grid-row: 2;
  }

  .actions .primary.small[data-modal="join"] {
    grid-column: 3 / 5;
    grid-row: 2;
  }

  .actions .ghost[data-modal="profile"] {
    grid-column: 1 / 2;
    grid-row: 2;
  }

  .actions #adminPanelBtn {
    grid-column: 2 / 3;
    grid-row: 2;
  }

  .actions #logoutBtn {
    grid-column: 3 / 5;
    grid-row: 2;
  }

  .actions .ghost[data-modal="login"],
  .actions .primary.small[data-modal="join"],
  .actions .ghost[data-modal="profile"],
  .actions #adminPanelBtn,
  .actions #logoutBtn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-width: 0;
    min-height: 44px;
    margin: 0;
    padding: 9px 10px !important;
    border-radius: 13px;
    font-size: 13px;
    line-height: 1.15;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .topbar nav {
    grid-column: 1 / -1;
    grid-row: 3;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  body,
  #app,
  main,
  .hero,
  .section,
  .membership,
  .incident,
  .media,
  .documents-section,
  footer {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden;
  }
}

/* Prague AI Growth Agency credit beside the UČFR copyright. */
footer#contact .copy {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-left: auto;
  white-space: nowrap;
}

footer#contact .copy::after {
  content: "";
  display: block;
  width: 154px;
  height: 36px;
  flex: 0 0 154px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 170 40'%3E%3Cg fill='none' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 29h38M7 29V18l7-6 7 6v11M21 29V14l7-6 7 6v15M35 29V19' stroke='%23f5a623' stroke-width='2'/%3E%3Cpath d='M5 32c8-7 23-7 36 0M9 34c9-5 18-5 28 0' stroke='%234bb5ff' stroke-width='1.6'/%3E%3Cpath d='M8 25l8-5 7 3 7-8 9 3' stroke='%234bb5ff' stroke-width='2'/%3E%3Cpath d='M35 14l5 4-6 1' stroke='%234bb5ff' stroke-width='2'/%3E%3C/g%3E%3Ctext x='49' y='18' fill='%23ffffff' font-family='Arial,sans-serif' font-size='14' font-weight='700'%3EPrague AI%3C/text%3E%3Ctext x='49' y='30' fill='%238ecbff' font-family='Arial,sans-serif' font-size='7' font-weight='700' letter-spacing='1.35'%3EGROWTH AGENCY%3C/text%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

@media (max-width: 720px) {
  footer#contact .copy {
    width: 100%;
    margin-left: 0;
    justify-content: center;
    gap: 9px;
    white-space: normal;
  }

  footer#contact .copy::after {
    width: 132px;
    height: 32px;
    flex-basis: 132px;
  }
}
