/* White + Blue theme overrides for regular theme */
:root {
  --bs-primary: #2563eb;
  --bs-primary-rgb: 37, 99, 235;
  --bs-primary-text-emphasis: #1e40af;
  --bs-primary-bg-subtle: #dbeafe;
  --bs-primary-border-subtle: #93c5fd;
  --brand-navy: #0f2747;
  --brand-navy-soft: #1e3a5f;
  --brand-coral: #ff7f5f;
  --brand-coral-rgb: 255, 127, 95;

  --bs-link-color: #2563eb;
  --bs-link-color-rgb: 37, 99, 235;
  --bs-link-hover-color: #1d4ed8;
  --bs-link-hover-color-rgb: 29, 78, 216;

  --bs-body-bg: #ffffff;
  --bs-body-bg-rgb: 255, 255, 255;
  --bs-tertiary-bg: #ffffff;
  --bs-tertiary-bg-rgb: 255, 255, 255;
}

[data-bs-theme=dark] {
  --bs-primary: #60a5fa;
  --bs-primary-rgb: 96, 165, 250;
  --bs-primary-text-emphasis: #93c5fd;
  --bs-primary-bg-subtle: #1e3a8a;
  --bs-primary-border-subtle: #1d4ed8;
  --brand-navy: #0b1d36;
  --brand-navy-soft: #193152;
  --brand-coral: #ff9b83;
  --brand-coral-rgb: 255, 155, 131;
  --bs-tertiary-bg: #0f172a;
  --bs-tertiary-bg-rgb: 15, 23, 42;
}

/* Match Bootstrap specificity so light theme tokens are actually overridden */
[data-bs-theme=light] {
  --bs-primary: #2563eb;
  --bs-primary-rgb: 37, 99, 235;
  --bs-primary-text-emphasis: #1e40af;
  --bs-primary-bg-subtle: #dbeafe;
  --bs-primary-border-subtle: #93c5fd;
  --bs-body-bg: #ffffff;
  --bs-body-bg-rgb: 255, 255, 255;
  --bs-secondary-bg: #f8fbff;
  --bs-secondary-bg-rgb: 248, 251, 255;
  --bs-tertiary-bg: #ffffff;
  --bs-tertiary-bg-rgb: 255, 255, 255;
  --bs-focus-ring-color: rgba(37, 99, 235, 0.25);
  --bs-focus-ring-opacity: 0.25;
  --bs-nav-link-hover-color: rgb(var(--bs-primary-rgb));
  --bs-navbar-hover-color: rgb(var(--bs-primary-rgb));
}

[data-bs-theme=dark] {
  --bs-nav-link-hover-color: #93c5fd;
  --bs-navbar-hover-color: #93c5fd;
  --bs-nav-tabs-link-hover-border-color: #334155 #334155 #334155;
}

/* Keep custom utility class in sync with the new primary color */
.text-primary-hover:hover {
  color: rgba(var(--bs-primary-rgb), var(--bs-text-opacity, 1)) !important;
}

/* Add a cleaner premium frame with navy structure and soft coral accents */
header.header-menu .offcanvas.show {
  background-image: linear-gradient(135deg, var(--brand-navy) 0%, var(--brand-navy-soft) 100%) !important;
}

header.header-menu .navbar-brand {
  display: inline-flex;
  align-items: center;
}

header.header-menu .header-site-logo {
  width: auto;
  height: clamp(40px, 4.6vw, 58px);
  max-width: min(280px, 62vw);
  object-fit: contain;
}

header.header-menu .offcanvas .header-site-logo {
  height: clamp(38px, 7vw, 50px);
  max-width: min(240px, 70vw);
}

