/* Global font override - Use Open Sans everywhere */
* {
  font-family: "Open Sans", sans-serif !important;
}

#myVideo {
  position: initial;
}

#cesiumContainer {
  position: absolute;
  width: 100%;
  bottom: 0px;
  top: 0px;
  margin: 0;
  padding: 0;
  overflow: hidden;
}



/* #infoboxbutton {
  position: fixed;
  right: 0px;
  top: 0px;
  margin: 30px 40px 0px 0px;
  width: 60px;
  height: 60px;
  background-color: 4A8500;
  border-radius: 30px !important;
  box-shadow: 0px 2px 10px 0px #FFFFFF;
} */

.cesium-credit-textContainer *, .cesium-credit-logoContainer * {
  display: none !important;
}

.videowrapper {
    position: fixed;
    top: 0;
    bottom: 0;
    object-fit: scale-down;
    width: 100%;
    height: 100%;
    overflow: none;
    z-index: 99999999999999;
  }

  .videowrapper video {
    left: 50%;
    min-height: 100%;
    min-width: 100%;
    position: absolute;
    top: 50%;
    /* transform: translate(-50%, -50%); */
  }

  .vjs-afterglow-skin.vjs-responsive,
  .vjs-afterglow-skin.vjs-responsive video {
    height: 100%;
    width: 100%;
    object-fit: cover;
  }

  .vjs-afterglow-skin.vjs-responsive.vjs-has-started .vjs-tech {
    padding-top: 0;
  }

  .vjs-afterglow-skin .vjs-poster {
    opacity: 1 !important;
  }

  .videowrapper .skipVideo {
    position: fixed;
    right: 0px;
    top: 0px;
    height: 40px;
    z-index: 4;
    background-color: #B38D2F;
    border: none;
    color: white;
    padding: 0px 10px 0 10px;
    margin: 10px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 16px;
  }

  .navbar {
    background-color: rgba(0,0,0,0.65) !important;
  }

  .nav-link {
    color: white !important;
  }

  h5 {
    font-weight: 500 !important;
  }

@media (max-width: 992px) {
  .dropup .dropdown-menu {
    margin-bottom:176px !important;
  }
}

/* Dropdown menu styling */
.dropup .dropdown-menu {
  margin-bottom: 15px !important; /* Move menu up to not overlap navbar */
  min-width: 350px !important; /* Make menus wider */
  background-color: white !important;
  border: 1px solid #ddd !important;
  border-radius: 8px !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
  right: 0 !important; /* Align to right edge of parent */
  left: auto !important; /* Override default left positioning */
}

.dropdown-menu a {
  color: #333 !important; /* Black text */
  padding: 10px 15px !important;
  display: flex !important;
  align-items: center !important;
  transition: all 0.2s ease !important;
  text-decoration: none !important;
}

.dropdown-menu a:hover {
  color: #024638 !important; /* Hover color */
  background-color: #f8f9fa !important;
}

.dropdown-menu a i {
  margin-right: 10px !important;
  font-size: 16px !important;
  width: 20px !important;
  text-align: center !important;
}

.video-icon {
  color: #024638 !important; /* Custom color for video icons */
}

.pano-icon {
  color: #024638 !important; /* Custom color for panorama icons */
}

.scrollable-menu {
  max-height: calc(100vh - 245px); /* Adjust the 160px based on other elements' heights if needed */
  overflow-y: auto;
}

.mobilelogos {
  z-index: 9999;
}

.logo-button {
  height: 100px;
  width: 180px;
  background-color: rgba(255,255,255,0.7) !important;
}

img.img-fluid {
  max-height: 60px;
  max-width: 150px
}

#mobilelogomenu {
  background-color: rgba(0,0,0,0.7);
  position: absolute;
  height: calc(100vh - 71px);
}

#labelsContainer {
  position: absolute;
  top: -40px !important;
  left: 0px;
  pointer-events: none; /* Ensure clicks pass through to the Cesium canvas */
  width: 100%;
  height: 100%;
}

