body, html {
  min-height: 100vh;
  margin: 0;
  font-family: 'Fira Sans', sans-serif;
  scroll-behavior: smooth;
}

/* Global */
p {
  text-align: justify;
}

a:hover {
  opacity: 0.7;
}

section {
  scroll-margin-top: 60px;
}

.black-link {
  color: var(--color-text-default);
  text-decoration: none;
}

.white-link {
  color: var(--color-text-inverse);
  text-decoration: none;
}

.grey-link {
  color: var(--color-text-grey);
  text-decoration: none;
}

.message {
  width: 100%;
  display: block;
  padding: 5px;
  margin-bottom: 10px;
  text-align: center;
}

.bg-success {
  background-color: #064420 !important;
}

.text-success {
  color: #06a74f !important;
}

.bg-error {
  background-color: #440606 !important;
}

.text-error {
  color: #a70606 !important;
}

.input-error {
  border-color: #a70606 !important;
}

/* Navbar */
.navbar {
  height: 100px;
  background-color: transparent;
  display: flex;
  align-items: stretch;
  transition:
    height 0.3s ease,
    background-color 0.3s ease;
  z-index: 1050;
}

.navbar-brand {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  overflow: hidden;
}

.brand-top {
  font-size: 1.4rem;
  font-weight: 700;
}

.brand-bottom {
  font-size: 0.9rem;
  max-height: 40px;
  opacity: 1;
  transition:
    max-height 0.3s ease,
    opacity 0.25s ease;
}

.navbar.is-scrolled {
  height: 60px;
  background-color: var(--color-navbar-bg-scrolled);
}

.navbar.is-scrolled .brand-bottom {
  max-height: 0;
  opacity: 0;
}

.navbar.is-scrolled .navbar-brand {
  justify-content: center;
}

.navbar::before {
  content: '';
  position: fixed;
  inset: 0;
  background-color: var(--color-overlay-dark);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: -1;
}

.navbar.is-menu-open::before {
  opacity: 1;
  pointer-events: auto;
}

.navbar.lock-top-height {
  height: 100px !important;
}

.nav-item {
  height: 100%;
}

.nav-link {
  height: 100%;
  display: flex;
  align-items: center;
  padding: 0 1rem;
  color: var(--color-navbar-link) !important;
}

@media (max-width: 991.98px) {
  .navbar-collapse .nav-link {
    height: auto;
    width: 100%;
    padding: 5px 0;
    margin: 0 15px;
    justify-content: flex-start;
  }
}

.navbar-toggler,
.navbar-toggler:focus,
.navbar-toggler:active,
.navbar-toggler:focus-visible {
  outline: none;
  box-shadow: none;
}

@media (max-width: 991.98px) {
  .navbar-collapse {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
  }

  .navbar.is-scrolled .navbar-collapse {
    top: 60px;
  }
}

.navbar-collapse {
  transition: opacity 0.2s ease;
}

.wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

@media (max-width: 991.98px) {

  .navbar-collapse {
    max-height: calc(100vh - 100px); /* navbar height */
    overflow-y: auto;
    overflow-x: hidden;              /* 🔑 fix horizontal scrollbar */

    overscroll-behavior: contain;

    padding-bottom: 1rem;            /* 🔑 space at bottom */
    box-sizing: border-box;
  }

  .navbar.is-scrolled .navbar-collapse {
    max-height: calc(100vh - 60px);
  }

  /* Clean horizontal spacing for links */
  .navbar-collapse .nav-link {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}


/* Hero Section */
/* Home page */
.hero {
  height: 100vh;
  background: url('../imgs/Gear-Prague.png') no-repeat center top;
  background-size: cover;
  background-attachment: fixed;
}

.overlay {
  width: 100%;
  height: 100%;
  background-color: var(--color-overlay-hero);
}

.hero .text-white {
  text-shadow: var(--shadow-hero-text);
}

/* Other pages */
.hero2 {
  height: max(30vh, 250px);
  background: url('../imgs/Gears.png') no-repeat center center;
  background-size: cover;
  background-position: center bottom;
  background-attachment: fixed;
}

.hero2 .overlay {
  background-color: var(--color-overlay-hero);
  padding-top: max(15vh, 100px);
}

/* Main */
main {
  background-color: var(--color-white);
  flex: 1 0 auto;
}


/* Cards */
.card-img {
  aspect-ratio: 3 / 2;
  width: 100%;
  object-fit: cover;
}

.col-lg-8 .card-img {
  aspect-ratio: 3 / 0.96;
  width: 100%;
  object-fit: cover;
}

@media (min-width: 576px) and (max-width: 991.98px) {
  .col-sm-12 .card-img {
    aspect-ratio: 3 / 1;
    width: 100%;
    object-fit: cover;
  }
}

.card a {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.card-overlay {
  position: relative;
  cursor: pointer;
}

.card-img-overlay {
  background: var(--gradient-card-overlay);
  transition: background 0.5s ease;
}

.card-img-overlay:hover {
  background: transparent;
  text-shadow: var(--shadow-card-text);
}

/* Footer */
footer {
  width: 100%;
  flex-shrink: 0;
  background-color: var(--color-dark-gray);
  color: var(--color-light-gray);
}

.footer-bottom {
  background-color: var(--color-mid-gray);
  color: var(--color-text-default);
}

.footer-links {
  font-weight: 200;
  text-align: center;
}

/* Venue map */
#map {
  display: flex;
  justify-content: center;
  margin-top: 20px;
}

#map .map-wrapper {
  position: relative;
  width: 100%;
  height: 400px;
}

