/*================================================================================================*/
/*=====================================  ABSOLUTE DRONE CSS  =====================================*/
/*=================================  CLEAN + CONSISTENT + SAFE  =================================*/
/*================================================================================================*/

/*==================== RESET ====================*/
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/*==================== GLOBAL SCROLLBAR STABILITY ====================*/
/* Keep page width consistent between short/long pages */
html {
  overflow-y: scroll;       /* fallback */
  scrollbar-gutter: stable; /* modern browsers */
}

/*==================== ROOT VARIABLES ====================*/
:root {
  --primary-color: #041E42;
  --hover-color: #ff4c00;

  --footer-bg-color: #041E42;
  --footer-text-color: #fff;

  --body-light-bg-color: #fff;

  --text-light-color: #000;

  --h1-font-size: 36px;
  --h2-font-size: 30px;
  --h3-font-size: 1rem;
  --h4-font-size: 1rem;

  --h1-font-weight: 900;
  --h2-font-weight: 900;
  --h3-font-weight: 900;
  --h4-font-weight: 600;

  --h1-color: #FF4C00;
  --h2-color: #FF4C00;
  --h3-color: #FF4C00;
  --h4-color: #041E42;
}





/*==================== TYPE ====================*/
h1 {
  font-size: var(--h1-font-size) !important;
  font-weight: var(--h1-font-weight) !important;
  color: var(--h1-color) !important;
  text-transform: uppercase !important;
}

h2 {
  font-size: var(--h2-font-size) !important;
  font-weight: var(--h2-font-weight) !important;
  color: var(--h2-color) !important;
  text-transform: uppercase !important;
}

h3 {
  font-size: var(--h3-font-size) !important;
  font-weight: var(--h3-font-weight) !important;
  color: var(--h3-color) !important;
  text-transform: uppercase !important;
}

h4 {
  font-size: var(--h4-font-size) !important;
  font-weight: var(--h4-font-weight) !important;
  color: var(--h4-color) !important;
  text-transform: uppercase !important;
}

strong {
  font-weight: 800 !important;
  font-size: 1rem !important;
  text-transform: uppercase !important;
}

/*==================== LAYOUT / STICKY-SAFE BASE ====================*/
/* IMPORTANT: do NOT set overflow on html/body in a way that breaks sticky */
html, body {
  min-height: 100%;
  font-family: Arial, sans-serif;
  background-color: var(--body-light-bg-color);
  color: var(--text-light-color);
  font-size: 18px;
  line-height: 1.5rem;
}

/* Keep pages structured naturally */
main { flex: 1; }

/*==================== NAVBAR (GLOBAL) ====================*/
/* Sticky breaks if any parent has overflow/transform. We keep sticky rules isolated and strong. */

#navbarContainer {
  z-index: 5000; /* above page content */
}

/* Target the injected nav itself */
#navbarContainer nav.navbar {
  position: sticky !important;
  top: 0 !important;
  z-index: 5000 !important;

  width: 100%;
  min-height: 60px;

  /* Visual separation (your “missing border/shadow” issue) */
  border-bottom: 1px solid rgba(4, 30, 66, 0.18);
  box-shadow: 0 6px 14px rgba(4, 30, 66, 0.12);

  /* Ensure it paints solid (prevents content bleeding behind) */
  background-color: #ffffff !important;
}

/* If your JS adds sticky-top, keep it consistent */
#navbarContainer nav.navbar.sticky-top {
  position: sticky !important;
  top: 0 !important;
  z-index: 5000 !important;
}

/* Brand alignment */
#navbarContainer .navbar-brand {
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
}

/* Default brand images */
#navbarContainer .navbar-brand img {
  height: 30px;
  max-height: 34px;
  width: auto;
  display: block;
  object-fit: contain;
}

/* Nav links */
#navbarContainer .navbar-nav {
  min-height: 40px;
}

#navbarContainer .navbar-nav .nav-link {
  color: var(--primary-color);
  text-decoration: none;
  transition: text-decoration 0.3s ease, color 0.3s ease;
}