.label {
  position: absolute;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 14px;
  pointer-events: none;
  z-index: 1000;
  transition: opacity 0.3s ease;
}

.sidenav {
  width: 400px;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.8) !important;
  color: white;
  overflow-y: auto;
  position: relative;
}

#panoView {
  position: relative;
  width: calc(100% - 400px);
}


.tour-controls {
    background: #ffffff;
    padding: 15px;
    border-radius: 0 0 8px 8px;
    border: 1px solid #ddd;
    border-top: none;
    z-index: 2001;
    display: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Desktop: Fixed bottom right corner, integrated with infobox */
@media (min-width: 769px) {
    .tour-controls.active {
        width: 100%;
        border-radius: 0 0 8px 8px; /* Round bottom corners only */
        border-top: 1px solid #ddd; /* Subtle separator line */
    }
}

/* Mobile: Full width at bottom */
@media (max-width: 768px) {
    .tour-controls.active {
        width: 100%;
        border-radius: 0 0 8px 8px;
        border-left: none;
        border-right: none;
        border-bottom: none;
    }
}

.tour-controls.active {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tour-progress-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 10px;
}

.tour-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #333;
    font-size: 14px;
    gap: 15px;
}

#tour-title {
    font-weight: bold;
    color: #024638;
    flex: 1;
}

#tour-progress {
    color: #666;
    min-width: 80px;
    text-align: center;
}

.progress-bar-container {
    position: relative;
    width: 100%;
    height: 20px;
}

