/* ============================================
   WiFiHapa - Shared layout
   Navigation, sidebar, floating controls, feedback form and footer.
   Used by every public page through includes/layout/header.php and footer.php.
   ============================================ */

/* ----- COLOUR VARIABLES (page stylesheets use these) ----- */
:root {
  --bg-body: #f8fafd;
  --text-primary: #0a2c3d;
  --text-secondary: #5a6e7c;
  --card-bg: #ffffff;
  --nav-bg: #ffffff;
  --footer-bg: linear-gradient(135deg, #0b2b40 0%, #0a1f2e 100%);
  --border-light: rgba(13, 110, 253, 0.05);
  --hero-bg: linear-gradient(145deg, #f2f8ff 0%, #ffffff 100%);
  --input-bg: #ffffff;
  --badge-light-bg: #f0f3fa;
  --modal-bg: #f8fafd;
  --dropdown-hover: #f8f9fa;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 8px 20px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 12px 30px rgba(0, 0, 0, 0.08);
  --transition: all 0.3s ease;
}

body.dark {
  --bg-body: #1a1a2e;
  --text-primary: #e8e8e8;
  --text-secondary: #b0b0b0;
  --card-bg: #2d2d3d;
  --nav-bg: #2d2d3d;
  --footer-bg: linear-gradient(135deg, #0a1a2a 0%, #0a1520 100%);
  --border-light: rgba(255, 255, 255, 0.06);
  --hero-bg: linear-gradient(145deg, #1a2a3d 0%, #2d2d3d 100%);
  --input-bg: #3d3d4d;
  --badge-light-bg: #3d3d4d;
  --modal-bg: #2d2d3d;
  --dropdown-hover: #3d3d4d;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 8px 20px rgba(0, 0, 0, 0.25);
  --shadow-lg: 0 12px 30px rgba(0, 0, 0, 0.3);
}

/* ----- GLOBAL AND BRAND ----- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-body);
  color: var(--text-primary);
  line-height: 1.5;
  overflow-x: hidden;
  transition: background 0.3s, color 0.3s;
}

body.dark .desktop-nav {
  background-color: #2d2d3d;
}

body.dark .desktop-nav-links a {
  color: #d0d0d0 !important;
}

body.dark .desktop-nav-links a:hover,
body.dark .desktop-nav-links a.active {
  background-color: #0d6efd;
  color: white !important;
}

body.dark .desktop-nav-brand .wifi {
  color: #4d9aff !important;
}

body.dark .desktop-nav-brand .hapa {
  color: #d4a11e !important;
}

body.dark .mobile-header {
  background: #2d2d3d;
}

body.dark .mobile-header .mobile-brand .wifi {
  color: #4d9aff !important;
}

body.dark .mobile-header .mobile-brand .hapa {
  color: #d4a11e !important;
}

body.dark .btn-mobile-menu {
  background: #3d3d4d;
  color: #d0d0d0 !important;
  border-color: #4d4d5d;
}

/* FAB Dark Mode */

body.dark .fab-btn {
  background: #2d2d3d !important;
  color: #e0e0e0 !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4) !important;
}

body.dark .fab-btn:hover {
  background: #3d3d4d !important;
}

body.dark .fab-dropdown-content {
  background: #2d2d3d !important;
}

body.dark .fab-dropdown-content .contact-item {
  color: #e0e0e0 !important;
}

body.dark .fab-dropdown-content .contact-item:hover {
  background: #3d3d4d !important;
}

body.dark .feedback-modal-content {
  background: #2d2d3d !important;
  color: #e0e0e0 !important;
}

body.dark .feedback-modal-content .form-control {
  background: #3d3d4d !important;
  border-color: #4d4d5d !important;
  color: #e0e0e0 !important;
}

body.dark .feedback-modal-content .form-control::placeholder {
  color: #8888a0 !important;
}

body.dark .feedback-modal-content .close-feedback {
  color: #d0d0d0 !important;
}

body.dark .feedback-modal-content h3 {
  color: #e8e8e8 !important;
}

body.dark .feedback-modal-content .form-group label {
  color: #d0d0d0 !important;
}

body.dark .feedback-modal-content p {
  color: #b0b0b0 !important;
}

body.dark .feedback-modal-content .btn-submit-feedback {
  background: #0d6efd;
  color: white !important;
}

body.dark .footer {
  background: linear-gradient(135deg, #0a1a2a 0%, #0a1520 100%) !important;
}

body.dark .footer-title {
  color: #e8e8e8 !important;
}

body.dark .footer-links a {
  color: rgba(255, 255, 255, 0.6) !important;
}

body.dark .footer-desc {
  color: rgba(255, 255, 255, 0.6) !important;
}

body.dark .footer-contact {
  color: rgba(255, 255, 255, 0.6) !important;
}

body.dark .footer-bottom {
  color: rgba(255, 255, 255, 0.4) !important;
}

body.dark .footer-bottom a {
  color: rgba(255, 255, 255, 0.4) !important;
}

body.dark .footer-bottom a:hover {
  color: #d4a11e !important;
}

.wifi {
  color: #0d6efd;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.hapa {
  color: #d4a11e;
  position: relative;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.hapa::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 3px;
  background: #d4a11e;
  border-radius: 3px;
}

/* ----- FULL WIDTH WRAPPERS ----- */

.full-width-wrapper {
  width: 100%;
  max-width: 100%;
  margin-left: 0;
  margin-right: 0;
  padding-left: 0;
  padding-right: 0;
}

/* ----- CONSTRAINED CONTENT ----- */

.constrained-content {
  max-width: 1500px;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

/* Desktop nav specific */

.desktop-nav {
  background-color: white;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
  padding: 0.8rem 0;
}

.desktop-nav .constrained-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.desktop-nav-brand {
  font-size: 1.9rem;
  font-weight: 800;
  text-decoration: none;
}

.desktop-nav-links {
  display: flex;
  gap: 0.8rem;
  align-items: center;
  flex-wrap: wrap;
}

.desktop-nav-links a {
  text-decoration: none;
  color: #0a2c3d;
  font-weight: 600;
  padding: 0.5rem 1.2rem;
  border-radius: 50px;
  transition: 0.2s;
  font-size: 0.95rem;
}

.desktop-nav-links a:hover,
.desktop-nav-links a.active {
  background-color: #0d6efd;
  color: white !important;
}

.desktop-nav-links .btn-register {
  background: #d4a11e;
  color: white !important;
  padding: 0.5rem 1.5rem;
}

.desktop-nav-links .btn-register:hover {
  background: #b3881a;
  color: white !important;
}

@media (max-width: 991.98px) {
  .desktop-nav {
    display: none;
  }
}

/* ----- MOBILE HEADER ----- */

.mobile-header {
  background: white;
  padding: 0.8rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.02);
  width: 100%;
}

.mobile-brand {
  font-size: 1.8rem;
  font-weight: 800;
  text-decoration: none;
}

.btn-mobile-menu {
  border: 1px solid #0d6efd;
  background: white;
  border-radius: 50px;
  padding: 0.5rem 1.2rem;
  color: #0d6efd;
  font-weight: 600;
}

@media (min-width: 992px) {
  .mobile-header {
    display: none;
  }
}

/* ============================================
   MODERN SIDEBAR STYLES
   ============================================ */

.offcanvas-start {
  background: linear-gradient(180deg, #0b2b40 0%, #0a1f2e 100%);
  color: white;
  width: 300px;
  border-right: none;
}

.offcanvas-header {
  padding: 1.8rem 1.5rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.offcanvas-header .btn-close {
  filter: invert(1) brightness(2);
  opacity: 0.7;
  transition: opacity 0.2s;
}

.offcanvas-header .btn-close:hover {
  opacity: 1;
}

.sidebar-brand {
  font-size: 2rem;
  font-weight: 800;
  padding-left: 0;
}

.sidebar-brand .wifi {
  color: #0d6efd;
}

.sidebar-brand .hapa {
  color: #d4a11e;
}

.offcanvas-body {
  padding: 1rem 0.5rem 2rem;
}

.sidebar-profile {
  padding: 1rem 1.2rem 1.5rem;
  margin-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.sidebar-profile .avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0d6efd, #d4a11e);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 700;
  color: white;
  margin-bottom: 0.5rem;
}

.sidebar-profile .name {
  font-weight: 600;
  font-size: 1rem;
  color: white;
}

.sidebar-profile .role {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.5);
}

.sidebar-nav {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-nav li {
  margin-bottom: 0.2rem;
}

.sidebar-nav a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  padding: 0.75rem 1.2rem;
  border-radius: 12px;
  transition: all 0.25s ease;
  position: relative;
}

.sidebar-nav a i {
  width: 28px;
  margin-right: 14px;
  text-align: center;
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.4);
  transition: color 0.25s;
}

.sidebar-nav a:hover {
  background: rgba(255, 255, 255, 0.08);
  color: white !important;
  transform: translateX(4px);
}

.sidebar-nav a:hover i {
  color: #d4a11e;
}

.sidebar-nav a.active {
  background: rgba(13, 110, 253, 0.2);
  color: white !important;
  box-shadow: inset 3px 0 0 #0d6efd;
}

.sidebar-nav a.active i {
  color: #0d6efd;
}

.sidebar-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.06);
  margin: 0.8rem 1.2rem;
}

.sidebar-bottom {
  margin-top: 1rem;
  padding: 0 1.2rem;
}

.sidebar-bottom .sidebar-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, 0.3);
  padding: 0 0.5rem;
  margin-bottom: 0.8rem;
}

.sidebar-bottom a {
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
  font-size: 0.85rem;
  padding: 0.5rem 0.8rem;
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 8px;
  transition: all 0.2s;
}

.sidebar-bottom a:hover {
  color: white !important;
  background: rgba(255, 255, 255, 0.05);
}

.sidebar-bottom a i {
  font-size: 0.9rem;
  width: 20px;
}

/* ----- MAIN CONTENT ----- */

.main-content {
  max-width: 1500px;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

/* ============================================
   FLOATING CONTROLS - BOTTOM RIGHT (FAB Style)
   WITH TOOLTIPS
   ============================================ */

.floating-controls {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}

.floating-controls .fab-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

/* Collapsible menu - stacks above the + toggle */

.floating-controls .fab-menu {
  position: absolute;
  bottom: calc(100% + 12px);
  left: 50%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate(-50%, 16px) scale(0.85);
  transform-origin: bottom center;
  transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.25s;
}

.floating-controls.open .fab-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(-50%, 0) scale(1);
}

/* + toggle - rotates into an x when open */

.floating-controls .fab-btn.fab-toggle {
  background: #0b2b40;
  color: white !important;
}

.floating-controls .fab-btn.fab-toggle i {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.floating-controls.open .fab-btn.fab-toggle {
  background: #d4a11e;
}

.floating-controls.open .fab-btn.fab-toggle i {
  transform: rotate(45deg);
}

body.dark .floating-controls.open .fab-btn.fab-toggle {
  background: #d4a11e !important;
}

.floating-controls .fab-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: #0a2c3d;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  flex-shrink: 0;
}

.floating-controls .fab-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
}