#navbarContainer .navbar-nav .nav-link:hover {
  text-decoration: underline;
  color: var(--hover-color);
}

/* Toggler (don’t remove border — you want a consistent button) */
#navbarContainer .navbar-toggler {
  margin-left: auto;
  background: transparent;
  border: 1px solid rgba(0, 0, 0, 0.15);
}

/*==================== BUTTONS ====================*/
.btn-custom {
  background-color: var(--primary-color) !important;
  color: #fff !important;
  border: 2px solid var(--primary-color) !important;
  font-weight: 800;
  text-transform: uppercase;
}

.btn-custom:hover {
  background-color: var(--hover-color) !important;
  border-color: var(--hover-color) !important;
  color: #fff !important;
}

/*==================== BUTTON ICON (BOOKING) ====================*/
.btn-logo {
  height: 22px;
  width: auto;
  margin-right: 8px;
  vertical-align: middle;
}

/*==================== PRICING CARDS ====================*/
.card-thick-border {
  border: 2px solid #dee2e6;
  border-radius: 12px;
  transition: all 0.2s ease-in-out;
}

/* Hover effect (all cards) */
.card-thick-border:hover {
  border-color: var(--primary-color);
  transform: translateY(-3px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
}

/* Middle (Most Popular) card */
.card.border-primary {
  border-width: 3px !important;
  transform: scale(1.03);
  z-index: 2;
}

/* Prevent layout shift on hover */
.card.border-primary:hover {
  transform: scale(1.03) translateY(-3px);
}
/*==================== FOOTER ====================*/
footer {
  background-color: var(--footer-bg-color);
  color: var(--footer-text-color);
  padding: 10px 0;
}

footer a {
  color: var(--hover-color);
  text-decoration: none;
  margin: 0;
  position: relative;
}

footer a:hover {
  color: var(--hover-color);
  text-decoration: underline;
}

.footer-menu {
  display: flex;
  justify-content: flex-start;
  list-style: none;
  padding: 0;
  margin: 0;
}

#copyrightContainer {
  background-color: var(--footer-bg-color);
  color: var(--footer-text-color);
  text-align: center;
  padding: 10px;
}

/*==================== FORMS ====================*/
.validation-icon {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.2rem;
  font-weight: bold;
}

/* IMPORTANT: don't force all invalid inputs red/green globally (it fights Bootstrap).
   Keep your page-level validation styles in the page (like register.php) */
.form-control.is-invalid {
  background-color: #f8d7da;
  border: 2px solid #dc3545;
}

/*==================== TABLES (GLOBAL) ====================*/
.table {
  border-radius: 10px;
  overflow: hidden; /* ok: does not affect sticky navbar */
}

/* Default styling for ALL tables */
body .table {
  background-color: #ffffff;
  color: #000;
}

body .table thead {
  background-color: #f8f9fa;
}

body .table th,
body .table td {
  border: 1px solid #dee2e6;
  padding: 10px;
}

body .table-striped tbody tr:nth-of-type(odd) {
  background-color: #f2f2f2;
}

body .table-hover tbody tr:hover {
  background-color: #e9ecef;
}

/*================================================================================================
======================================  TABLE: FIT TO CONTENT  ===================================
================================================================================================*/

/* By default Bootstrap tables are width:100%. This makes them shrink to content. */
.table.table-fit {
  width: auto !important;
  table-layout: auto !important;
}

/* Keep headers/cells from stretching due to wrapping */
.table.table-fit th,
.table.table-fit td {
  white-space: nowrap;
  width: 1%;                /* classic trick: let the browser size to content */
}

/* Actions column: always tight */
.table.table-fit .col-actions {
  width: 1% !important;
  white-space: nowrap !important;
}

/* If you have a button row wrapper like .action-buttons */
.table.table-fit .action-buttons {
  white-space: nowrap;
}