.progress-bar-background {
    width: 100%;
    height: 8px;
    background-color: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    position: relative;
    top: 6px;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #024638 0%, #013329 100%);
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

.progress-stops {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stop-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.2);
    border: 2px solid rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.stop-indicator.completed {
    background-color: #024638;
    border-color: #024638;
}

.stop-indicator.current {
    background-color: #ffffff;
    border-color: #024638;
    box-shadow: 0 0 8px rgba(2, 70, 56, 0.6);
}

.tour-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.tour-controls button {
    margin: 0;
    background-color: #024638 !important;
    border: none;
    color: white;
    padding: 8px 16px;
    border-radius: 4px;
    flex: 1;
    transition: background-color 0.2s ease;
}

.tour-controls button:hover {
    background-color: #013329 !important;
}

.tour-controls button:disabled,
.tour-controls button.disabled {
    background-color: #6c757d !important;
    cursor: not-allowed !important;
    opacity: 0.6 !important;
}

.tour-controls button:disabled:hover,
.tour-controls button.disabled:hover {
    background-color: #6c757d !important;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: #ffffff;
    color: #333333;
    margin: 10% auto;
    padding: 40px;
    border: none;
    border-radius: 12px;
    width: 90%;
    max-width: 650px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    position: relative;
    font-family: "Open Sans", sans-serif;
}

.modal h2 {
    margin: 0 0 24px 0;
    font-weight: 600;
    font-size: 28px;
    color: #1a1a1a;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 12px;
}

.modal p {
    margin-bottom: 20px;
    font-size: 16px;
    line-height: 1.6;
    color: #555555;
}

.modal ul {
    list-style: none;
    padding: 0;
    margin: 0;
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
}

.modal li {
    padding: 12px 0;
    border-bottom: 1px solid #e9ecef;
    font-size: 15px;
    color: #333333;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal li:last-child {
    border-bottom: none;
}

.modal li strong {
    color: #1a1a1a;
    font-weight: 600;
}

.close {
    position: absolute;
    right: 24px;
    top: 20px;
    font-size: 32px;
    font-weight: 300;
    cursor: pointer;
    color: #666666;
    transition: color 0.2s ease;
    line-height: 1;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: transparent;
}

.close:hover {
    color: #333333;
    background-color: #f8f9fa;
}

/* Navbar styles */
.navbar {
    z-index: 9999;
}

/* Mobile browser reset for navbar */
@media (max-width: 768px) {
    /* Reset any browser defaults that might add space */
    body {
        margin: 0 !important;
        padding: 0 !important;
        /* Ensure no extra space from mobile browser chrome */
        padding-bottom: 0 !important;
    }
    
    /* Reset any potential safe area insets */
    .navbar {
        /* Completely override Bootstrap defaults */
        padding: 1rem 1rem !important;
        margin: 0 !important;
        /* Raise the navbar higher on mobile */
        bottom: 20px !important;
        /* Remove any potential safe area or browser chrome padding */
        padding-top: 1rem !important;
        padding-bottom: 1rem !important;
        /* Ensure no extra space from viewport units */
        min-height: 70px !important;
        height: auto !important;
        /* Reset any potential transform or positioning issues */
        transform: none !important;
        /* Ensure clean positioning */
        position: fixed !important;
        left: 10px !important;
        right: 10px !important;
        width: calc(100% - 20px) !important;
        /* Add rounded corners and better styling for mobile */
        border-radius: 12px !important;
        background-color: rgba(0,0,0,0.85) !important;
        backdrop-filter: blur(10px) !important;
        -webkit-backdrop-filter: blur(10px) !important;
        box-shadow: 0 4px 20px rgba(0,0,0,0.3) !important;
    }
    
    /* Specific override for fixed-bottom navbar */
    .navbar.fixed-bottom {
        bottom: 20px !important;
        /* Remove any extra spacing that might be added by MDB or Bootstrap */
        padding-top: 1rem !important;
        padding-bottom: 1rem !important;
        /* Ensure clean bottom edge */
        border-top: none !important;
    }
    
    .navbar-brand {
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .navbar-toggler {
        margin: 0 !important;
        padding: 0.75rem !important;
        font-size: 1.5rem !important;
        border: 2px solid rgba(255,255,255,0.5) !important;
        border-radius: 8px !important;
        background-color: rgba(255,255,255,0.1) !important;
        color: white !important;
        min-width: 50px !important;
        min-height: 50px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    .navbar-toggler:hover,
    .navbar-toggler:focus {
        background-color: rgba(255,255,255,0.2) !important;
        border-color: rgba(255,255,255,0.8) !important;
        box-shadow: 0 0 0 0.2rem rgba(255,255,255,0.25) !important;
    }
    
    .navbar-toggler-icon {
        background-image: none !important;
        width: auto !important;
        height: auto !important;
    }
    
    .container-fluid {
        /* Remove all default Bootstrap container padding */
        padding: 0 !important;
        margin: 0 !important;
    }
    
    /* Ensure navbar content has proper spacing */
    .navbar > .container-fluid {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
    }
}

/* Mobile navbar improvements */
@media (max-width: 991px) {
    /* Remove extra padding/space at top of mobile navbar */
    .navbar {
        padding-top: 1rem;
        padding-bottom: 1rem;
    }
    
    .navbar-brand.d-lg-none {
        margin-right: auto;
        flex: 1 !important;
    }
    
    .navbar-toggler {
        border: 2px solid rgba(255,255,255,0.5) !important;
        padding: 0.75rem !important;
        font-size: 1.4rem !important;
        background-color: rgba(255,255,255,0.1) !important;
        border-radius: 8px !important;
        min-width: 48px !important;
        min-height: 48px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    .navbar-toggler:focus {
        box-shadow: 0 0 0 0.2rem rgba(255,255,255,0.25) !important;
    }
    
    .navbar-toggler .icon-bars {
        color: white !important;
        width: 1.2em !important;
        height: 1.2em !important;
    }
    
    .navbar-collapse {
        margin-top: 15px;
        background-color: rgba(0, 0, 0, 0.95);
        border-radius: 12px;
        padding: 20px;
        margin-left: -20px;
        margin-right: -20px;
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }
    
    .navbar-nav {
        width: 100%;
    }
    
    .nav-item {
        margin: 8px 0;
    }
    
    .nav-link {
        padding: 15px 20px !important;
        border-radius: 8px;
        transition: background-color 0.2s ease;
        font-size: 1.1rem !important;
    }
    
    .nav-link:hover {
        background-color: rgba(255, 255, 255, 0.15);
    }
    
    /* Mobile dropdown adjustments */
    .dropup .dropdown-menu {
        position: static !important;
        float: none !important;
        width: 100% !important;
        margin: 15px 0 !important;
        border: none !important;
        border-radius: 8px !important;
        background-color: rgba(255, 255, 255, 0.95) !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;
        backdrop-filter: blur(10px) !important;
        -webkit-backdrop-filter: blur(10px) !important;
    }
}

/* Additional mobile navbar fixes for safe area */
@media (max-width: 768px) {
    .navbar {
        /* Ensure no extra padding from safe area */
        padding-top: 1rem !important;
        padding-bottom: 1rem !important;
        /* Handle safe area properly */
        padding-left: max(env(safe-area-inset-left), 1rem);
        padding-right: max(env(safe-area-inset-right), 1rem);
        /* Handle bottom safe area */
        bottom: max(env(safe-area-inset-bottom), 20px) !important;
    }
    
    .container-fluid {
        /* Ensure container doesn't add extra padding */
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* Container styles */
#pano {
    display: none;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1000;
}

/* Logo spacing */
.navbar-brand.d-none.d-lg-block.px-4 {
    padding-left: 1.5rem !important;
    padding-right: 1.5rem !important;
}

.navbar-brand.d-none.d-lg-block.px-2 {
    padding-left: 0.5rem !important;
    padding-right: 0.5rem !important;
}

/* Menu items */
.text-start {
    text-align: left !important;
}

/* Flex container for pano view */
.d-flex.h-100 {
    display: flex;
    height: 100%;
}

#panoView {
    flex: 1;
    height: 100vh;
}

/* Content styles */
.content-image {
    width: 100%;
    border-radius: 8px;
    margin: 10px 0;
}

.content-video {
    width: 100%;
    border-radius: 8px;
    margin: 10px 0;
}

.content-text {
    color: white;
    font-size: 14px;
    line-height: 1.6;
    margin: 10px 0;
}

.info-sidebar {
    position: absolute;
    right: 0;
    top: 0;
    width: 400px;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    padding: 20px;
    color: white;
    overflow-y: auto;
}

.back-button {
    position: absolute;
    top: 20px;
    left: 20px;
    padding: 10px 20px;
    background: var(--marine-teal);  /* Updated to use brand color */
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    z-index: 1000;
}

.label {
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    position: absolute;
    transform: translate(-50%, -100%);
    pointer-events: auto;
    cursor: pointer;
    text-align: center;
    min-width: 120px;
    margin-top: -20px;
}

.label-name {
    font-size: 14px;
    color: #ffffff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    font-weight: 500;
}

.label-toggle {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

.toggle-button {
    background: rgba(0, 0, 0, 0.7);
    color: var(--marine-teal);  /* Updated to use brand color */
    border: 1px solid var(--marine-teal);  /* Updated to use brand color */
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
}

.toggle-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: rgba(0, 0, 0, 0.9);
    border: 1px solid var(--marine-teal);  /* Updated to use brand color */
    border-radius: 4px;
    margin-top: 4px;
}

.toggle-dropdown.show {
    display: block;
}

.toggle-option {
    padding: 8px 16px;
    color: white;
    cursor: pointer;
}

.toggle-option:hover {
    background: rgba(13, 87, 110, 0.3);  /* Updated to use marine-teal with opacity */
}

/* Video Modal Styles */
#videoTourModal {
    z-index: 10000 !important;
}

#videoTourModal .modal-content {
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    max-height: 100% !important;
    margin: 0 !important;
    padding: 40px !important;
    background: transparent !important;
    box-shadow: none !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

#videoTourModal .modal-content > div {
    width: 95%;
    max-width: 1200px;
    height: auto;
}

#videoTourModal video {
    width: 100% !important;
    height: auto !important;
    max-height: 85vh !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
    border-radius: 8px;
}

#videoTourModal .close:hover {
    background: rgba(0, 0, 0, 0.8) !important;
    transform: scale(1.1);
}

