:root {
  --brand-blue: #0471BA;
  --brand-blue-dark: #035f9c;
  --brand-light: #DEEEF0;
  --page-bg: #f8f9fa;
  --shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  --shadow-md: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
  --radius: 0.5rem;
}

body {
  font-family: "Source Sans 3", system-ui, -apple-system, sans-serif;
  scroll-behavior: smooth;
}

.bg-brand {
  background-color: var(--brand-blue);
}

.bg-brand-light {
  background-color: var(--brand-light);
}

.text-brand {
  color: var(--brand-blue);
}

.btn-brand {
  background-color: var(--brand-blue);
  color: #fff;
  border: none;
}

.btn-brand:hover,
.btn-brand:focus {
  background-color: var(--brand-blue-dark);
  color: #fff;
}

.btn-outline-brand {
  color: var(--brand-blue);
  border: 1px solid var(--brand-blue);
  background-color: transparent;
}

.btn-outline-brand:hover,
.btn-outline-brand:focus {
  background-color: var(--brand-blue);
  color: #fff;
  border-color: var(--brand-blue);
}

footer a {
  color: #ffffff;
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

/* Navbar */
.navbar-brand img {
  height: 50px;
  width: auto;
  max-width: min(100%, 320px);
  transition: opacity 0.15s ease;
}

.navbar-brand:hover img {
  opacity: 0.85;
}

.navbar-nav .nav-link {
  font-weight: 500;
  transition: color 0.15s ease;
}

.navbar-nav .nav-link:hover {
  color: var(--brand-blue);
}

/* Hero */
.hero-section {
  background: linear-gradient(135deg, var(--brand-light) 0%, #e8f4f6 50%, var(--brand-light) 100%);
}

.hero-visual {
  padding: 1rem 0;
}

.hero-visual img {
  max-height: 280px;
  width: auto;
  filter: drop-shadow(0 8px 24px rgba(4, 113, 186, 0.15));
}

/* Service cards */
.card-brand {
  border: none;
  border-top: 3px solid var(--brand-blue);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-brand:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

/* Engagement cards */
.engagement-card {
  overflow: hidden;
}

.engagement-card .card-body {
  display: flex;
  flex-direction: column;
}

.engagement-card .card-text {
  flex-grow: 1;
}

.engagement-illustration {
  display: block;
  max-height: 160px;
  width: auto;
  max-width: 100%;
  margin: 1.5rem auto 0.5rem;
  padding: 0 1rem;
}

.engagement-illustration-lg {
  max-height: 200px;
  margin: 0 auto;
}

.engagement-detail {
  scroll-margin-top: 5rem;
}

/* Capabilities */
.capability-list {
  margin-bottom: 0;
}

.capability-item {
  flex: 0 1 220px;
  max-width: 280px;
}

.capability-icon {
  display: block;
  font-size: 3.5rem;
  color: var(--brand-blue);
  margin-bottom: 1rem;
}

.capability-icon-lg {
  font-size: 4rem;
}

.capability-detail {
  scroll-margin-top: 5rem;
}

@media (max-width: 576px) {
  .capability-list {
    flex-direction: column;
    align-items: center;
    gap: 1.5rem !important;
  }

  .capability-item {
    flex: 1 1 auto;
    max-width: 100%;
  }
}

@media (max-width: 576px) {
  .engagement-illustration {
    max-height: 120px;
  }

  .engagement-illustration-lg {
    max-height: 140px;
  }
}

/* Process steps */
.process-step {
  position: relative;
}

.process-step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background-color: var(--brand-blue);
  color: #fff;
  font-weight: 700;
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.process-step-icon {
  display: block;
  width: auto;
  max-width: 100%;
  height: 7rem;
  margin: 0 auto 1rem;
}

.process-step-icon-lg {
  height: 8.5rem;
}

.process-detail {
  scroll-margin-top: 5rem;
}

/* Section spacing */
.section-py {
  padding-top: 4rem;
  padding-bottom: 4rem;
}

/* Ops panel */
.ops-page {
  background-color: var(--page-bg);
  min-height: 100vh;
}

.ops-sidebar {
  background: #fff;
  min-height: calc(100vh - 56px);
  border-right: 1px solid #dee2e6;
}

.ops-sidebar .nav-link {
  color: #333;
  border-radius: 0.375rem;
}

.ops-sidebar .nav-link.active {
  background-color: var(--brand-light);
  color: var(--brand-blue);
  font-weight: 600;
}

.ops-nav-pills .nav-link.active {
  background-color: var(--brand-blue);
}

/* Portal shells (WiFi + auth) */
.portal-shell {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-height: 100vh;
  padding-bottom: env(safe-area-inset-bottom);
}

@media (min-width: 768px) {
  .portal-shell {
    justify-content: center;
  }
}

/* WiFi portal */
.wifi-portal-body {
  background-color: var(--brand-light);
  min-height: 100vh;
  overflow-x: clip;
}

.wifi-portal-shell {
  /* extends .portal-shell via HTML class list */
}

.wifi-portal-body .form-control {
  font-size: 16px;
}

.wifi-portal-section + .wifi-portal-section {
  margin-top: 0;
}

.wifi-portal-divider {
  display: flex;
  align-items: center;
  margin: 1.5rem 0;
  color: #6c757d;
  font-size: 0.875rem;
}

.wifi-portal-divider::before,
.wifi-portal-divider::after {
  content: "";
  flex: 1;
  border-bottom: 1px solid #dee2e6;
}

.wifi-portal-divider span {
  padding: 0 1rem;
}

.wifi-access-code-input {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* Auth pages */
.auth-portal-body {
  background-color: var(--brand-light);
  min-height: 100vh;
  overflow-x: clip;
}

.auth-portal-shell {
  /* extends .portal-shell via HTML class list */
}

.site-logo img {
  display: inline-block;
  height: 50px;
  max-width: min(100%, 320px);
  width: auto;
}

@media (max-width: 576px) {
  .auth-portal-body .container,
  .wifi-portal-body .container {
    padding-left: 1rem;
    padding-right: 1rem;
    padding-top: 2rem;
    padding-bottom: 2rem;
  }

  .auth-portal-body .card-body,
  .wifi-portal-body .card-body {
    padding: 1.25rem;
  }

  .site-logo img {
    max-height: 44px;
  }

  .auth-portal-body .btn-lg,
  .wifi-portal-body .btn-lg {
    font-size: 1rem;
    padding: 0.65rem 1rem;
  }
}
