/* ============================================================
   ZipLink Systems — Brand Stylesheet
   Primary Red:  #b32035  (softened ZipLink red — same hue, less saturated)
   Dark Red:     #8f1929  (hover / depth)
   Light Red:    #c9384f  (accents / focus rings)
   Near-black:   #111827  (text & dark surfaces)
   Light gray:   #f3f4f6  (section backgrounds)
   ============================================================ */

:root {
  --zl-primary: #b32035;
  --zl-primary-dark: #8f1929;
  --zl-primary-light: #c9384f;
  --zl-dark: #111827;
  --zl-gray: #6b7280;
  --zl-light: #f3f4f6;
}

/* Phones: the logo takes at most 30% of the screen width, so the Call, Log in
   and menu buttons always fit on one line, even with a larger phone text size */

@media (max-width: 575.98px) {
  .navbar-logo {
    width: 30vw;
    max-width: 117px;
    height: auto;
  }
}

@media (max-width: 575.98px) {
  .navbar-brand {
    margin-right: 0.5rem;
  }
}

@media (max-width: 575.98px) {
  .navbar .navbar-toggler {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }
}

/* ── Bootstrap primary overrides ───────────────────────────── */

.bg-primary {
  background-color: var(--zl-primary) !important;
}

/* Pale tint for .bg-primary with Bootstrap's bg-opacity classes (our .bg-primary override ignores them) */

.bg-primary.bg-opacity-10 {
  background-color: rgba(179, 32, 53, 0.1) !important;
}

.bg-primary.bg-opacity-25 {
  background-color: rgba(179, 32, 53, 0.25) !important;
}

.text-primary {
  color: var(--zl-primary) !important;
}

.btn-primary {
  background-color: var(--zl-primary);
  border-color: var(--zl-primary);
}

.btn-primary:hover, .btn-primary:focus {
  background-color: var(--zl-primary-dark);
  border-color: var(--zl-primary-dark);
}

.btn-outline-primary {
  color: var(--zl-primary);
  border-color: var(--zl-primary);
}

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

.btn-outline-danger {
  color: var(--zl-primary);
  border-color: var(--zl-primary);
}

.btn-outline-danger:hover, .btn-outline-danger:focus {
  background-color: var(--zl-primary);
  border-color: var(--zl-primary);
  color: #fff;
}

/* Brand red for Bootstrap's own "primary" colours (default is blue) */

:root, [data-bs-theme="dark"] {
  --bs-primary: #b32035;
  --bs-primary-rgb: 179, 32, 53;
  --bs-focus-ring-color: rgba(179, 32, 53, 0.25);
}

:root {
  --bs-link-color: #b32035;
  --bs-link-color-rgb: 179, 32, 53;
  --bs-link-hover-color: #8f1929;
  --bs-link-hover-color-rgb: 143, 25, 41;
}

/* Links in dark areas: lighter red so they read on navy */

[data-bs-theme="dark"] {
  --bs-link-color: #f0566c;
  --bs-link-color-rgb: 240, 86, 108;
  --bs-link-hover-color: #f58a99;
  --bs-link-hover-color-rgb: 245, 138, 153;
}

/* Every state of the red button (pressed, disabled, keyboard focus) */

.btn-primary {
  --bs-btn-bg: #b32035;
  --bs-btn-border-color: #b32035;
  --bs-btn-hover-bg: #8f1929;
  --bs-btn-hover-border-color: #8f1929;
  --bs-btn-active-bg: #8f1929;
  --bs-btn-active-border-color: #8f1929;
  --bs-btn-disabled-bg: #b32035;
  --bs-btn-disabled-border-color: #b32035;
  --bs-btn-focus-shadow-rgb: 179, 32, 53;
}

/* Field focus highlight and ticked checkboxes */

.form-control:focus, .form-select:focus, .form-check-input:focus {
  border-color: #c9384f;
  box-shadow: 0 0 0 0.25rem rgba(179, 32, 53, 0.25);
}