/*==================== POPUP OVERLAY (NON-BOOTSTRAP) ====================*/
.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 6000; /* above navbar */
}

.popup-card {
  background-color: rgba(255, 76, 0, 0.5) !important;
  color: white !important;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  z-index: 6001;
  text-align: center;
}

/*==================== PORTAL BASE (LIGHT MODE) ====================*/
.portal .card {
  background-color: #ffffff;
  border-color: #dee2e6;
}

.portal .list-group-item {
  background-color: #ffffff;
  border-color: #dee2e6;
  color: var(--text-light-color);
}

/* Tables in portal (Flight History, etc.) */
.portal .table {
  background-color: #ffffff;
  color: var(--text-light-color);
}

.portal .table thead th {
  background-color: #f8f9fa;
  color: #212529;
}

/* Striped rows */
.portal .table-striped > tbody > tr:nth-of-type(odd) {
  background-color: #f8f9fa;
}

.portal .table-striped > tbody > tr:nth-of-type(even) {
  background-color: #ffffff;
}

/* Form fields (portal) */
.portal .form-control,
.portal textarea,
.portal input[type="text"],
.portal input[type="number"],
.portal input[type="datetime-local"],
.portal select {
  background-color: #ffffff;
  color: var(--text-light-color);
  border-color: #ced4da;
}

.portal .form-control::placeholder,
.portal textarea::placeholder,
.portal input::placeholder {
  color: #6c757d;
}

/*==================== LOGOS (DESKTOP/MOBILE SWITCH) ====================*/
.logo-mobile { display: none; }
.logo-desktop { display: block; }

@media (max-width: 768px) {
  .logo-desktop { display: none !important; }
  .logo-mobile  { display: block !important; }
}

/*================================================================================================*/
/*==================== NAVBAR (FIXED-TOP, RELIABLE ON ALL PAGES) ====================*/
/*================================================================================================*/

/* /===/ Adjust these once if needed */
:root {
  --nav-offset-desktop: 82px; /* space for fixed navbar so content doesn't sit underneath */
  --nav-offset-mobile: 72px;
}

/* /===/ Site-wide offset so content starts below fixed navbar */
body {
  padding-top: var(--nav-offset-desktop);
}

/* /===/ Make injected navbar always fixed and above content */
#navbarContainer nav.navbar {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;

  z-index: 5000 !important;

  /* Shadow + bottom border (what you asked for) */
  box-shadow: 0 4px 12px rgba(0,0,0,0.10) !important;
  border-bottom: 1px solid rgba(0,0,0,0.12) !important;
}

/* Safe anchor for the absolute mobile dropdown (DO NOT set relative on the nav itself) */
#navbarContainer nav.navbar > .container,
#navbarContainer nav.navbar > .container-fluid {
  position: relative;
}

/*================================================================================================*/
/*==================== NAVBAR CONTROLS (DESKTOP + MOBILE) ====================*/
/*================================================================================================*/

/*--------------------------------------------------------------------------------------------*/
/* NAVBAR (ALL SIZES): force the blue border line + keep it above content
/*--------------------------------------------------------------------------------------------*/
#navbarContainer nav.navbar {
  z-index: 5000 !important;
  border-bottom: 3px solid var(--primary-color, #041E42) !important; /* BLUE LINE (desktop + mobile) */
}