section.quick-link .bg-gradient-dark,
footer .bg-gradient-dark {
  background-image: linear-gradient(135deg, var(--brand-navy) 0%, #173255 100%) !important;
}

a.underline-hover:hover {
  color: var(--brand-coral) !important;
}

.btn-warning,
.badge.text-bg-warning {
  --bs-btn-bg: var(--brand-coral);
  --bs-btn-border-color: var(--brand-coral);
  --bs-btn-hover-bg: #f36d4a;
  --bs-btn-hover-border-color: #f36d4a;
}

.alert-warning {
  --bs-alert-color: #7a2e1a;
  --bs-alert-bg: rgba(var(--brand-coral-rgb), 0.14);
  --bs-alert-border-color: rgba(var(--brand-coral-rgb), 0.35);
}

/* Override Bootstrap components that still carry compiled orange values */
.btn-primary {
  --bs-btn-color: #fff;
  --bs-btn-bg: rgb(var(--bs-primary-rgb));
  --bs-btn-border-color: rgb(var(--bs-primary-rgb));
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: #1d4ed8;
  --bs-btn-hover-border-color: #1d4ed8;
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: #1e40af;
  --bs-btn-active-border-color: #1e40af;
  --bs-btn-disabled-color: #fff;
  --bs-btn-disabled-bg: rgb(var(--bs-primary-rgb));
  --bs-btn-disabled-border-color: rgb(var(--bs-primary-rgb));
}

.btn-outline-primary {
  --bs-btn-color: rgb(var(--bs-primary-rgb));
  --bs-btn-border-color: rgb(var(--bs-primary-rgb));
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: rgb(var(--bs-primary-rgb));
  --bs-btn-hover-border-color: rgb(var(--bs-primary-rgb));
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: #1e40af;
  --bs-btn-active-border-color: #1e40af;
  --bs-btn-disabled-color: rgb(var(--bs-primary-rgb));
  --bs-btn-disabled-border-color: rgb(var(--bs-primary-rgb));
}

.dropdown-menu,
.dropdown-menu-dark {
  --bs-dropdown-link-active-bg: rgb(var(--bs-primary-rgb));
}

.nav-pills {
  --bs-nav-pills-link-active-bg: rgb(var(--bs-primary-rgb));
}

.form-check-input:focus {
  border-color: rgba(var(--bs-primary-rgb), 0.45);
  box-shadow: 0 0 0 0.25rem rgba(var(--bs-primary-rgb), 0.25);
}

.form-check-input:checked,
.form-check-input[type=checkbox]:indeterminate {
  background-color: rgb(var(--bs-primary-rgb));
  border-color: rgb(var(--bs-primary-rgb));
}

.form-range:focus::-webkit-slider-thumb,
.form-range:focus::-moz-range-thumb {
  box-shadow: 0 0 0 1px #fff, 0 0 0 0.25rem rgba(var(--bs-primary-rgb), 0.25);
}

.form-range::-webkit-slider-thumb,
.form-range::-moz-range-thumb {
  background-color: rgb(var(--bs-primary-rgb));
}

.progress,
.progress-stacked {
  --bs-progress-bar-bg: rgb(var(--bs-primary-rgb));
}

.list-group {
  --bs-list-group-active-bg: rgb(var(--bs-primary-rgb));
  --bs-list-group-active-border-color: rgb(var(--bs-primary-rgb));
}

.pagination {
  --bs-pagination-focus-box-shadow: 0 0 0 0.25rem rgba(var(--bs-primary-rgb), 0.25);
  --bs-pagination-active-bg: rgb(var(--bs-primary-rgb));
  --bs-pagination-active-border-color: rgb(var(--bs-primary-rgb));
}

.accordion-button:not(.collapsed) {
  color: rgb(var(--bs-primary-rgb));
}

/* Force nav/tab hover readability in dark mode across pages (including cached menu markup) */
[data-bs-theme=dark] .nav-tabs .nav-link:hover,
[data-bs-theme=dark] .nav-tabs .nav-link:focus {
  background-color: #1a2740 !important;
  color: #93c5fd !important;
  border-color: #334155 #334155 #334155 !important;
}

[data-bs-theme=dark] .nav-pills .nav-link:hover,
[data-bs-theme=dark] .nav-pills .nav-link:focus {
  background-color: #1a2740 !important;
  color: #e2e8f0 !important;
}

[data-bs-theme=dark] .btn-light:hover,
[data-bs-theme=dark] .btn-light:focus,
[data-bs-theme=dark] .buy-package-item.btn-light:hover,
[data-bs-theme=dark] .buy-package-item.btn-light:focus {
  background-color: #1a2740 !important;
  border-color: #3b4d6d !important;
  color: #e2e8f0 !important;
}

header.header-menu .offcanvas.show .nav-link {
  border-radius: 10px;
}

[data-bs-theme=light] header.header-menu .offcanvas.show .nav-link {
  color: #dbeafe !important;
}

[data-bs-theme=light] header.header-menu .offcanvas.show .nav-link:hover,
[data-bs-theme=light] header.header-menu .offcanvas.show .nav-link:focus,
[data-bs-theme=dark] header.header-menu .offcanvas.show .nav-link:hover,
[data-bs-theme=dark] header.header-menu .offcanvas.show .nav-link:focus {
  background-color: rgba(147, 197, 253, 0.18) !important;
  color: rgb(var(--bs-primary-rgb)) !important;
}

footer.footer.bg-body-tertiary {
  background-color: #ffffff !important;
  border-top: 1px solid #e2e8f0;
}

[data-bs-theme=dark] footer.footer.bg-body-tertiary {
  background-color: #0f172a !important;
  border-top: 1px solid #22324d;
}

[data-bs-theme=dark] footer.footer .text-body-secondary {
  color: #b7c3d4 !important;
}

/* Remove gray strips at the bottom of static pages (Terms/Service/etc.) */
[data-bs-theme=light] .bg-body-tertiary,
[data-bs-theme=light] .bg-body-tertiary-hover:hover {
  background-color: #ffffff !important;
}

[data-bs-theme=dark] .bg-body-tertiary,
[data-bs-theme=dark] .bg-body-tertiary-hover:hover {
  background-color: #0f172a !important;
}

/* Header menu tabs: prevent white hover caused by bg-light-hover utility in dark mode */
header.header-menu[data-bs-theme=dark] .navbar-nav .nav-link.text-dark,
header.header-menu[data-bs-theme=dark] .navbar-nav .dropdown > .btn.text-dark {
  color: #e2e8f0 !important;
}

/* Light mode page + dark-themed header: keep tabs visible by default */
[data-bs-theme=light] header.header-menu[data-bs-theme=dark] .navbar-nav .nav-link,
[data-bs-theme=light] header.header-menu[data-bs-theme=dark] .navbar-nav .nav-link.text-dark,
[data-bs-theme=light] header.header-menu[data-bs-theme=dark] .navbar-nav .dropdown > .btn,
[data-bs-theme=light] header.header-menu[data-bs-theme=dark] .navbar-nav .dropdown > .btn.text-dark {
  color: #0f2747 !important;
}

[data-bs-theme=light] header.header-menu[data-bs-theme=dark] .navbar-nav .nav-link.bg-light-hover:hover,
[data-bs-theme=light] header.header-menu[data-bs-theme=dark] .navbar-nav .nav-link.bg-light-hover:focus,
[data-bs-theme=light] header.header-menu[data-bs-theme=dark] .navbar-nav .dropdown > .btn.bg-light-hover:hover,
[data-bs-theme=light] header.header-menu[data-bs-theme=dark] .navbar-nav .dropdown > .btn.bg-light-hover:focus {
  background-color: rgba(37, 99, 235, 0.12) !important;
  color: #1d4ed8 !important;
}

header.header-menu[data-bs-theme=dark] .navbar-nav .nav-link.bg-light-hover:hover,
header.header-menu[data-bs-theme=dark] .navbar-nav .nav-link.bg-light-hover:focus,
header.header-menu[data-bs-theme=dark] .navbar-nav .dropdown > .btn.bg-light-hover:hover,
header.header-menu[data-bs-theme=dark] .navbar-nav .dropdown > .btn.bg-light-hover:focus {
  background-color: #1a2740 !important;
  color: #93c5fd !important;
}

/* Keep light mode header tabs readable and not washed out */
header.header-menu[data-bs-theme=dark] .navbar-nav .nav-link.bg-primary,
header.header-menu[data-bs-theme=dark] .navbar-nav .nav-link.bg-primary:hover,
header.header-menu[data-bs-theme=dark] .navbar-nav .nav-link.bg-primary:focus {
  color: #ffffff !important;
}

/* Safety net for static pages bottom area */
[data-bs-theme=light] .content-section-layout {
  background-color: #ffffff !important;
}

[data-bs-theme=dark] .content-section-layout {
  background-color: #0b1220 !important;
}