.form-check-input:checked {
  background-color: #b32035;
  border-color: #b32035;
}

[data-bs-theme="dark"] .form-control:focus, [data-bs-theme="dark"] .form-select:focus, [data-bs-theme="dark"] .form-check-input:focus {
  border-color: #f0566c;
  box-shadow: 0 0 0 0.25rem rgba(240, 86, 108, 0.25);
}

/* ── Typography ─────────────────────────────────────────────── */

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--zl-dark);
}

h1, h2, h3, h4, h5, h6 {
  color: var(--zl-dark);
}

/* ── Logo handling ──────────────────────────────────────────── */

/* Navbar logo — 200×530 horizontal format, fits cleanly in the navbar. */

.navbar-logo {
  height: 60px;
  width: auto;
  display: block;
}

/* Footer / dark-background variant.
   brightness(0)  → turns everything solid black
   invert(1)      → flips black to white
   Result: clean all-white logo silhouette — legible on any dark surface. */

.logo-dark-bg {
  height: 48px;
  width: auto;
  display: block;
  filter: brightness(0) invert(1);
  opacity: 0.90;
  margin: -4px 0;
}

/* ── Navigation ─────────────────────────────────────────────── */

.navbar {
  transition: box-shadow 0.3s ease;
}

.nav-link {
  font-weight: 500;
  padding: 0.5rem 1rem !important;
  color: var(--zl-dark);
  transition: color 0.2s ease;
}

.nav-link:hover, .nav-link.active {
  color: var(--zl-primary);
}

/* ── Top bar ────────────────────────────────────────────────── */

.top-bar {
  font-size: 0.875rem;
}

.top-bar a:hover {
  text-decoration: underline !important;
}

/* ── Hero ───────────────────────────────────────────────────── */

.hero-section {
  background: linear-gradient(140deg, #1c1c1c 0%, #2e1119 50%, var(--zl-primary-dark) 100%);
  position: relative;
  overflow: hidden;
}

/* Subtle dot-grid texture */

.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
}

/* Red accent stripe at bottom of hero */

.hero-section::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--zl-primary);
}

.min-vh-50 {
  min-height: 50vh;
}

.hero-image-placeholder {
  aspect-ratio: 4 / 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* ── Cards ──────────────────────────────────────────────────── */

.card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1) !important;
}

.feature-icon {
  transition: transform 0.2s ease;
}

.card:hover .feature-icon {
  transform: scale(1.1);
}

/* ── Image placeholders ─────────────────────────────────────── */

.image-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: var(--zl-light);
}

/* ── Buttons ────────────────────────────────────────────────── */

.btn {
  font-weight: 500;
  padding: 0.625rem 1.25rem;
  border-radius: 0.5rem;
  transition: all 0.2s ease;
}

.btn-lg {
  padding: 0.875rem 1.75rem;
  font-size: 1rem;
}

.btn-light {
  background-color: #ffffff;
  color: var(--zl-primary);
}

.btn-light:hover {
  background-color: var(--zl-light);
  color: var(--zl-primary-dark);
}

/* ── Footer ─────────────────────────────────────────────────── */

footer a:hover {
  color: #ffffff !important;
}

/* ── Mobile sticky call bar ─────────────────────────────────── */

@media (max-width: 767.98px) {
  body {
    padding-bottom: 80px;
  }
}

@media (max-width: 767.98px) {
  footer {
    padding-bottom: 100px !important;
  }
}

/* ── Responsive typography ──────────────────────────────────── */

@media (max-width: 991.98px) {
  .hero-section {
    text-align: center;
  }
}

@media (max-width: 991.98px) {
  .hero-section .d-flex {
    justify-content: center;
  }
}

@media (max-width: 575.98px) {
  .display-4 {
    font-size: 2rem;
  }
}

@media (max-width: 575.98px) {
  .lead {
    font-size: 1rem;
  }
}

