/* Global layout and footer fixes (loaded last on every frontend page) */
html,
body {
  height: 100%;
  margin: 0;
}

body {
  display: flex;
  flex-direction: column;
}

.main {
  flex: 1 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.main > .footer {
  margin-top: auto;
}

.footer {
  padding-top: 36px !important;
  padding-bottom: 0 !important;
  margin-bottom: 0 !important;
}

.footer p {
  font-size: 13px !important;
  line-height: 19px !important;
  margin: 10px 0 12px !important;
}

.footer .footer-title {
  font-size: 18px !important;
  line-height: 24px !important;
  margin-bottom: 10px !important;
}

.footer .footer-link li {
  margin-bottom: 0 !important;
}

.footer .footer-link li a {
  font-size: 14px !important;
  line-height: 24px !important;
}

.footer .tiny-footer {
  margin-top: 8px !important;
  margin-bottom: 0 !important;
  padding: 8px 0 !important;
}

.footer .tiny-footer p,
.footer .tiny-footer ul,
.footer .tiny-footer ul li,
.footer .tiny-footer ul li a {
  margin-bottom: 0 !important;
}

.footer .tiny-footer p {
  margin: 0 !important;
}

.footer .tiny-footer ul {
  margin: 0 !important;
  padding: 0 !important;
}

.footer .tiny-footer .row,
.footer .tiny-footer .col-12,
.footer .tiny-footer .col-lg-6 {
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}

.footer .legal-note {
  max-height: 120px;
  overflow: auto;
  padding-right: 6px;
}

@media (max-width: 768px) {
  .footer {
    padding-top: 28px !important;
  }

  .footer .legal-note {
    max-height: 90px;
  }
}

/* Navbar cleanup */
.header .topbar {
  padding: 6px 0;
}

.header .navbar.header--sticky {
  margin-top: 8px;
  padding: 12px 18px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(3, 16, 40, 0.45);
  backdrop-filter: blur(10px);
}

.header .navbar .navbar-brand img {
  display: block;
  width: auto;
  max-width: 210px;
  max-height: 44px;
  object-fit: contain;
}

.header .navbar .navbar-nav {
  gap: 18px;
}

.header .navbar .navbar-nav .nav-item .nav-link {
  font-size: 16px;
  line-height: 20px;
  position: relative;
}

.header .navbar .navbar-nav .nav-item .nav-link.active {
  color: #7eb5ff !important;
}

.header .navbar .navbar-nav .nav-item .nav-link.active::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -8px;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: #7eb5ff;
}

.header .navbar .dropdown-menu {
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
}

@media (max-width: 992px) {
  .header .navbar .navbar-brand img {
    max-width: 172px;
    max-height: 38px;
  }

  .header .navbar .navbar-toggler {
    gap: 10px;
  }

  .header .navbar .navbar-toggler .toggle-btn {
    min-width: 38px;
    min-height: 38px;
    border: 1px solid rgba(126, 181, 255, 0.65);
    border-radius: 8px;
    background: rgba(6, 20, 48, 0.4);
  }

  .header .navbar .navbar-collapse {
    margin-top: 12px;
    padding: 14px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(3, 16, 40, 0.82);
  }

  .header .navbar .navbar-nav {
    align-items: flex-start;
    gap: 10px;
  }

  .header .navbar .navbar-nav .nav-item {
    width: 100%;
  }

  .header .navbar .navbar-nav .nav-item .nav-link {
    justify-content: space-between;
    width: 100%;
    padding: 8px 0;
  }

  .header .navbar .navbar-nav .nav-item .nav-link.active::after {
    display: none;
  }

  .header .navbar .navbar-nav .nav-item.dropdown .dropdown-menu {
    position: static;
    width: 100%;
    margin-top: 6px;
  }

  .header .navbar .button {
    width: 100%;
    margin-top: 12px;
    justify-content: center;
  }
}

/* Footer logo fit */
.footer .logo {
  margin-bottom: 10px;
}

.footer .logo img {
  display: block;
  width: auto;
  max-width: 200px;
  max-height: 54px;
  object-fit: contain;
}

@media (max-width: 768px) {
  .footer .logo img {
    max-width: 164px;
    max-height: 46px;
  }
}

/* Text readability and line flow */
.banner-section .heading,
.section-title .title,
.about .title,
.question-ans .title,
.build-website h1 {
  word-break: normal;
  overflow-wrap: normal;
  hyphens: none;
  text-wrap: balance;
  letter-spacing: 0;
}

.banner-section .heading {
  font-size: clamp(2rem, 4.2vw, 3.8rem);
  line-height: 1.18;
}

.section-title .title,
.about .title,
.question-ans .title,
.build-website h1 {
  font-size: clamp(1.55rem, 3vw, 2.7rem);
  line-height: 1.26;
}

.banner-section .description,
.faq .description,
.accordion .accordion-button,
.accordion .accordion-body {
  word-break: normal;
  overflow-wrap: break-word;
  line-height: 1.6;
}

/* Final hard fix for any visible gap under footer */
html,
body {
  min-height: 100%;
  background: #061634 !important;
}

body {
  margin: 0 !important;
  padding: 0 !important;
}

.main {
  min-height: 100dvh;
}

.main > .footer:last-child {
  margin-bottom: 0 !important;
}

.footer,
.footer .tiny-footer,
.footer .tiny-footer > .container,
.footer .tiny-footer > .container > .row {
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
  border-bottom: 0 !important;
}

.footer .tiny-footer > .container > .row > [class*="col-"]:last-child > *:last-child {
  margin-bottom: 0 !important;
}

footer.footer {
  position: relative;
  overflow: hidden;
}

footer.footer::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 4px;
  background: #061634;
  pointer-events: none;
}