.floating-controls .fab-btn:active {
  transform: scale(0.9);
}

/* Tooltip Styles - positioned to the left */

.floating-controls .fab-tooltip {
  position: absolute;
  right: 62px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.85);
  color: white;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  letter-spacing: 0.3px;
  font-family: 'Inter', sans-serif;
  backdrop-filter: blur(4px);
}

.floating-controls .fab-tooltip::after {
  content: '';
  position: absolute;
  right: -6px;
  top: 50%;
  transform: translateY(-50%);
  border-left: 6px solid rgba(0, 0, 0, 0.85);
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
}

.floating-controls .fab-wrapper:hover .fab-tooltip {
  opacity: 1;
  transform: translateY(-50%) translateX(-4px);
}

/* Scroll to top button - hidden by default */

.floating-controls .fab-btn.scroll-top {
  background: #0d6efd;
  color: white !important;
  opacity: 0;
  transform: scale(0.8);
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.floating-controls .fab-btn.scroll-top.visible {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.floating-controls .fab-btn.scroll-top:hover {
  background: #0b5ed7;
}

.floating-controls .fab-btn.theme-btn .sun-icon {
  display: inline;
}

.floating-controls .fab-btn.theme-btn .moon-icon {
  display: none;
}

body.dark .floating-controls .fab-btn.theme-btn .sun-icon {
  display: none;
}

body.dark .floating-controls .fab-btn.theme-btn .moon-icon {
  display: inline;
}

.floating-controls .fab-btn.lang-btn {
  font-weight: 700;
  font-size: 0.95rem;
}

.floating-controls .fab-btn.phone-btn {
  background: #25D366;
  color: white !important;
}

.floating-controls .fab-btn.phone-btn:hover {
  background: #1da851;
}

.floating-controls .fab-btn.feedback-btn {
  background: #d4a11e;
  color: white !important;
}

.floating-controls .fab-btn.feedback-btn:hover {
  background: #b3881a;
}

.floating-controls .fab-btn.contact-btn {
  background: #0d6efd;
  color: white !important;
}

.floating-controls .fab-btn.contact-btn:hover {
  background: #0b5ed7;
}

/* Dark mode tooltip */

body.dark .floating-controls .fab-tooltip {
  background: rgba(30, 30, 40, 0.95);
}

body.dark .floating-controls .fab-tooltip::after {
  border-left-color: rgba(30, 30, 40, 0.95);
}

/* Dropdown menus */

.floating-controls .phone-dropdown {
  position: relative;
}

/* Opens to the left of the phone button so it doesn't cover the other buttons */

.floating-controls .fab-dropdown-content {
  display: none;
  position: absolute;
  bottom: 0;
  right: 62px;
  background: white;
  min-width: 230px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  border-radius: 16px;
  padding: 8px 0;
  overflow: hidden;
}

body.dark .floating-controls .fab-dropdown-content {
  background: #2d2d3d;
}

.floating-controls .phone-dropdown.active .fab-dropdown-content {
  display: block;
  animation: slideUp 0.25s ease;
}

/* Tooltip would sit on top of the open dropdown */

.floating-controls .phone-dropdown.active + .fab-tooltip {
  display: none;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.floating-controls .fab-dropdown-content .dropdown-header {
  padding: 12px 18px 8px;
  font-weight: 700;
  font-size: 0.85rem;
  color: #0a2c3d;
  letter-spacing: 0.5px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

body.dark .floating-controls .fab-dropdown-content .dropdown-header {
  color: #e0e0e0 !important;
  border-bottom-color: rgba(255, 255, 255, 0.05) !important;
}

.floating-controls .fab-dropdown-content .contact-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 18px;
  text-decoration: none;
  color: #0a2c3d;
  transition: background 0.2s;
  cursor: pointer;
  font-weight: 500;
  font-size: 0.9rem;
}

body.dark .floating-controls .fab-dropdown-content .contact-item {
  color: #e0e0e0 !important;
}

.floating-controls .fab-dropdown-content .contact-item:hover {
  background: rgba(13, 110, 253, 0.08);
}

body.dark .floating-controls .fab-dropdown-content .contact-item:hover {
  background: rgba(13, 110, 253, 0.15);
}

.floating-controls .fab-dropdown-content .contact-item i {
  width: 28px;
  text-align: center;
  font-size: 1.1rem;
}

.floating-controls .fab-dropdown-content .contact-item .wa-icon {
  color: #25D366;
}

.floating-controls .fab-dropdown-content .contact-item .call-icon {
  color: #0d6efd;
}

.floating-controls .fab-dropdown-content .contact-item .phone-number {
  font-weight: 600;
  font-size: 0.9rem;
  white-space: nowrap;
}

.floating-controls .fab-dropdown-content .contact-item .copy-icon {
  margin-left: auto;
  background: none;
  border: none;
  color: #6c757d;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background 0.2s, color 0.2s;
}

.floating-controls .fab-dropdown-content .contact-item .copy-icon i {
  width: auto;
  font-size: 0.95rem;
}

.floating-controls .fab-dropdown-content .contact-item .copy-icon:hover {
  background: rgba(13, 110, 253, 0.1);
  color: #0d6efd;
}

body.dark .floating-controls .fab-dropdown-content .contact-item .copy-icon {
  color: #b0b0b0 !important;
}

body.dark .floating-controls .fab-dropdown-content .contact-item .copy-icon:hover {
  color: #4d9aff !important;
}

/* ============================================
   FEEDBACK MODAL
   ============================================ */

.feedback-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 10000;
  align-items: center;
  justify-content: center;
}

.feedback-modal.active {
  display: flex;
}

.feedback-modal-content {
  background: white;
  padding: 2.5rem;
  border-radius: 24px;
  max-width: 450px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: slideDown 0.3s ease;
  position: relative;
}

.feedback-modal-content .close-feedback {
  position: absolute;
  top: 16px;
  right: 20px;
  background: none;
  border: none;
  font-size: 1.8rem;
  cursor: pointer;
  color: #6c757d;
  transition: 0.2s;
}

.feedback-modal-content .close-feedback:hover {
  color: #0a2c3d;
  transform: rotate(90deg);
}

.feedback-modal-content h3 {
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: #0a2c3d;
}

.feedback-modal-content p {
  color: #6c757d;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

.feedback-modal-content .form-group {
  margin-bottom: 1.2rem;
}

.feedback-modal-content .form-group label {
  font-weight: 600;
  display: block;
  margin-bottom: 0.4rem;
  color: #0a2c3d;
}

.feedback-modal-content .form-control {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 2px solid #e9ecef;
  border-radius: 12px;
  font-size: 1rem;
  transition: border 0.2s;
}

.feedback-modal-content .form-control:focus {
  border-color: #0d6efd;
  outline: none;
  box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.1);
}

.feedback-modal-content .form-control textarea {
  min-height: 80px;
  resize: vertical;
}

.feedback-modal-content .btn-submit-feedback {
  width: 100%;
  padding: 0.9rem;
  background: #0d6efd;
  color: white !important;
  border: none;
  border-radius: 50px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: 0.2s;
}

.feedback-modal-content .btn-submit-feedback:hover {
  background: #0b5ed7;
  transform: scale(0.98);
  color: white !important;
}

@media (max-width: 768px) {
  .floating-controls {
    bottom: 16px;
    right: 16px;
    gap: 10px;
  }

  .floating-controls > .fab-wrapper:has(.scroll-top) {
    order: -1;
  }

  .floating-controls .fab-menu {
    bottom: 0;
    left: auto;
    right: calc(100% + 10px);
    flex-direction: row;
    gap: 8px;
    padding: 5px 7px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(13, 110, 253, 0.08);
    border-radius: 50px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    transform: translateX(16px) scale(0.85);
    transform-origin: right center;
  }

  .floating-controls.open .fab-menu {
    transform: translateX(0) scale(1);
  }

  body.dark .floating-controls .fab-menu {
    background: rgba(45, 45, 61, 0.92);
    border-color: rgba(255, 255, 255, 0.08);
  }

  .floating-controls .fab-btn {
    width: 46px;
    height: 46px;
    font-size: 1.1rem;
  }

  .floating-controls .fab-menu .fab-btn {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  }

  .floating-controls .fab-btn.lang-btn {
    font-size: 0.8rem;
  }

  .floating-controls .fab-menu .fab-wrapper,
  .floating-controls .phone-dropdown {
    position: static;
  }

  .floating-controls .fab-dropdown-content {
    min-width: 0;
    left: 0;
    right: 0;
    bottom: calc(100% + 10px);
  }

  .floating-controls .fab-tooltip {
    display: none;
  }
}

@media (max-width: 480px) {
  .floating-controls {
    bottom: 12px;
    right: 12px;
    gap: 8px;
  }

  .floating-controls .fab-menu {
    gap: 6px;
    padding: 4px 6px;
    right: calc(100% + 8px);
  }

  .floating-controls .fab-btn {
    width: 42px;
    height: 42px;
    font-size: 0.95rem;
  }

  .floating-controls .fab-btn.lang-btn {
    font-size: 0.7rem;
  }

  .floating-controls .fab-dropdown-content {
    padding: 6px 0;
  }

  .floating-controls .fab-dropdown-content .contact-item {
    padding: 8px 14px;
    font-size: 0.8rem;
  }

  .feedback-modal-content {
    padding: 1.5rem;
    width: 95%;
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================
   ENHANCED FOOTER
   ============================================ */

footer.footer {
  background: linear-gradient(135deg, #0b2b40 0%, #0a1f2e 100%);
  margin-top: 3.5rem;
  padding: 4rem 0 2rem;
  width: 100%;
  position: relative;
}

footer.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #0d6efd, #d4a11e, #0d6efd);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}

.footer-brand {
  margin-bottom: 1rem;
}

.footer-brand .wifi,
.footer-brand .hapa {
  font-size: 1.8rem;
}

.footer-desc {
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.7;
  margin: 0.8rem 0;
  font-size: 0.9rem;
}

.footer-title {
  color: white;
  font-weight: 700;
  margin-bottom: 1.2rem;
  font-size: 1.1rem;
  position: relative;
  display: inline-block;
  letter-spacing: 0.3px;
}

.footer-title::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 30px;
  height: 3px;
  background: #d4a11e;
  border-radius: 3px;
  transition: width 0.3s;
}

.footer-title:hover::after {
  width: 50px;
}

.footer-links {
  list-style: none;
  padding: 0;
}

.footer-links li {
  margin-bottom: 0.7rem;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.footer-links a i {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.3);
  transition: color 0.2s;
}

.footer-links a:hover {
  color: #d4a11e !important;
  transform: translateX(5px);
}

.footer-links a:hover i {
  color: #d4a11e;
}

.footer-contact {
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-size: 0.9rem;
}

.footer-contact i {
  color: rgba(255, 255, 255, 0.3);
  width: 20px;
}

.social-icons-footer {
  display: flex;
  gap: 0.8rem;
  margin-top: 1.2rem;
}

.social-icons-footer a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  color: white !important;
  transition: all 0.25s;
  text-decoration: none;
}

.social-icons-footer a:hover {
  background: #d4a11e;
  transform: translateY(-3px) scale(1.05);
  color: white !important;
}

.social-icons-footer a i {
  font-size: 1.1rem;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 1.8rem;
  margin-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.85rem;
}

.footer-bottom a {
  color: rgba(255, 255, 255, 0.4);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-bottom a:hover {
  color: #d4a11e !important;
}

.footer-bottom-links {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  footer.footer {
    padding: 3rem 0 1.5rem;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem 1.5rem;
    text-align: left;
  }

  .footer-grid > div:first-child,
  .footer-grid > div:last-child {
    grid-column: 1 / -1;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: left;
    align-items: flex-start;
  }

  .footer-bottom-links {
    gap: 0.5rem 1.25rem;
  }
}

@media (min-width: 1500px) {
  .constrained-content,
  .main-content {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

@media (max-width: 768px) {
  .main-content {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

/* ----- SCROLLBAR AND UTILITIES ----- */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--badge-light-bg);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: #0d6efd;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: #d4a11e;
}

.text-gold {
  color: #d4a11e !important;
}

.bg-gold {
  background: #d4a11e !important;
}

.cursor-pointer {
  cursor: pointer;
}

.no-select {
  user-select: none;
}

/* ----- PAGES WITH A MOBILE BOTTOM BAR (customer account pages) ----- */
@media (max-width: 768px) {
  body:has(.bottom-nav) .floating-controls {
    bottom: 84px;
  }

  body:has(.bottom-nav) footer.footer {
    padding-bottom: calc(1.5rem + 70px);
  }
}

/* ----- CONTENT WIDTH: the same on every page (like index) -----
   Page stylesheets may style <main>, but its width and side spacing come from here. */
body > main {
  max-width: 1500px !important;
  width: 100% !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 1.5rem !important;
  padding-right: 1.5rem !important;
}

@media (min-width: 1500px) {
  body > main {
    padding-left: 2rem !important;
    padding-right: 2rem !important;
  }
}

@media (max-width: 768px) {
  body > main {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
}

/* ----- DARK MODE FOR PAGE CONTENT -----
   Bootstrap components follow data-bs-theme="dark" (set with the theme). These rules cover
   Bootstrap utility classes and fixed colours used in page markup. */
.bg-opacity-15 {
  --bs-bg-opacity: 0.15;
}

body.dark .bg-white,
body.dark .bg-body {
  background-color: var(--card-bg) !important;
}

body.dark .bg-light {
  background-color: #3d3d4d !important;
}

body.dark .text-dark,
body.dark .text-black,
body.dark .text-body {
  color: var(--text-primary) !important;
}

body.dark .text-secondary,
body.dark .text-muted,
body.dark .text-body-secondary,
body.dark .text-secondary-emphasis {
  color: #b4b4c0 !important;
}

body.dark .text-primary {
  color: #6dafff !important;
}

body.dark .text-success {
  color: #4cd38a !important;
}

body.dark .text-danger {
  color: #ff7b86 !important;
}

body.dark .text-warning {
  color: #ffcd4d !important;
}

body.dark .text-info {
  color: #5fd3f3 !important;
}

/* Text given a fixed dark colour in the markup (style="color:#0a2c3d") */
body.dark [style*="color:#0a2c3d"],
body.dark [style*="color: #0a2c3d"] {
  color: var(--text-primary) !important;
}

/* Plain links inside page content */
body.dark main a:not([class]) {
  color: #6dafff;
}

body.dark .border,
body.dark .border-top,
body.dark .border-bottom {
  border-color: rgba(255, 255, 255, 0.08) !important;
}

/* The gold Register / Logout button keeps white text (the dark menu rule greys other links) */
body.dark .desktop-nav-links a.btn-register {
  color: white !important;
}

/* Page parts with fixed light colours (found by the dark mode check) */
body.dark main small:not([class]) {
  color: #b4b4c0;
}

body.dark .original-price,
body.dark .old-price {
  color: #ff7b86 !important;
}

body.dark span.tech-badge,
body.dark .partner-type,
body.dark .profile-role,
body.dark .alert-info,
body.dark .bundle-item .price,
body.dark .btn-outline-primary {
  color: #6dafff !important;
}

body.dark .btn-outline-primary {
  border-color: #6dafff !important;
}

body.dark .btn-outline-primary:hover {
  color: white !important;
}

body.dark .category-pill {
  color: #b4b4c0;
}

body.dark .badge-active,
body.dark .badge-success {
  background: rgba(40, 167, 69, 0.2) !important;
  color: #4cd38a !important;
}

body.dark .badge-warning {
  background: rgba(212, 161, 30, 0.2) !important;
  color: #ffcd4d !important;
}

body.dark .customer-header {
  background: #1a3a5a;
}

body.dark .owner-header {
  background: #3a3220;
}

/* wifiplans cards use an inline light gradient */
body.dark .plan-card.additional-card {
  background: var(--card-bg) !important;
}

/* ----- LIGHT TINT BADGES AND GOLD TEXT (found by the light mode check) -----
   Bootstrap badges have white text, which disappears on the light tints (bg-opacity-*). */
.badge.bg-primary.bg-opacity-10,
.badge.bg-primary.bg-opacity-25 {
  color: #0b5ed7;
}

.badge.bg-warning.bg-opacity-10:not(.text-white),
.badge.bg-warning.bg-opacity-15:not(.text-white),
.badge.bg-warning.bg-opacity-25:not(.text-white) {
  color: #7a5a0c !important;
}

.badge.bg-dark.bg-opacity-10 {
  color: #0a2c3d;
}

/* Gold text on white or pale gold, and pale status badges (bundles.php is blue now: assets/css/bundles.css) */
body .btn-login-demo {
  color: #9a7410;
}

body .badge-active,
body .badge-success {
  color: #1e7e34;
}

body .badge-warning {
  color: #7a5a0c;
}

body .distance-meter {
  color: #b35900;
}

/* Dark mode versions of the rules above */
body.dark .badge.bg-primary[class*="bg-opacity-"] {
  color: #6dafff !important;
}

body.dark .badge.bg-warning[class*="bg-opacity-"]:not(.text-white) {
  color: #ffcd4d !important;
}

body.dark .badge.bg-dark.bg-opacity-10 {
  color: var(--text-primary);
}

body.dark .btn-login-demo {
  color: #e0b84a;
}

/* ----- HERO ICON (right side of page heroes, desktop only) ----- */
.hero-art {
  width: 160px;
  height: 160px;
  margin: 0 auto;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(13, 110, 253, 0.14), rgba(212, 161, 30, 0.14));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  color: #0d6efd;
}

body.dark .hero-art {
  background: linear-gradient(135deg, rgba(77, 154, 255, 0.18), rgba(212, 161, 30, 0.18));
  color: #6dafff;
}

/* ----- DESKTOP MENU ON MEDIUM SCREENS: keep all links on one line ----- */
.desktop-nav-links {
  flex-wrap: nowrap;
}

.desktop-nav-links a {
  white-space: nowrap;
}

@media (min-width: 992px) and (max-width: 1399.98px) {
  .desktop-nav-links {
    gap: 0.3rem;
  }

  .desktop-nav-links a {
    padding: 0.45rem 0.85rem;
    font-size: 0.9rem;
  }

  .desktop-nav-links .btn-register {
    padding: 0.45rem 1rem;
  }
}

@media (min-width: 992px) and (max-width: 1199.98px) {
  .desktop-nav-brand {
    font-size: 1.6rem;
  }

  .desktop-nav-links {
    gap: 0.15rem;
  }

  .desktop-nav-links a {
    padding: 0.4rem 0.6rem;
    font-size: 0.85rem;
  }

  .desktop-nav-links .btn-register {
    padding: 0.4rem 0.8rem;
  }
}

/* Smallest desktop widths: ten links still fit on one line */
@media (min-width: 992px) and (max-width: 1099.98px) {
  .desktop-nav-links {
    gap: 0.05rem;
  }

  .desktop-nav-links a {
    padding: 0.4rem 0.5rem;
    font-size: 0.8rem;
  }

  .desktop-nav-links .btn-register i {
    display: none;
  }
}

/* ----- "READY TO BOOK?" BANNER (includes/components/book-cta.php) ----- */
.book-cta {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  margin: 2rem 0;
  padding: 1.5rem 1.75rem;
  border-radius: 28px;
  background: linear-gradient(135deg, #0b2b40 0%, #0f3a4f 100%);
  color: #fff;
}

.book-cta-icon {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.12);
  color: #d4a11e;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.book-cta-text {
  flex: 1;
  min-width: 220px;
}

.book-cta-text h3 {
  margin: 0 0 0.25rem;
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff !important;
}

.book-cta-text p {
  margin: 0;
  color: rgba(255, 255, 255, 0.75) !important;
}

.book-cta-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.8rem 1.6rem;
  border-radius: 50px;
  background: #d4a11e;
  color: #0b2b40 !important;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: 0.2s;
}

.book-cta-btn:hover {
  background: #e6b53a;
}

/* ============================================
   APP TAB BAR - customer screens (includes/layout/footer.php)
   Below 992px it replaces the sidebar; on desktop the top menu is used.
   ============================================ */
.app-tabbar {
  display: none;
}

.mobile-user {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  max-width: 55%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 991.98px) {
  .app-tabbar {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1040;
    justify-content: space-around;
    gap: 0.15rem;
    padding: 0.35rem 0.4rem calc(0.35rem + env(safe-area-inset-bottom));
    background: var(--card-bg, #fff);
    border-top: 1px solid var(--border-light, #e9ecef);
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.06);
  }

  body.has-app-nav {
    padding-bottom: calc(72px + env(safe-area-inset-bottom));
  }

  /* The + menu sits above the tab bar */
  body.has-app-nav .floating-controls {
    bottom: calc(86px + env(safe-area-inset-bottom));
  }

}

.app-tab {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  padding: 0.45rem 0.1rem;
  border: none;
  border-radius: 14px;
  background: none;
  color: var(--text-secondary, #5e6f7d);
  font-size: 0.68rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.app-tab span {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-tab i {
  font-size: 1.15rem;
}

.app-tab.active,
.app-tab:hover {
  background: #e4edff;
  color: #0d6efd;
}

body.dark .app-tab.active,
body.dark .app-tab:hover {
  background: #2a3448;
  color: #6dafff;
}

.app-tab-more {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  display: flex;
}

.app-more-menu {
  display: none;
  position: absolute;
  right: 0;
  bottom: calc(100% + 10px);
  min-width: 200px;
  background: var(--card-bg, #fff);
  border: 1px solid var(--border-light, #e9ecef);
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  overflow: hidden;
}

.app-tab-more.open .app-more-menu {
  display: block;
}

/* The + button would cover the open menu */
body.app-more-open .floating-controls {
  visibility: hidden;
}

.app-more-menu a {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.8rem 1rem;
  color: var(--text-primary, #0a2c3d);
  text-decoration: none;
  font-size: 0.9rem;
}

.app-more-menu a:hover {
  background: #e4edff;
}

body.dark .app-more-menu a:hover {
  background: #2a3448;
}

.app-more-menu a.text-danger {
  color: #dc3545 !important;
}