/* ── Accessibility: focus rings ─────────────────────────────── */

a:focus, button:focus, .btn:focus {
  outline: 2px solid var(--zl-primary-light);
  outline-offset: 2px;
}

/* ── Misc ───────────────────────────────────────────────────── */

html, body {
  overflow-x: hidden;
}

html {
  scroll-behavior: smooth;
}

.badge {
  font-weight: 500;
  padding: 0.5em 1em;
}

.blockquote p {
  line-height: 1.8;
}

/* ── Pricing Cards ──────────────────────────────────────────── */

.pricing-card {
  border-radius: 1rem;
}

.pricing-card--featured {
  border: 2px solid var(--zl-primary) !important;
  border-radius: 1rem;
  position: relative;
}

.pricing-speed {
  color: var(--zl-dark);
  line-height: 1;
}

.pricing-price {
  line-height: 1;
}

/* ── Page Hero (inner pages) ────────────────────────────────── */

.page-hero {
  padding-top: 3rem;
  padding-bottom: 3rem;
}

/* ── Emergency Alert Banner ─────────────────────────────────── */

.alert-banner {
  background-color: #7a1520;
  color: #fff;
  width: 100%;
  overflow: hidden;
  border-bottom: 2px solid #f59e0b;
}

.alert-banner__inner {
  display: flex;
  align-items: center;
  height: 40px;
}

.alert-banner__label {
  flex-shrink: 0;
  background-color: #f59e0b;
  color: #111827;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0 1rem;
  height: 100%;
  display: flex;
  align-items: center;
  white-space: nowrap;
}

.alert-banner__label--btn {
  border: none;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.alert-banner__label--btn:hover, .alert-banner__label--btn:focus {
  background-color: #d97706;
  color: #111827;
  outline: 2px solid #fff;
  outline-offset: -3px;
}

/* ── Service Updates Modal ───────────────────────────────────── */

.alert-updates-modal__header {
  background-color: #7a1520;
  border-bottom: 2px solid #f59e0b;
}

.alert-updates-modal__footer {
  background-color: #f9fafb;
  border-top: 1px solid #e5e7eb;
}

.alert-updates-list {
}

.alert-updates-list__item {
  display: flex;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #f3f4f6;
}

.alert-updates-list__item:last-child {
  border-bottom: none;
}

.alert-updates-list__icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  margin-top: 0.1rem;
}

.alert-updates-list__icon--critical {
  background-color: #fee2e2;
  color: #b91c1c;
}

.alert-updates-list__icon--warning {
  background-color: #fef3c7;
  color: #b45309;
}

.alert-updates-list__icon--info {
  background-color: #dbeafe;
  color: #1d4ed8;
}

.alert-updates-list__icon--resolved {
  background-color: #d1fae5;
  color: #047857;
}

.alert-updates-list__body {
  flex: 1;
  min-width: 0;
}

.alert-updates-list__title {
  font-size: 0.9rem;
  font-weight: 600;
  color: #111827;
  margin-bottom: 0.2rem;
}

.alert-updates-list__meta {
  font-size: 0.75rem;
  color: #6b7280;
  margin-bottom: 0.35rem;
}

.alert-updates-list__text {
  font-size: 0.8375rem;
  color: #374151;
  line-height: 1.5;
  margin: 0;
}

.alert-updates-list__empty {
  padding: 2.5rem 1.25rem;
}

.alert-banner__track-wrap {
  flex: 1;
  overflow: hidden;
  height: 100%;
  position: relative;
}

.alert-banner__track {
  display: flex;
  align-items: center;
  height: 100%;
  white-space: nowrap;
  will-change: transform;
}

.alert-banner__message {
  font-size: 0.875rem;
  font-weight: 500;
  padding-right: 6rem;
}

.alert-banner__close {
  flex-shrink: 0;
  background: none;
  border: none;
  color: rgba(255,255,255,0.7);
  padding: 0 1rem;
  height: 100%;
  cursor: pointer;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  transition: color 0.2s ease;
}