/*================================================================================================*/
/*==================== MOBILE NAVBAR CONTROLS (FIXED SAFE) ====================*/
/*================================================================================================*/
@media (max-width: 768px) {

  body {
    padding-top: var(--nav-offset-mobile);
  }

  /* Mobile logo sizing */
  #navbarContainer .navbar-brand img.logo-mobile {
    display: block !important;
    height: 36px !important;
    max-height: 40px !important;
    width: auto !important;
    object-fit: contain !important;
    vertical-align: middle !important;
  }

  /* Hamburger button sizing */
  #navbarContainer .navbar-toggler {
    padding: 0.1rem 0.4rem !important;
    font-size: 1rem;
    line-height: 1 !important;
    background-color: transparent;
    border: 1px solid rgba(0, 0, 0, 0.15) !important;
    border-radius: 0.25rem;
    min-width: 2.4rem;
    min-height: 2.4rem;
    position: relative;
    z-index: 5002 !important; /* clickable */
  }

  #navbarContainer .navbar-toggler-icon {
    width: 1.2em;
    height: 1.2em;
  }

  /* Emergency button sizing (if present) */
  #navbarContainer .navbar .emergency-nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 2.4rem;
    min-height: 2.4rem;
    padding: 0.1rem 0.3rem;

    border-width: 2px;
    border-style: solid;
    border-color: #dc3545;
    color: #dc3545;
    background-color: transparent;
    border-radius: 0.25rem;
    font-size: 1.2rem;

    margin-left: auto !important;
    position: relative;
    z-index: 5002 !important;
  }

  /* Dropdown menu floats over content (works with fixed/sticky navbar)
     IMPORTANT: anchor dropdown to the inner container, not the nav itself
  */
  #navbarContainer nav.navbar > .container,
  #navbarContainer nav.navbar > .container-fluid {
    position: relative; /* safe anchor for absolute dropdown */
  }

  #navbarContainer .navbar-collapse {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;

    max-height: 0;
    overflow: hidden;

    background-color: #ffffff !important;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);

    /* Above the navbar so it overlays */
    z-index: 5003 !important;

    visibility: hidden;
    opacity: 0;

    transition: max-height 0.2s ease, opacity 0.2s ease;
  }

  #navbarContainer .navbar-collapse.show {
    max-height: 420px;
    visibility: visible;
    opacity: 1;
    overflow-y: auto;
  }

  #navbarContainer .navbar-collapse.show .nav-link {
    padding-top: 0.35rem !important;
    padding-bottom: 0.35rem !important;
    font-size: 0.95rem !important;
    line-height: 1.2 !important;
  }

  /* Consistent mobile page padding — site-wide */
  .container,
  .container-fluid {
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
  }
}


/*================================================================================================*/
/*==================== NAVBAR BOTTOM BORDER ======================================================*/
/*================================================================================================*/

/* Remove any faint Bootstrap border or residual shadow */
#navbarContainer .navbar {
  border-bottom: 0 !important;
  outline: 0 !important;
  box-shadow: 0 2px 0 rgba(4, 30, 66, 0.95) !important;
}

/*================================================================================================*/
/*==================== BOOTSTRAP MODALS ABOVE NAVBAR + TOP GAP ====================*/
/*================================================================================================*/
.modal { z-index: 6000 !important; }
.modal-backdrop { z-index: 5990 !important; }

/* Reduced top gap so modals sit higher */
.modal-dialog { margin-top: 70px !important; } /* desktop */

@media (max-width: 768px) {
  .modal-dialog { margin-top: 10px !important; } /* mobile */
}

/*==================== PORTAL MODAL WIDTH (DESKTOP) ====================*/
@media (min-width: 992px) {
  .portal .modal-dialog { max-width: 960px; }
}

/*==================== PRINT MODALS ONLY ====================*/
@media print {
  #navbarContainer,
  #copyrightContainer,
  .no-print { display: none !important; }

  html, body {
    margin: 0 !important;
    padding: 0 !important;
    height: auto !important;
    background: #fff !important;
  }

  .modal.show,
  .modal.show * { display: block !important; }

  .modal-backdrop { display: none !important; }

  .modal {
    position: static !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .modal-dialog {
    max-width: 100% !important;
    margin: 0 !important;
  }

  .modal-content {
    box-shadow: none !important;
    border: none !important;
  }

  @page { margin: 12mm; }
}

/*==================== DRONE FLYBY ANIMATION ====================*/
#drone-flyby {
  position: fixed;
  top: 15vh;
  left: -200px;
  z-index: 9999;
  animation: flyAcross 6s ease-in-out forwards;
  pointer-events: none;
}

#drone-flyby img {
  height: 60px;
  width: auto;
}

