/* Precision responsive layer for static export */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  overflow-x: hidden;
}

/* Remove visible white seams between stacked blocks */
section,
.elementor-element,
.elementor-widget-container,
.e-con,
.page,
#page {
  margin: 0 !important;
}

section {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

body.overflow {
  overflow: hidden;
}

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

/* Keep layout stable on very wide screens */
.container {
  width: min(100%, 1435px);
}

.container-full {
  width: 100%;
}

[class*="row"] {
  row-gap: 0 !important;
}

.row {
  gap: 0 !important;
}

[class*="col-"] {
  min-width: 0;
}

.main-title {
  margin-bottom: 0;
}

.banner-title,
.title,
.hiring-title,
.testimonial-title,
h1,
h2 {
  line-height: 1.12;
  text-wrap: balance;
}

.banner-title {
  font-size: clamp(2rem, 3.2vw, 3.2rem);
}

.banner-text,
.description,
.testimonial-text,
.contact-info .text,
.hiring-text {
  line-height: 1.45;
}

.btn {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

/* Hero and media blocks */
.banner-video video,
.management-slider .swiper,
.management-slider .swiper-slide,
.management-slider .swiper-slide img,
.testimonial-image img,
.hiring-image img {
  width: 100%;
}

.banner-video video {
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

/* Header */
.header-block {
  gap: clamp(12px, 3vw, 50px);
}

.nav-links {
  gap: clamp(14px, 2vw, 40px);
}

.menu-item a {
  line-height: 1.2;
}

/* Keep this nav label as inline-block */
a[href*="what-we-do/index.html"] {
  display: inline-block !important;
}

.header-search {
  flex-shrink: 0;
}

#search-form {
  z-index: 40;
}

.site-search-results {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: min(400px, 85vw);
  max-height: 280px;
  overflow-y: auto;
  background: #ffffff;
  border: 1px solid #d9d9d9;
  border-radius: 10px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.12);
  list-style: none;
  margin: 0;
  padding: 6px 0;
  z-index: 45;
}

.site-search-results li {
  margin: 0;
  padding: 0;
}

.site-search-results li a,
.site-search-results .search-no-results {
  display: block;
  padding: 10px 14px;
  font-family: var(--font-family);
  font-size: 14px;
  color: #1d1d1b;
  text-decoration: none;
  white-space: nowrap;
}

.site-search-results li a:hover {
  background: #f3f5ee;
}

.site-search-results .search-no-results {
  color: #6a707a;
}

.static-search-results-page {
  background: #fffcf7;
  padding: 62px 0 72px !important;
  min-height: 260px;
}

.search-results-inner {
  max-width: 980px;
}

.search-results-title {
  font-family: var(--second-family);
  font-weight: 400;
  font-size: clamp(36px, 3.2vw, 52px) !important;
  color: #101010 !important;
  margin: 0 0 16px !important;
}

.search-results-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.search-results-list li {
  margin: 0 0 14px;
}

.search-results-list a {
  font-family: var(--font-family);
  font-size: 16px !important;
  font-weight: 400;
  color: #b38f72 !important;
  text-decoration: none;
  line-height: 1.15;
}

.search-results-list a:hover {
  text-decoration: underline;
}

.search-results-list p {
  margin: 2px 0 0;
  font-family: var(--font-family);
  font-size: 14px !important;
  color: #8a7d70 !important;
  line-height: 1.28;
}

.search-empty {
  font-family: var(--font-family);
  font-size: 16px !important;
  color: #6a707a !important;
  margin: 0;
}

.search-pagination {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 14px;
  font-family: var(--font-family);
  flex-wrap: wrap;
}

.search-pagination a,
.search-pagination .current {
  font-size: 16px;
  font-weight: 400;
  color: #b38f72;
  text-decoration: none;
  line-height: 1;
}

.search-pagination .current {
  color: #101010;
  font-weight: 600;
}

.search-pagination a.next {
  margin-left: 8px;
}

.search-field.expanded {
  max-width: min(400px, 78vw);
}

/* Footer */
.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
}

