:root {
  color-scheme: light;
  --brand-primary: #1d3b90;
  --brand-accent: #2f5cc4;
  --brand-bg: #f8f9fa;
  --text-color: #212529;
  --surface-1: #ffffff;
  --border-color: #dee2e6;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--brand-bg);
  color: var(--text-color);
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}

img {
  max-width: 100%;
}

.skip-link {
  position: absolute;
  left: 0.75rem;
  top: -3rem;
  z-index: 1200;
  background: var(--brand-primary);
  color: #fff;
  padding: 0.5rem 0.75rem;
  border-radius: 0.35rem;
  text-decoration: none;
  font-weight: 600;
}

.skip-link:focus {
  top: 0.75rem;
}

.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding-left: 0.75rem;
  padding-right: 0.75rem;
}

.bg-white {
  background: #fff;
}

.bg-light {
  background: #f8f9fa;
}

.border-bottom {
  border-bottom: 1px solid var(--border-color);
}

.border-top {
  border-top: 1px solid var(--border-color);
}

.sticky-top {
  position: sticky;
  top: 0;
  z-index: 1020;
}

.shadow-sm {
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.text-white {
  color: #fff;
}

.text-center {
  text-align: center;
}

.fw-bold {
  font-weight: 700;
}

.fw-semibold {
  font-weight: 600;
}

.d-none {
  display: none !important;
}

.d-block {
  display: block !important;
}

.d-flex {
  display: flex !important;
}

.w-100 {
  width: 100% !important;
}

.position-relative {
  position: relative !important;
}

.mb-0 {
  margin-bottom: 0 !important;
}

.mb-2 {
  margin-bottom: 0.5rem !important;
}

.mb-3 {
  margin-bottom: 1rem !important;
}

.mb-4 {
  margin-bottom: 1.5rem !important;
}

.mb-5 {
  margin-bottom: 3rem !important;
}

.py-5 {
  padding-top: 3rem !important;
  padding-bottom: 3rem !important;
}

.p-4 {
  padding: 1.5rem !important;
}

.navbar {
  position: relative;
}

.navbar .container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.navbar-brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: var(--brand-primary);
}

.brand-logo {
  width: 82px;
  height: 82px;
  object-fit: contain;
  margin-right: 0.45rem;
}

.brand-wordmark {
  font-weight: 700;
}

.navbar-toggler {
  margin-left: auto;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid var(--border-color);
  border-radius: 0.375rem;
  background: #fff;
}

.navbar-toggler-icon {
  display: inline-block;
  width: 1.5rem;
  height: 1.5rem;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%2833,37,41,0.95%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2.4' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 100%;
}

.navbar-collapse {
  width: 100%;
}

.navbar-nav {
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-link {
  display: block;
  padding: 0.5rem 0.75rem;
  color: var(--brand-primary);
  text-decoration: none;
}

.btn-group {
  display: inline-flex;
  gap: 0.45rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
  line-height: 1.25;
  background: #fff;
  color: var(--brand-primary);
}

.btn-outline-primary,
.btn-outline-secondary {
  border-color: rgba(29, 59, 144, 0.35);
}

.lang-btn.active {
  box-shadow: 0 0 0 2px rgba(47, 92, 196, 0.28);
}

.theme-toggle-container {
  display: inline-flex;
  align-items: center;
}

.hero,
.sub-hero,
.contact-hero,
.legal-hero,
.error-hero {
  position: relative;
  overflow: hidden;
  background: #000;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.36);
  z-index: 2;
}

.carousel,
.carousel-inner,
.carousel-item {
  position: relative;
}

.carousel-item:not(.active) {
  display: none;
}

.carousel-item.active {
  display: block;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  padding-left: 0;
  margin: 0;
  list-style: none;
}

.nav-tabs {
  border-bottom: 1px solid var(--border-color);
}

.nav-tabs .nav-link {
  margin-bottom: -1px;
  border: 1px solid transparent;
  border-top-left-radius: 0.375rem;
  border-top-right-radius: 0.375rem;
  background: transparent;
}

.nav-tabs .nav-link.active {
  background: #fff;
  border-color: var(--border-color) var(--border-color) #fff;
}

.display-5 {
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.1;
}

.lead {
  font-size: 1.125rem;
  line-height: 1.5;
}

.row {
  display: flex;
  flex-wrap: wrap;
  margin-left: -0.75rem;
  margin-right: -0.75rem;
}

.row > * {
  width: 100%;
  padding-left: 0.75rem;
  padding-right: 0.75rem;
}

.justify-content-center {
  justify-content: center !important;
}

.card {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.125);
  border-radius: 0.5rem;
}

.border-0 {
  border: 0 !important;
}

.shadow-lg {
  box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175) !important;
}

.rounded-4 {
  border-radius: 1rem !important;
}

.h3,
.h4,
.h6 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

.h3 {
  font-size: 1.75rem;
}

.h4 {
  font-size: 1.5rem;
}

.h6 {
  font-size: 1rem;
}

@media (min-width: 992px) {
  .navbar-expand-lg .navbar-toggler {
    display: none;
  }

  .navbar-expand-lg .navbar-collapse {
    display: flex !important;
    flex-basis: auto;
    align-items: center;
  }

  .navbar-expand-lg .navbar-nav {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.2rem;
    margin-right: auto;
  }

  .col-lg-9 {
    width: 75%;
  }
}

@media (max-width: 991.98px) {
  .navbar-collapse:not(.show) {
    display: none;
  }

  .navbar .container {
    position: relative;
    min-height: 94px;
    gap: 0;
  }

  .navbar .navbar-brand {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    margin-right: 0;
    z-index: 1;
  }

  .navbar .brand-wordmark {
    display: none !important;
  }
}

@media (min-width: 768px) {
  .p-md-5 {
    padding: 3rem !important;
  }
}