/* Responsive video modal */
@media (max-width: 768px) {
    #videoTourModal .modal-content {
        padding: 20px !important;
    }
    
    #videoTourModal .modal-content > div {
        width: 100%;
    }
    
    #videoTourModal video {
        max-height: 80vh !important;
        border-radius: 4px;
    }
    
    #videoTourModal .close {
        width: 35px !important;
        height: 35px !important;
        font-size: 24px !important;
        top: 5px !important;
        right: 10px !important;
    }
}

/* Tour infobox styling */
.tour-infobox {
    position: absolute;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 2000;
    overflow-y: auto;
    font-family: "Open Sans", sans-serif;
    color: #333;
    display: none;
}

/* Custom scrollbar styling for infoboxes - always visible */
.tour-infobox {
    overflow-y: scroll; /* Force scrollbar to always be visible */
    scrollbar-width: thin; /* Firefox scrollbar styling */
    scrollbar-color: rgba(0, 0, 0, 0.3) rgba(0, 0, 0, 0.1);
}

.tour-infobox::-webkit-scrollbar {
    width: 8px;
    display: block; /* Ensure scrollbar is always visible */
}

.tour-infobox::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
}

.tour-infobox::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
}

.tour-infobox::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.5);
}

/* Desktop: Positioned above tour controls, integrated design */
@media (min-width: 769px) {
    .tour-infobox {
        bottom: 120px; /* Positioned above navbar - adjusted for proper clearance */
        right: 20px;
        width: 350px;
        max-height: calc(100vh - 160px); /* Leave space for navbar below */
        padding: 20px; /* Consistent padding on all edges */
        border-radius: 8px; /* Round all corners for free roam mode */
        border: 1px solid #ddd; /* Full border for free roam mode */
    }
}

