/* Every page gets Inter + subtle glass‑morphism cards + smooth fade‑in */

:root {
  --bs-primary: #0A6AD9;
  --bs-body-font-family: 'Inter', sans-serif;
  --glass-bg: rgba(255, 255, 255, 0.65);
  --glass-border: rgba(255, 255, 255, 0.35);
  --logo-max-height: 3.5rem;
}

[data-bs-theme="dark"] {
  --bs-body-bg: #0d1117;
  --bs-body-color: #c9d1d9;
  --glass-bg: rgba(13, 17, 23, 0.35);
  --glass-border: rgba(255, 255, 255, 0.05);
}

/* glass card helper */
.glass {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(12px) saturate(140%);
  border-radius: 1rem;
}

/* animations */
@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
  }
}

.fade-in {
  animation: fade-in 0.6s ease-out;
}

body {
  font-feature-settings: 'ss01' on;
  padding-bottom: 285px;
  /* Set a soft gradient background for light mode */
  background: linear-gradient(135deg, #f7f9fc, #e6edf7);
  min-height: 100vh;
}

/* nicer focus outline */
*:focus-visible {
  outline: 2px solid var(--bs-primary);
  outline-offset: 2px;
}

/* Base state: keep the banner hidden everywhere */
#rotateNotice {
  display: none;
  background: #0d6efd;
  color: #fff;
  font-weight: 700;
  z-index: 1051;
  animation: fade-in 0.2s ease-out;
}

/* Only reveal on small screens in portrait orientation */
@media (max-width: 767.98px) and (orientation: portrait) {
  #rotateNotice {
    display: block;
  }
}

/* Promo banner styles */
.promo-banner {
  position: fixed;
  bottom: 0;
  left: 0; /* fallback for older browsers */
  inset-block-end: 0;
  inset-inline-start: 0;
  width: 100%;
  z-index: 1050;
  box-shadow: 0 -4px 8px rgba(0, 0, 0, 0.25);
  background-color: rgba(var(--bs-body-bg-rgb), 0.75);
  text-align: center;
  animation: slideUpFadeIn 0.6s ease-out;
  display: none !important;
}

/* Mirror layout in RTL */
:dir(rtl) .promo-banner {
  inset-inline-start: auto;
  inset-inline-end: 0;
}

/* Promo label styles */
.promo-label {
  position: absolute;
  top: 4px;
  right: 8px; /* fallback for older browsers */
  inset-inline-end: 8px;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
  pointer-events: none;
  z-index: 1051;
}

.promo-banner img {
  max-height: 120px;
  object-fit: contain;
}

/* original desktop cap */
.promo-banner img {
  max-height: 240px;
  width: 100%;
}

@media (max-width: 768px) {
  .promo-banner img {
    max-height: 60vw;
  }
  body {
    padding-bottom: 64vw;
  }
}

@media (max-height: 768px) {
  .promo-banner img {
    max-height: 30vh;
  }
  body {
    padding-bottom: 34vh;
  }
}

/* Slide animation */
@keyframes slideUpFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 3 — Shrink the image to fit, without distorting it */
.navbar-brand img {
  height: var(--logo-max-height);
  width: auto;
  object-fit: contain;
  display: block;
}

/* 4 — Make sure things stay vertically centred */
.navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

:dir(rtl) .navbar-brand {
  flex-direction: row-reverse;
}

/* Utility text alignment classes (optional) */
.text-flow-start {
  text-align: start !important;
}

.text-flow-end {
  text-align: end !important;
}

.em {
  font-style: italic;
}

.dropdown-item {
  text-align: start;
}

footer {
  padding-left: 10%;
  padding-right: 10%;
}

/* ------------------------------------------------------------------------- */
/* Custom facelift styles                                                      */
/* These rules enhance the visual appearance of the site by adding gradients,
   subtle shadows and smoother interactions for buttons and form controls.      */

/* Dark mode gradient background – override the default dark body colour */
[data-bs-theme="dark"] body {
  background: linear-gradient(135deg, #0e1723, #152238);
}

/* Enhance the glass effect with a soft shadow */
.glass {
  box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.1);
}

/* Gradient buttons with hover lift effect */
.btn-primary {
  background-image: linear-gradient(to right, #0A6AD9, #0E81CE);
  border: none;
  box-shadow: 0 0.4rem 1rem rgba(0, 106, 217, 0.25);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0.6rem 1.2rem rgba(0, 106, 217, 0.35);
}
.btn-primary:focus-visible {
  box-shadow: 0 0 0 0.25rem rgba(10, 106, 217, 0.4);
}

.btn-success {
  background-image: linear-gradient(to right, #2BB673, #00C853);
  border: none;
  box-shadow: 0 0.4rem 1rem rgba(43, 182, 115, 0.25);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn-success:hover {
  transform: translateY(-2px);
  box-shadow: 0 0.6rem 1.2rem rgba(43, 182, 115, 0.35);
}
.btn-success:focus-visible {
  box-shadow: 0 0 0 0.25rem rgba(43, 182, 115, 0.4);
}

/* Rounded and styled form controls */
.form-control {
  border-radius: 0.5rem;
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.form-control:focus {
  border-color: var(--bs-primary);
  box-shadow: 0 0 0 0.25rem rgba(10, 106, 217, 0.25);
}

/* Improve promo banner appearance when displayed */
.promo-banner {
  backdrop-filter: blur(12px) saturate(120%);
  box-shadow: 0 -0.5rem 1rem rgba(0, 0, 0, 0.25);
}