.alert-banner__close:hover {
  color: #fff;
}

/* Smooth open/close animation */

.alert-banner.is-visible {
  animation: alertSlideDown 0.35s ease forwards;
}

.alert-banner.is-hiding {
  animation: alertSlideUp 0.3s ease forwards;
}

@keyframes alertSlideDown {
  from {
    max-height: 0;
    opacity: 0;
  }
  to {
    max-height: 60px;
    opacity: 1;
  }
}

@keyframes alertSlideUp {
  from {
    max-height: 60px;
    opacity: 1;
  }
  to {
    max-height: 0;
    opacity: 0;
  }
}

/* ── Legal / Policy pages ───────────────────────────────────── */

.col-lg-9 h6.fw-bold {
  color: var(--zl-dark);
  margin-top: 1.5rem;
}

/* Updates button: shine, brightness pulse and icon wiggle every few seconds */

.alert-banner__label--btn {
  position: relative;
  overflow: hidden;
  animation: updatesPulse 3s ease-in-out 1s infinite;
}

.alert-banner__label--btn::after {
  content: "";
  position: absolute;
  top: 0;
  left: -90%;
  width: 70%;
  height: 100%;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.85) 50%, rgba(255, 255, 255, 0) 100%);
  pointer-events: none;
  animation: updatesShine 3s ease-in-out 1s infinite;
}

.alert-banner__label--btn svg {
  transform-origin: 50% 90%;
  animation: updatesNudge 3s ease-in-out 1s infinite;
}

@keyframes updatesShine {
  0% {
    left: -90%;
  }
  35%, 100% {
    left: 130%;
  }
}

@keyframes updatesPulse {
  0%, 40%, 100% {
    filter: brightness(1);
  }
  15% {
    filter: brightness(1.25);
  }
}

@keyframes updatesNudge {
  0%, 35%, 100% {
    transform: rotate(0deg) scale(1);
  }
  5% {
    transform: rotate(-18deg) scale(1.15);
  }
  10% {
    transform: rotate(15deg) scale(1.15);
  }
  15% {
    transform: rotate(-10deg) scale(1.1);
  }
  20% {
    transform: rotate(6deg) scale(1.05);
  }
  25% {
    transform: rotate(-2deg) scale(1);
  }
}

.alert-banner__label--btn:hover, .alert-banner__label--btn:focus, .alert-banner__label--btn:hover::after, .alert-banner__label--btn:focus::after, .alert-banner__label--btn:hover svg, .alert-banner__label--btn:focus svg {
  animation: none;
}

@media (prefers-reduced-motion: reduce) {
  .alert-banner__label--btn, .alert-banner__label--btn::after, .alert-banner__label--btn svg {
    animation: none;
  }
}

/* Home page animations: keep side fly-ins from causing a sideways scrollbar on phones */

.hero-section, section {
  overflow-x: clip;
}

/* Gentle lift on the feature and pricing cards */