/* Mobile: Infobox takes up space, leaving room for controls at bottom */
@media (max-width: 768px) {
    .tour-infobox {
        position: fixed;
        bottom: 70px; /* Reduced from 100px to better match actual navbar height */
        left: 0;
        right: 0;
        height: 50vh;
        width: 100%;
        border-radius: 8px 8px 0 0;
        padding: 20px;
        border-bottom: none;
        overflow-y: auto;
        z-index: 2000;
    }
    
    /* When navbar is hidden during tours, use flexbox layout */
    body:not(.navbar-visible) .tour-sidebar {
        display: flex !important;
        flex-direction: column;
        height: 50vh !important;
        bottom: 0 !important;
    }
    
    body:not(.navbar-visible) .tour-infobox {
        position: static !important;
        height: auto !important;
        flex: 1 1 auto;
        overflow-y: auto;
        bottom: auto !important;
    }
    
    body:not(.navbar-visible) .tour-controls.active {
        position: static !important;
        flex: 0 0 auto;
        bottom: auto !important;
    }
    
    /* When mobile infobox is active, adjust viewer containers to top 50% */
    body.mobile-infobox-active #pano {
        height: 50vh !important;
        top: 0 !important;
        position: fixed !important;
        width: 100% !important;
        z-index: 1000 !important;
    }
    
    body.mobile-infobox-active #cesiumContainer {
        height: 50vh !important;
        top: 0 !important;
        position: fixed !important;
        width: 100% !important;
    }
    
    /* Ensure main container allows for proper positioning */
    body.mobile-infobox-active #mainContainer {
        height: 100vh !important;
        position: relative !important;
    }
}

.tour-infobox h2 {
    font-size: 1.4em;
    font-weight: 600;
    margin: 0 0 15px 0;
    color: #024638;
    border-bottom: 2px solid #024638;
    padding-bottom: 8px;
}

@media (max-width: 768px) {
    .tour-infobox h2 {
        font-size: 1.1em;
        padding-bottom: 6px;
    }
}

@media (max-width: 480px) {
    .tour-infobox h2 {
        font-size: 1em;
        padding-bottom: 4px;
    }
}

.tour-infobox h3 {
    font-size: 1.2em;
    font-weight: 500;
    margin: 20px 0 10px 0;
    color: #024638;
}