footer .navbar-footer ul {
  flex-wrap: wrap;
}

/* Keep footer nav links inline on one row */
footer .navbar-footer {
  width: 100%;
  overflow-x: auto;
}

footer .navbar-footer ul {
  display: flex !important;
  flex-wrap: nowrap !important;
  white-space: nowrap;
  justify-content: center;
  gap: clamp(12px, 2vw, 28px);
}

footer .navbar-footer li,
footer .navbar-footer li a {
  white-space: nowrap;
}

/* Contact page form controls */
.castle-static-contact-form .form-input label {
  display: block;
}

.castle-static-contact-form input,
.castle-static-contact-form textarea,
.castle-static-contact-form button {
  width: 100%;
}

.castle-static-contact-form textarea {
  min-height: 120px;
}

.castle-static-contact-form .cf-turnstile {
  width: 100%;
  overflow: hidden;
}

#contact-form-status {
  font-family: var(--font-family);
  font-size: 14px;
  margin: 8px 0 0;
}

/* Tablet and down */
@media (max-width: 1180px) {
  .container-full .row .col-padd-left,
  .container-full .row .col-padd-right {
    padding-left: 20px;
    padding-right: 20px;
  }
}

@media (max-width: 992px) {
  .banner-title {
    font-size: clamp(1.8rem, 4.8vw, 2.7rem);
  }

  .hiring-text {
    font-size: clamp(1.05rem, 2.7vw, 1.35rem);
  }

  .management-slider {
    max-height: none;
  }
}

/* Mobile nav and stacking behavior */
@media (max-width: 868px) {
  .navbar {
    width: min(88vw, 340px);
    left: -120vw;
    overflow-y: auto;
    z-index: 120;
  }

  .navbar.active {
    left: 0;
  }

  .navbar-nav {
    padding-top: 84px;
  }

  .header-block {
    justify-content: flex-end;
    gap: 16px;
  }

  .toggle-mnu {
    z-index: 130;
  }

  .nav-links {
    width: 100%;
    align-items: flex-start;
    gap: 18px;
  }

  .navbar.active .nav-links {
    justify-content: flex-start !important;
    align-items: flex-start !important;
    text-align: center !important;
  }

  header .menu-item {
    width: 100%;
  }

  .menu-item a {
    display: inline-block;
    padding: 4px 0;
    text-align: left !important;
  }

  .banner-content,
  .housing-content,
  .testimonials,
  .hiring-content,
  .contact-info {
    text-align: center;
  }

  .contacts {
    margin-right: 0;
    align-items: flex-start;
  }

  .contact-item {
    text-align: left;
  }

  .footer-logo img {
    max-width: 220px;
  }

  footer .navbar-footer ul {
    justify-content: flex-start;
    min-width: max-content;
    padding-bottom: 4px;
  }
}

@media (max-width: 640px) {
  .container,
  .container-full {
    width: 100%;
  }

  .container-full .row .col-padd-left,
  .container-full .row .col-padd-right {
    padding-left: 15px;
    padding-right: 15px;
  }

  .banner-title {
    font-size: clamp(1.6rem, 9vw, 2.1rem);
  }

  .btn {
    width: 100%;
    max-width: 320px;
  }

  .form-input.form-input-half {
    width: 100%;
  }

  .section-councils .councils-logos img {
    width: calc(50% - 20px);
  }
}

@media (max-width: 420px) {
  .section-councils .councils-logos img {
    width: 100%;
  }

  .search-field.expanded {
    max-width: 70vw;
  }

  .site-search-results {
    width: 70vw;
  }

  .static-search-results-page {
    padding: 36px 0 48px !important;
  }

  .search-results-title {
    font-size: clamp(24px, 6vw, 36px) !important;
  }

  .search-results-list a,
  .search-results-list p,
  .search-empty {
    font-size: 14px !important;
  }

  .search-pagination {
    gap: 12px;
    margin-top: 8px;
  }

  .search-pagination a,
  .search-pagination .current {
    font-size: 14px;
  }
}