@keyframes flyAcross {
  0%   { left: -200px; opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { left: 110vw; opacity: 0; }
}


/*================================================================================================*/
/*==================== MOBILE NAVBAR + TYPOGRAPHY (SITE-WIDE) ====================================*/
/*================================================================================================*/
@media (max-width: 768px) {

  /* ---------- Make navbar shorter (mobile only) ---------- */
  #navbarContainer .navbar {
    min-height: 54px !important;
    padding-top: 0.25rem !important;
    padding-bottom: 0.25rem !important;
  }

  #navbarContainer .navbar .container,
  #navbarContainer .navbar .container-fluid {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }

  /* Smaller logo so header height drops */
  #navbarContainer .navbar-brand {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    margin-right: 0.5rem !important;
  }

  #navbarContainer .logo-only {
    height: 32px !important;   /* adjust to 30–34 if you want */
    width: auto !important;
    display: block !important;
  }

  /* Smaller hamburger */
  #navbarContainer .navbar-toggler {
    padding: 0.1rem 0.35rem !important;
    min-width: 2.1rem !important;
    min-height: 2.1rem !important;
  }

  #navbarContainer .navbar-toggler-icon {
    width: 1.1em !important;
    height: 1.1em !important;
  }

  /* Optional: tighten nav links inside the dropdown */
  #navbarContainer .navbar-collapse.show .nav-link {
    font-size: 0.9rem !important;
    padding-top: 0.25rem !important;
    padding-bottom: 0.25rem !important;
  }

  /* ---------- Make mobile fonts smaller (site-wide) ---------- */
  body {
    font-size: 0.95rem !important;
  }

  h1 { font-size: 1.6rem !important; }
  h2 { font-size: 1.35rem !important; }
  h3 { font-size: 1.2rem !important; }
  h4 { font-size: 1.05rem !important; }
  h5 { font-size: 1.0rem !important; }

  /* “fs-5” is used a lot — reduce it on mobile */
  .fs-5 { font-size: 1.0rem !important; }

  /* Form controls: slightly smaller text/padding */
  .form-control,
  .form-select,
  .btn {
    font-size: 0.95rem !important;
  }

  .form-control,
  .form-select {
    padding-top: 0.5rem !important;
    padding-bottom: 0.5rem !important;
  }
}

/*================================================================================================*/
/*==================== GLOBAL: REDUCE GAP UNDER NAVBAR (ALL PAGES) ===============================*/
/*================================================================================================*/

/* IMPORTANT:
   Put this block near the VERY BOTTOM of styles.css so it wins against Bootstrap utility classes.
*/

/* 1) Body top padding: this is the BIGGEST contributor to the gap */
:root{
  --nav-offset-desktop: 84px; /* try 64 first */
  --nav-offset-mobile: 64px;  /* try 44 first (big reduction from 58) */
}

body{
  padding-top: var(--nav-offset-desktop) !important;
}

@media (max-width: 768px){
  body{
    padding-top: var(--nav-offset-mobile) !important;
  }
}

/* 2) Kill extra top margin from your FIRST content container (often my-4/my-5 adds big margin) */
main > .container:first-child,
main > .container-fluid:first-child,
body > main.container:first-child,
body > main.container-fluid:first-child,
body > .container:first-of-type,
body > .container-fluid:first-of-type{
  margin-top: 0.25rem !important;
}

/* 3) If the FIRST container has Bootstrap margin utilities, force them smaller (mobile only) */
@media (max-width: 768px){
  main > .container:first-child.my-4,
  main > .container:first-child.my-5,
  body > .container:first-of-type.my-4,
  body > .container:first-of-type.my-5{
    margin-top: 0.25rem !important;
    margin-bottom: 1rem !important; /* optional: keep page from feeling cramped */
  }
}

/*================================================================================================*/
/*==================== MOBILE: STOP SIDE-TO-SIDE SCROLL (OVERFLOW FIX) ===========================*/
/*================================================================================================*/