#map iframe {
  width: 100%;
  height: 100%;
  border: none;
}

#map .map-overlay {
  position: absolute;
  inset: 0;
  background-color: transparent;
  cursor: pointer;
  z-index: 2;
}

/* ===============================
   FORM CONTAINER (CRITICAL FIX)
================================ */

/* Mobile-first: vertical flex */
.reg-form .col {
  display: flex;
  flex-direction: column;
}

/* Desktop: two-column grid */
@media (min-width: 992px) {
  .reg-form .col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 2rem;
  }

  .form-group.full-width {
    grid-column: 1 / -1;
  }
}

/* ===============================
   LOGIN / REGISTRATION FORMS
================================ */

.login-form {
  background-color: var(--color-light-gray);
  padding: 1rem 2rem;
  border-radius: 8px;
  box-shadow: 3px 3px 5px var(--shadow-card-login-form);
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
}

.reg-form {
  max-width: 100% !important;
  width: 100% !important;
}

/* =================================================
   CRITICAL FIX: FORM LAYOUT CONTAINER
   Mobile: flex column
   Desktop: grid
================================================= */

.reg-form .col {
  display: flex;
  flex-direction: column;
}

/* Desktop: 2 columns */
@media (min-width: 992px) {
  .reg-form .col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 2rem;
  }

  .form-group.full-width {
    grid-column: 1 / -1;
  }
}

/* ===============================
   FORM ROWS (BASE = MOBILE)
================================ */

.login-form .form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
  order: 100;
  text-align: center;
}

/* Labels */
.login-form label {
  width: 100%;
  color: var(--color-dark-gray);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Required marker */
.req::after {
  content: '•';
  color: #d32f2f;
  font-size: 0.8em;
  vertical-align: super;
  margin-left: 0.2rem;
}

/* Inputs (exclude checkbox/radio) */
.login-form input:not([type='checkbox']):not([type='radio']),
.login-form textarea {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid var(--border-input-default);
  border-radius: 4px;
}

/* Textarea */
.login-form textarea {
  resize: vertical;
  font-family: 'Roboto Condensed', sans-serif;
}

/* Checkbox (mobile: under label) */
.login-form input[type='checkbox'] {
  width: auto;
}

/* Password field */
.password-wrapper {
  position: relative;
  width: 100%;
}

.password-wrapper input {
  width: 100%;
  padding-right: 2.2rem;
}

.password-toggle {
  position: absolute;
  right: 0.6rem;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  opacity: 0.6;
  user-select: none;
}

.password-toggle:hover {
  opacity: 1;
}

/* Ordering (mobile-first) */
.order-title     { order: 1 !important; }
.order-firstname { order: 2 !important; }
.order-surname   { order: 3 !important; }
.order-title2    { order: 4 !important; }

/* ===============================
   DESKTOP (≥ 992px)
================================ */

@media (min-width: 992px) {

  .login-form .form-group {
    flex-direction: row;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .login-form label {
    width: 100px;
  }

  .reg-form label {
    width: 200px;
  }

  /* Inputs fill remaining space */
  .login-form input:not([type='checkbox']):not([type='radio']),
  .login-form textarea,
  .password-wrapper {
    flex: 1;
  }

  /* Checkbox inline with label */
  .form-group.checkbox-group {
    flex-direction: row;
    align-items: center;
  }

  /* Full-width rows still inline */
  .form-group.full-width {
    grid-column: 1 / -1;
  }

  /* Desktop order */
  .order-firstname { order: 1 !important; }
  .order-surname   { order: 2 !important; }
  .order-title     { order: 3 !important; }
  .order-title2    { order: 4 !important; }
}

/* ===============================
   BUTTON
================================ */

.login-btn {
  width: 100%;
  padding: 0.75rem;
  background-color: var(--color-dark-gray);
  color: var(--color-white);
  border: none;
  border-radius: 4px;
  font-weight: bold;
  cursor: pointer;
}

.login-btn:hover {
  background-color: var(--color-mid-gray);
}


#logos img {
  max-height: 150px;
  max-width: 100%;
}