.tour-infobox p {
    font-size: 14px;
    line-height: 1.5;
    margin: 0 0 12px 0;
    text-align: left;
}

.tour-infobox img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 10px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.tour-infobox .image-caption {
    font-size: 12px;
    font-style: italic;
    color: #666;
    margin: -8px 0 15px 0;
    text-align: center;
}

.tour-infobox .close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 20px;
    color: #666;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.tour-infobox .close-btn:hover {
    background: #f0f0f0;
    color: #333;
}

/* Loading state */
.tour-infobox.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-style: italic;
}

/* Error state */
.tour-infobox.error {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #d32f2f;
    font-style: italic;
}

/* Image carousel styles */
.tour-infobox .image-carousel {
    margin: 10px 0;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.tour-infobox .image-carousel .carousel-item img {
    width: 100%;
    height: auto;
    max-height: 300px;
    object-fit: cover;
    margin: 0;
    box-shadow: none;
    border-radius: 0;
}

.tour-infobox .image-carousel .carousel-control-prev,
.tour-infobox .image-carousel .carousel-control-next {
    width: auto;
    height: auto;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    opacity: 0.8;
    transition: all 0.2s ease;
}

.tour-infobox .image-carousel .carousel-control-prev {
    left: 10px;
}

.tour-infobox .image-carousel .carousel-control-next {
    right: 10px;
}

.tour-infobox .image-carousel .carousel-control-prev:hover,
.tour-infobox .image-carousel .carousel-control-next:hover {
    opacity: 1;
}

.tour-infobox .image-carousel .carousel-control-prev-icon,
.tour-infobox .image-carousel .carousel-control-next-icon {
    width: 32px;
    height: 32px;
    stroke-width: 1;
    stroke: currentColor;
    fill: currentColor;
}

.tour-infobox .image-carousel .carousel-indicators {
    bottom: 10px;
    margin-bottom: 0;
}

.tour-infobox .image-carousel .carousel-indicators button {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin: 0 3px;
    background-color: rgba(255, 255, 255, 0.5);
    border: none;
    opacity: 0.7;
    transition: all 0.2s ease;
}

.tour-infobox .image-carousel .carousel-indicators button.active {
    background-color: rgba(255, 255, 255, 0.9);
    opacity: 1;
    transform: scale(1.2);
}

/* Mobile carousel adjustments */
@media (max-width: 768px) {
    .tour-infobox .image-carousel .carousel-item img {
        max-height: 200px;
    }
    
    .tour-infobox .image-carousel .carousel-control-prev-icon,
    .tour-infobox .image-carousel .carousel-control-next-icon {
        width: 24px;
        height: 24px;
    }
}

/* Image Modal Styles */
#imageModal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

#imageModal .modal-content {
    position: relative;
    max-width: 95vw;
    max-height: 95vh;
    margin: auto;
}

#imageModal img {
    max-width: 100%;
    max-height: 90vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 4px;
}

#imageModal .close {
    position: absolute;
    top: 10px;
    right: 15px;
    color: white;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
    z-index: 10001;
}

#imageModal .close:hover {
    background: rgba(0, 0, 0, 0.9);
}

#modalCaption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 15px;
    text-align: center;
    font-size: 14px;
    line-height: 1.4;
    border-radius: 0 0 4px 4px;
}

/* Clickable image styles */
.tour-infobox img[data-clickable="true"] {
    cursor: pointer;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.tour-infobox img[data-clickable="true"]:hover {
    opacity: 0.8;
    transform: scale(1.02);
}

/* Mobile adjustments for image modal */
@media (max-width: 768px) {
    #imageModal .modal-content {
        max-width: 98vw;
        max-height: 98vh;
    }
    
    #imageModal img {
        max-height: 85vh;
    }
    
    #modalCaption {
        font-size: 13px;
        padding: 12px;
    }
}

/* Tour sidebar flex container */
.tour-sidebar {
    display: flex;
    flex-direction: column;
    position: fixed;
    right: 20px;
    bottom: 100px; /* Increased to clear navbar */
    width: 350px;
    max-height: calc(100vh - 140px); /* Adjusted for navbar clearance */
    z-index: 2000;
    gap: 0;
}