/* 1) Prevent tiny overflow from creating horizontal scrollbars */
html, body {
  max-width: 100%;
  overflow-x: hidden;
}

/* 2) Make Bootstrap gutters smaller on mobile so .row negative margins don't exceed your
      reduced .container padding (this is usually THE cause). */
@media (max-width: 768px) {

  /* Reduce gutter so row margins don't push outside the viewport */
  .row {
    --bs-gutter-x: 1rem;   /* default is 1.5rem; 1rem is safer on tight mobile padding */
  }

  /* Keep images/media from overflowing cards/columns */
  img, svg, video, canvas {
    max-width: 100%;
    height: auto;
  }

  /* If any long strings (IDs, URLs, emails) cause overflow */
  p, li, a, h1, h2, h3, h4, h5, h6 {
    overflow-wrap: anywhere;
    word-break: break-word;
  }
}

/*================================================================================================
=======================================  CALLOUT (ALWAYS LIGHT)  =================================
================================================================================================*/

.callout{
  background-color:#f8f9fa;
  border-left:4px solid var(--primary-color);
  padding:12px 16px;
  border-radius:6px;

  /* Force readable text on light background */
  color:rgba(0,0,0,0.70) !important;
}

.callout strong,
.callout b{
  color:rgba(0,0,0,0.88) !important;
}

.callout a{
  color:rgba(0,0,0,0.78) !important;
  text-decoration:underline;
}

/*================================================================================================
====================================  PRINT: MODAL ONLY + LIGHT MODE  ===========================
================================================================================================*/
@media print {

  /* Always print in light mode */
  html, body {
    background: #fff !important;
    color: #000 !important;
  }

  /* Hide everything by default */
  body * {
    visibility: hidden !important;
  }

  /* Show ONLY the open modal and its contents */
  .modal.show,
  .modal.show * {
    visibility: visible !important;
  }

  /* Remove backdrop */
  .modal-backdrop {
    display: none !important;
  }

  /* Make the modal print like a normal page */
  .modal {
    position: static !important;
    overflow: visible !important;
  }
  .modal-dialog {
    max-width: 100% !important;
    margin: 0 !important;
  }
  .modal-content {
    background: #fff !important;
    color: #000 !important;
    border: 0 !important;
    box-shadow: none !important;
  }

  /* Force all text inside modal to print black */
  .modal-content * {
    color: #000 !important;
  }

  /* Hide buttons/close controls in print */
  .modal .btn,
  .modal .btn-close {
    display: none !important;
  }
}


/*================================================================================================
====================================  PRINT: MODAL ONLY + FORCE LIGHT  ===========================
================================================================================================*/
@media print {

  @page { margin: 4mm; }

  /* Force LIGHT printing no matter what */
  html, body {
    background: #fff !important;
    color: #000 !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* IMPORTANT: remove layout space (visibility hides, display removes) */
  body > * {
    display: none !important;
  }

  /* Show ONLY the open modal, pinned to top */
  .modal.show {
    display: block !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: auto !important;
    overflow: visible !important;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
  }

  /* Remove backdrop */
  .modal-backdrop {
    display: none !important;
  }

  /* Remove Bootstrap dialog centering + margins */
  .modal-dialog,
  .modal-dialog-centered {
    margin: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
    min-height: auto !important;
    align-items: flex-start !important;
  }

  /* Print as normal white page */
  .modal-content {
    background: #fff !important;
    color: #000 !important;
    border: 0 !important;
    box-shadow: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* Force all text inside modal to print black */
  .modal-content,
  .modal-content * {
    color: #000 !important;
    background: transparent !important;
  }

  /* Tighten spacing (smaller top padding) */
  .modal-header,
  .modal-body,
  .modal-footer {
    margin: 0 !important;
    padding: 4mm !important;
  }

  /* Hide buttons/close controls in print */
  .modal .btn,
  .modal .btn-close,
  .modal .action-buttons {
    display: none !important;
  }
}