section .card.shadow-sm, section .card.shadow {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

section .card.shadow-sm:hover, section .card.shadow:hover {
  transform: translateY(-4px);
  box-shadow: 0 0.75rem 1.5rem rgba(0, 0, 0, 0.12) !important;
}

/* Visitors who ask for less motion: show everything without animating */

@media (prefers-reduced-motion: reduce) {
  [data-aos] {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  section .card.shadow-sm, section .card.shadow-sm:hover, section .card.shadow, section .card.shadow:hover {
    transition: none;
    transform: none;
  }
}

/* Bullet lists: the list is centered as a block; the bullets inside stay left-aligned */

.zl-center-bullets {
  width: fit-content;
  max-width: 100%;
  margin-left: auto !important;
  margin-right: auto !important;
  text-align: left;
}

/* A .row lays bullets out side by side when sizing; stack it so fit-content = the widest bullet */

.row.zl-center-bullets {
  flex-direction: column;
}

/* Portal: the Financial card's documents list scrolls inside its own box,
   with the column headings kept visible */

.zl-docs-scroll {
  max-height: 22rem;
  overflow-y: auto;
}

.zl-docs-scroll thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background-color: var(--bs-body-bg);
  box-shadow: inset 0 -1px 0 var(--bs-border-color);
}

/* Home page: dark sections below the hero (sections carry data-bs-theme="dark") */

.zl-dark-section {
  background-color: #111827;
  color: #e5e7eb;
}

.zl-dark-section.zl-dark-alt {
  background-color: #0b1220;
}

.zl-dark-section h1, .zl-dark-section h2, .zl-dark-section h3, .zl-dark-section h4, .zl-dark-section h5, .zl-dark-section h6, .zl-dark-section strong {
  color: #ffffff;
}

.zl-dark-section .text-muted {
  color: #9ca3af !important;
}

.zl-dark-section .card {
  background-color: #1f2937;
  border: 1px solid rgba(255, 255, 255, 0.06) !important;
}

.zl-dark-section .card:hover {
  box-shadow: 0 0.75rem 1.5rem rgba(0, 0, 0, 0.5) !important;
}

/* The brand red is too dark to read on navy, so use a lighter red here */

.zl-dark-section .text-primary {
  color: #f0566c !important;
}

.zl-dark-section .bg-primary.bg-opacity-10 {
  background-color: rgba(240, 86, 108, 0.15) !important;
}

.zl-dark-section .btn-outline-primary {
  color: #f0566c;
  border-color: #f0566c;
}

.zl-dark-section .btn-outline-primary:hover, .zl-dark-section .btn-outline-primary:focus {
  color: #ffffff;
  background-color: var(--zl-primary);
  border-color: var(--zl-primary);
}

.zl-dark-section hr {
  border-top-color: #f0566c !important;
}

/* Links styled text-dark (e.g. the phone number and email on the contact page) stay readable in dark sections */

.zl-dark-section .text-dark {
  color: #ffffff !important;
}

.zl-dark-section a.text-dark:hover {
  color: #f0566c !important;
}

/* Keep the featured pricing card's red outline in dark sections (lighter red to read on navy) */

.zl-dark-section .pricing-card--featured {
  border: 2px solid #f0566c !important;
}

/* Portal: dark theme (the views and dialogs carry zl-dark-section + data-bs-theme="dark") */

body.zl-portal-body {
  background-color: #111827;
}

.modal-content.zl-dark-section {
  background-color: #1f2937;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.zl-dark-section .table {
  --bs-table-bg: transparent;
}

.zl-dark-section .zl-docs-scroll thead th {
  background-color: #1f2937;
}

/* Resolved tickets: dimmed row instead of Bootstrap's light-grey one */

.zl-dark-section .table-secondary {
  --bs-table-bg: rgba(255, 255, 255, 0.04);
  --bs-table-color: #9ca3af;
  --bs-table-border-color: rgba(255, 255, 255, 0.08);
  --bs-table-hover-bg: rgba(255, 255, 255, 0.08);
  --bs-table-hover-color: #d1d5db;
  color: #9ca3af;
}

/* The black "resolved" badge would vanish on dark grey */

.zl-dark-section .badge.text-bg-dark {
  background-color: #4b5563 !important;
  color: #ffffff !important;
}

/* Service updates dialog: its list and footer had light colours */

.zl-dark-section .alert-updates-modal__footer {
  background-color: #111827;
  border-top-color: rgba(255, 255, 255, 0.08);
}

.zl-dark-section .alert-updates-list__item {
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

.zl-dark-section .alert-updates-list__title {
  color: #ffffff;
}

.zl-dark-section .alert-updates-list__meta {
  color: #9ca3af;
}

.zl-dark-section .alert-updates-list__text {
  color: #d1d5db;
}

/* Pages whose content sits in a container (AUP, Privacy): dark page background */

body.zl-dark-body {
  background-color: #111827;
}