.tour-infobox {
    position: static;
    flex: 1 1 auto;
    overflow-y: auto;
    width: 100%;
    margin-bottom: 0;
    border-radius: 8px 8px 0 0;
    border-bottom: none;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: none;
}

.tour-infobox.active {
    display: block;
}

.tour-controls {
    position: static;
    flex: 0 0 auto;
    width: 100%;
    border-radius: 0 0 8px 8px;
    border-top: 1px solid #ddd;
    background: #ffffff;
    padding: 15px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: none;
}

.tour-controls.active {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

@media (max-width: 768px) {
    .tour-sidebar {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 70px; /* Reduced to match actual navbar height */
        width: 100%;
        max-height: 50vh; /* Simplified - let flexbox handle sizing */
        display: flex;
        flex-direction: column;
    }
    
    /* When navbar is hidden during tours, tour sidebar uses full 50vh */
    body:not(.navbar-visible) .tour-sidebar {
        bottom: 0;
        max-height: 50vh;
        height: 50vh; /* Fixed height when navbar hidden */
    }
    
    .tour-infobox {
        /* Default: fixed positioning for free roam */
        margin-bottom: 0;
        border-radius: 8px 8px 0 0;
        flex: 1 1 auto;
        overflow-y: auto;
    }
    
    .tour-controls {
        border-radius: 0 0 8px 8px;
        flex: 0 0 auto; /* Don't grow or shrink */
        /* Remove fixed height - let it size naturally */
    }
    
    /* Adjust tour controls positioning when mobile infobox is active */
    body.mobile-infobox-active .tour-controls.active {
        position: fixed;
        bottom: 70px;
        left: 0;
        right: 0;
        z-index: 2001;
    }
    
    /* When navbar is hidden, tour controls use flexbox positioning */
    body:not(.navbar-visible) .tour-controls.active {
        position: static !important;
        bottom: auto !important;
    }
}

/* Hide navbar when welcome modal is visible */
#welcomeModal:not([style*="display: none"]) ~ nav.navbar,
#welcomeModal[style*="display: flex"] ~ nav.navbar {
    display: none !important;
}

/* Mobile hamburger menu button styling */
.navbar-toggler {
    background-color: rgba(255,255,255,0.1) !important;
    border: 2px solid rgba(255,255,255,0.5) !important;
    border-radius: 8px !important;
    padding: 0.5rem !important;
    transition: all 0.3s ease !important;
    position: relative !important;
    /* Hide by default on desktop */
    display: none !important;
}

.navbar-toggler:hover,
.navbar-toggler:focus,
.navbar-toggler:active {
    background-color: rgba(255,255,255,0.2) !important;
    border-color: rgba(255,255,255,0.8) !important;
    box-shadow: 0 0 0 0.2rem rgba(255,255,255,0.25) !important;
    outline: none !important;
}

/* Custom hamburger icon using CSS */
.navbar-toggler-icon {
    display: inline-block !important;
    width: 1.5em !important;
    height: 1.5em !important;
    vertical-align: middle !important;
    background-image: none !important;
    position: relative !important;
}

.navbar-toggler-icon::before,
.navbar-toggler-icon::after,
.navbar-toggler-icon {
    background-color: white !important;
}

.navbar-toggler-icon::before,
.navbar-toggler-icon::after {
    content: '';
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: white;
    transition: all 0.3s ease;
}

.navbar-toggler-icon::before {
    top: 4px;
}

.navbar-toggler-icon::after {
    bottom: 4px;
}

.navbar-toggler-icon {
    background-color: white;
    height: 2px !important;
    top: 50%;
    transform: translateY(-50%);
}

/* Removed Font Awesome reference - now using inline SVG */

/* Show hamburger menu button only on mobile screens */
@media (max-width: 991px) {
    .navbar-toggler {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
    }
}

/* Ensure hamburger is completely hidden on desktop */
@media (min-width: 992px) {
    .navbar-toggler {
        display: none !important;
    }
}