/* Marine Tracking Dashboard CSS - Fixed Version */

:root {
  --primary-color: #106e8d;
  --secondary-color: #052e3c;
  --accent-color: #29a3a3;
  --sidebar-color: #0288a7;
  --light-color: #f8f9fa;
  --light-bg: #f0f4f7;
  --dark-color: #212529;
  --transition: all 0.3s ease;
  --sidebar-width: 240px;
}

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

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  max-width: 100vw;
}

body {
  font-family: "Inter", sans-serif;
  line-height: 1.6;
  color: var(--dark-color);
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--light-bg);
  max-width: 100vw;
  position: relative;
}

/* Improve focus visibility for keyboard navigation */
*:focus-visible {
  outline: 2px solid var(--accent-color);
  outline-offset: 2px;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  height: 100vh;
  min-height: 100vh;
  background-color: var(--sidebar-color);
  color: white;
  padding: 1.5rem 0;
  position: fixed;
  left: 0;
  top: 0;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 100;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
}

/* Allow flyout to escape when collapsed */
.sidebar.collapsed {
  overflow: visible;
}

/* Skip link for accessibility */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--primary-color);
  color: white;
  padding: 8px;
  text-decoration: none;
  z-index: 200;
}

.skip-link:focus {
  top: 0;
}

/* Collapsed sidebar state */
.sidebar.collapsed {
  width: 60px;
}

.sidebar.collapsed .sidebar-title,
.sidebar.collapsed .user-email,
.sidebar.collapsed .nav-text,
.sidebar.collapsed .section-arrow {
  opacity: 0;
  width: 0;
  overflow: hidden;
  display: none;
}

.sidebar.collapsed .sidebar-header {
  padding: 0.5rem;
  border-bottom: none; /* Remove border when collapsed to avoid overlap with toggle */
}

.sidebar.collapsed .user-info,
.sidebar.collapsed .nav-item,
.sidebar.collapsed .nav-section-header {
  padding: 0.75rem 0.5rem; /* Increased vertical padding from default */
  justify-content: center;
}

/* Remove border-bottom from user-info when collapsed */
.sidebar.collapsed .user-info {
  border-bottom: none;
  margin-top: 1rem; /* Add space between hamburger menu and user icon */
}

.sidebar.collapsed .nav-icon,
.sidebar.collapsed .user-icon {
  margin-right: 0;
}

.sidebar.collapsed .nav-section-content {
  display: none;
}

.sidebar.collapsed .sidebar-toggle {
  width: auto;
  padding: 0.5rem 0.75rem;
}

.sidebar-header {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  position: relative;
}

.sidebar-title {
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 0.15rem;
  color: white;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  line-height: 1.2;
}

.sidebar-subtitle {
  font-size: 1rem;
  font-weight: 400;
  margin-bottom: 0.5rem;
  opacity: 0.8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Sidebar toggle button - top right corner */
.sidebar-toggle {
  position: absolute;
  top: 10px;
  right: 10px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  color: white;
  padding: 0.4rem 0.5rem;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 100;
}

.sidebar-toggle:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
}

.sidebar-toggle:active,
.sidebar-toggle:focus {
  background-color: rgba(255, 255, 255, 0.12);
  outline: none;
  box-shadow: none;
}

.sidebar.collapsed .sidebar-toggle {
  right: 50%;
  transform: translateX(50%);
}

.user-info {
  display: flex;
  align-items: center;
  padding: 0.6rem 1.2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.user-icon {
  margin-right: 0.6rem;
  font-size: 0.95rem;
  width: 18px;
  text-align: center;
}

.user-email {
  font-size: 0.85rem;
  font-weight: 500;
}

.sidebar-nav {
  padding: 0.5rem 0;
  flex-grow: 1;
  position: relative;
  overflow-y: auto;
  overflow-x: hidden;
}

/* Allow flyout to escape sidebar-nav when collapsed */
.sidebar.collapsed .sidebar-nav {
  overflow: visible;
}

/* Scroll indicator */
.sidebar-nav::before {
  content: "";
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  height: 20px;
  background: linear-gradient(to bottom, var(--sidebar-color), transparent);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 1;
}

.sidebar-nav.scrolled::before {
  opacity: 1;
}

.nav-section {
  margin-bottom: 0.25rem;
}

/* Nav section headers (collapsible) */
.nav-section-header {
  display: flex;
  align-items: center;
  padding: 0.5rem 1.2rem;
  color: white;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  font-size: 0.85rem;
  font-weight: 500;
  font-family: inherit;
}

.nav-section-header:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.nav-section-header:focus {
  outline: 2px solid rgba(255, 255, 255, 0.5);
  outline-offset: -2px;
}

.section-arrow {
  margin-left: auto;
  transition: transform 0.3s ease;
  font-size: 0.75rem;
  opacity: 0.8;
}

.nav-section-header[aria-expanded="false"] .section-arrow {
  transform: rotate(-90deg);
}

.sidebar.collapsed .nav-section-header {
  justify-content: center;
}

/* Nav section content (collapsible) */
.nav-section-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.nav-section-content.expanded {
  max-height: 500px;
}

.nav-item {
  display: flex;
  align-items: center;
  padding: 0.45rem 1.2rem 0.45rem 2rem;
  color: white;
  text-decoration: none;
  transition: var(--transition);
  position: relative;
  font-size: 0.85rem;
}

.nav-item:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: white;
}

.nav-item:focus {
  outline: 2px solid white;
  outline-offset: -2px;
}

.nav-item.active {
  background-color: rgba(255, 255, 255, 0.2);
  font-weight: 500;
}

.nav-item.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 4px;
  background-color: white;
}

.nav-icon {
  margin-right: 0.75rem;
  font-size: 1rem;
  width: 20px;
  text-align: center;
}

.nav-text {
  font-size: 0.9rem;
}

.sub-item {
  padding-left: 3.25rem;
  font-size: 0.85rem;
  opacity: 0.9;
  padding-top: 0.3rem;
  padding-bottom: 0.3rem;
}

/* Group label inside a nav section (e.g. Admin > Users / Customers). */
.nav-subheader {
  padding: 0.6rem 1.2rem 0.25rem 1.5rem;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.5);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: 0.35rem;
}

/* First group label in a section needs no divider above it. */
.nav-section-content .nav-subheader:first-child {
  border-top: none;
  margin-top: 0;
}

/* Hide group labels when the sidebar is collapsed to icons. */
.sidebar.collapsed .nav-subheader {
  display: none;
}

.sub-item .nav-icon {
  font-size: 0.9rem;
  margin-right: 0.5rem;
  width: 16px;
  color: rgba(255, 255, 255, 0.8);
}

.sub-item.active {
  background-color: rgba(255, 255, 255, 0.15);
}

.sub-item.active::before {
  width: 2px;
}

/* Tooltips for collapsed sidebar */
.sidebar.collapsed .nav-item::after,
.sidebar.collapsed .nav-section-header::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 100%;
  top: 50%;
  transform: translateY(-50%);
  margin-left: 10px;
  padding: 0.5rem 0.75rem;
  background-color: rgba(0, 0, 0, 0.9);
  color: white;
  border-radius: 4px;
  font-size: 0.85rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 1000;
}

.sidebar.collapsed .nav-item:hover::after,
.sidebar.collapsed .nav-section-header:hover::after {
  opacity: 1;
}

/* Flyout menu for collapsed sidebar sections */
.sidebar.collapsed .nav-section:hover .nav-section-content {
  display: block !important;
  position: absolute;
  left: 100%;
  top: 0;
  background-color: var(--sidebar-color);
  min-width: 200px;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
  border-radius: 0 8px 8px 0;
  padding: 0.5rem 0;
  z-index: 1001;
  max-height: none;
  overflow: visible;
  margin-left: 0;
}

/* Position flyout at the section header's vertical position */
.sidebar.collapsed .nav-section {
  position: relative;
}

/* Style flyout menu items */
.sidebar.collapsed .nav-section:hover .nav-section-content .nav-item {
  padding: 0.6rem 1.2rem;
  display: flex;
  align-items: center;
  white-space: nowrap;
  color: white;
  text-decoration: none;
  transition: background-color 0.2s ease;
}

.sidebar.collapsed .nav-section:hover .nav-section-content .nav-item:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

/* Show text in flyout */
.sidebar.collapsed .nav-section:hover .nav-section-content .nav-text {
  display: inline;
  opacity: 1;
  width: auto;
  overflow: visible;
  margin-left: 0.5rem;
}

/* Show icons in flyout with proper spacing */
.sidebar.collapsed .nav-section:hover .nav-section-content .nav-icon {
  margin-right: 0.5rem;
}

/* Hide tooltip when flyout is showing */
.sidebar.collapsed .nav-section:hover .nav-section-header::after {
  opacity: 0;
}

.sidebar-footer {
  margin-top: auto;
  padding: 1rem 0rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.logout-btn {
  display: flex;
  align-items: center;
  /* padding: 0.4rem 0; */
  color: white;
  text-decoration: none;
  transition: var(--transition);
  opacity: 0.9;
  width: 100%;
}

.logout-btn:hover {
  opacity: 1;
  background-color: rgba(255, 255, 255, 0.1);
  color: white;
}

.logout-btn:focus {
  outline: 2px solid white;
  outline-offset: -2px;
}

.logout-icon {
  margin-right: 0.75rem;
}

/* Main content */
.main-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: var(--transition);
  max-width: 100%;
  overflow-x: hidden;
}

.main-content-with-sidebar {
  margin-left: var(--sidebar-width);
  width: calc(100vw - var(--sidebar-width));
  max-width: calc(100vw - var(--sidebar-width));
  overflow-x: hidden;
  box-sizing: border-box;
}

.main-content-with-sidebar.sidebar-collapsed {
  margin-left: 60px;
  width: calc(100vw - 60px);
  max-width: calc(100vw - 60px);
  box-sizing: border-box;
}

.main-content-no-sidebar {
  margin-left: 0;
  width: 100vw;
  max-width: 100vw;
  overflow-x: hidden;
  box-sizing: border-box;
}

/* Add spacing below header for all main content */
.main-content > *:first-child,
.main-content-with-sidebar > *:first-child,
.main-content-no-sidebar > *:first-child {
  margin-top: 90px; /* Header height + extra spacing */
}

/* Remove extra margin for parallax container - already has spacing in parent */
.main-content-full > *:first-child {
  margin-top: 0;
}

/* Full-width content container */
.main-content-full {
  flex-grow: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 70px - 40px);
  position: relative;
  padding-top: 70px; /* Header height */
  padding-bottom: 40px; /* Footer height */
}

/* Header */
.header {
  background-color: white;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  padding: 0 2rem;
  height: 70px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: fixed;
  top: 0;
  left: var(--sidebar-width);
  width: calc(100vw - var(--sidebar-width));
  z-index: 90;
  transition: var(--transition);
  box-sizing: border-box;
}

.header.sidebar-collapsed {
  left: 60px;
  width: calc(100vw - 60px);
}

/* Header for non-authenticated users (full width) */
.header-full {
  background-color: white;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  padding: 0 2rem;
  height: 70px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 90;
  transition: var(--transition);
  box-sizing: border-box;
}

.logo {
  display: flex;
  align-items: center;
}

.logo-text {
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--primary-color);
  margin-left: 0.5rem;
}

.nav-container {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
  align-items: center;
}

.nav-links a {
  text-decoration: none;
  color: var(--dark-color);
  font-weight: 500;
  transition: var(--transition);
  position: relative;
  padding-bottom: 5px;
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 0.5px;
}

.nav-links a:hover {
  color: var(--primary-color);
}

.nav-links a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--accent-color);
  transition: var(--transition);
}

.nav-links a:hover::after {
  width: 100%;
}

.login-btn {
  display: inline-block;
  padding: 0.5rem 1.5rem;
  background-color: var(--primary-color);
  color: white;
  text-decoration: none;
  border-radius: 4px;
  font-weight: 500;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  transition: var(--transition);
  white-space: nowrap;
}

.login-btn:hover {
  background-color: var(--secondary-color);
}

/* Ducky nav CTA - highlighted for unauthenticated users */
.ducky-nav-cta {
  display: inline-flex !important;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.9rem !important;
  background-color: #f0c040;
  color: #1a2e3b !important;
  border-radius: 20px;
  font-weight: 600 !important;
  text-transform: uppercase;
  font-size: 0.85rem !important;
  letter-spacing: 0.3px;
  transition: var(--transition);
  white-space: nowrap;
}

.ducky-nav-cta:hover {
  background-color: #e0b030 !important;
  color: #1a2e3b !important;
  transform: translateY(-1px);
}

.ducky-nav-cta::after {
  display: none !important;
}

.ducky-nav-badge {
  display: inline-block;
  background-color: #1a2e3b;
  color: #f0c040;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 10px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  vertical-align: middle;
}

/* Mobile menu */
.mobile-menu {
  display: none;
  cursor: pointer;
  font-size: 1.5rem;
  color: var(--primary-color);
}

/* Mobile menu panel */
.mobile-menu-panel {
  display: none;
  position: fixed;
  top: 70px;
  right: 0;
  width: 250px;
  height: calc(100vh - 70px);
  background-color: white;
  z-index: 99;
  padding: 1rem;
  box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
  transform: translateX(100%);
  transition: transform 0.3s ease;
}

.mobile-menu-panel.active {
  transform: translateX(0);
  display: block;
}

.mobile-menu-panel .nav-links {
  flex-direction: column;
  align-items: flex-start;
}

.mobile-menu-panel .nav-links li {
  margin: 0.8rem 0;
  width: 100%;
}

.mobile-menu-panel .nav-links a {
  display: block;
  width: 100%;
  padding: 0.5rem 0;
}

.mobile-menu-panel .login-btn {
  margin-top: 1rem;
  display: inline-block;
  width: 100%;
  text-align: center;
}

/* Dashboard content */
.dashboard-container {
  flex-grow: 1;
  padding: 2rem;
  background-color: var(--light-bg);
  margin-top: 70px; /* Match header height */
  padding-top: 3rem; /* Extra space below header */
  max-width: 100%;
  overflow-x: hidden;
  box-sizing: border-box;
}

.dashboard-welcome {
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  border-radius: 10px;
  padding: 2rem;
  color: white;
  margin-bottom: 2rem;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  margin-top: 1rem; /* Extra spacing from top */
}

.dashboard-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.dashboard-subtitle {
  font-size: 1.2rem;
  font-weight: 400;
  opacity: 0.9;
  max-width: 600px;
}

.section-container {
  background-color: white;
  border-radius: 10px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  margin-top: 1rem; /* Space from navbar */
  max-width: 100%;
  overflow-x: auto;
  box-sizing: border-box;
}

.section-header {
  display: flex;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #eee;
}

.section-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: rgba(16, 110, 141, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 1rem;
  font-size: 1.2rem;
  color: var(--primary-color);
}

.section-title {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--dark-color);
}

.dashboard-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.dashboard-card {
  background-color: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  transition: var(--transition);
  border: 1px solid #f0f0f0;
  display: flex;
  flex-direction: column;
}

.section-container .dashboard-card {
  background-color: #f9fbfd;
}

.dashboard-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

/* Card components and styling */
.card-banner {
  height: 8px;
  width: 100%;
}

.passive-tracer-banner {
  background: linear-gradient(90deg, #3498db, #2980b9);
}

.oil-spill-banner {
  background: linear-gradient(90deg, #e74c3c, #c0392b);
}

.climate-indices-banner {
  background: linear-gradient(90deg, #2ecc71, #27ae60);
}

.card-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.card-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
  display: inline-block;
  width: 60px;
  height: 60px;
  line-height: 60px;
  text-align: center;
  border-radius: 50%;
  background-color: rgba(16, 110, 141, 0.1);
}

.card-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--dark-color);
}

.card-text {
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
  color: #6c757d;
  line-height: 1.6;
  flex-grow: 1;
}

.card-stats {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid #eee;
}

.stat-item {
  text-align: center;
}

.stat-value {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary-color);
}

.stat-label {
  font-size: 0.8rem;
  color: #6c757d;
}

.card-actions {
  display: flex;
  justify-content: space-between;
  margin-top: auto;
}

.card-btn {
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  transition: var(--transition);
}

.btn-primary {
  background-color: var(--primary-color);
  color: white;
}

.btn-primary:hover {
  background-color: var(--secondary-color);
}

.btn-secondary {
  background-color: transparent;
  color: var(--primary-color);
  border: 1px solid var(--primary-color);
}

.btn-secondary:hover {
  background-color: rgba(16, 110, 141, 0.1);
}

/* Footer */
footer {
  background-color: var(--secondary-color);
  color: white;
  padding: 0.5rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 50;
  position: fixed;
  bottom: 0;
  left: var(--sidebar-width);
  width: calc(100vw - var(--sidebar-width));
  height: 40px;
  transition: var(--transition);
  box-sizing: border-box;
}

footer.sidebar-collapsed,
.footer.sidebar-collapsed {
  left: 60px;
  width: calc(100vw - 60px);
}

/* Footer for non-authenticated users (full width) */
footer.footer-full {
  left: 0;
  width: 100%;
}

/* Force footer positioning when sidebar collapsed */
body .sidebar.collapsed ~ * footer.sidebar-collapsed,
body footer.footer.sidebar-collapsed {
  left: 60px;
  width: calc(100vw - 60px);
  margin-left: 0;
}

.footer-left {
  font-size: 0.9rem;
}

.social-icons {
  display: flex;
}

.social-icons a {
  color: white;
  margin-left: 1.5rem;
  font-size: 1.2rem;
  transition: var(--transition);
}

.social-icons a:hover {
  color: var(--accent-color);
  transform: translateY(-3px);
}

/* Parallax styles */
.parallax-container {
  height: calc(100vh - 70px - 40px);
  width: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  perspective: 10px;
  scroll-behavior: smooth;
  position: relative;
  scroll-snap-type: y mandatory;
  /* margin-top removed - parent .main-content-full has padding-top */
}

.parallax-section {
  position: relative;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  scroll-snap-align: start;
}

.map-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
}

.map {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.parallax-content {
  position: relative;
  z-index: 10;
  color: white;
  text-align: center;
  padding: 2rem;
  max-width: 800px;
  transform: translateZ(0);
  border-radius: 10px;
  max-width: 80%;
}

.section-subtitle {
  font-size: 1.5rem;
  font-weight: 300;
  margin-bottom: 1rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.cta-btn {
  background-color: var(--accent-color);
  color: white;
  padding: 0.8rem 2rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
  border: 2px solid var(--accent-color);
  font-size: 1.1rem;
  display: inline-block;
  margin-top: 1rem;
}

.cta-btn:hover {
  background-color: transparent;
  color: white;
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* Scroll indicators */
.scroll-indicator {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  cursor: pointer;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0) translateX(-50%);
  }
  40% {
    transform: translateY(-20px) translateX(-50%);
  }
  60% {
    transform: translateY(-10px) translateX(-50%);
  }
}

/* Responsive styles */
@media (max-width: 992px) {
  /* Only change the header menu to mobile mode, keep sidebar visible */
  .dashboard-cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .section-container {
    padding: 1.2rem;
  }

  .header {
    padding: 0 1rem;
  }

  /* Hide regular nav links and show mobile menu trigger */
  header .nav-links {
    display: none;
  }

  .mobile-menu {
    display: block;
  }

  header .login-btn {
    display: none;
  }

  .section-subtitle {
    font-size: 1.3rem;
  }
}

@media (max-width: 768px) {
  /* Sidebar stays the same width but adjust content for smaller screens */
  .dashboard-cards {
    grid-template-columns: 1fr;
  }

  .section-container {
    padding: 1rem;
  }

  .section-header {
    margin-bottom: 1rem;
  }

  .section-title {
    font-size: 1.1rem;
  }

  .section-subtitle {
    font-size: 1rem;
  }

  .parallax-content {
    padding: 1rem;
    max-width: 90%;
  }

  /* Auto-collapse sidebar on mobile */
  .sidebar {
    width: 60px;
  }

  .sidebar .sidebar-title,
  .sidebar .sidebar-subtitle,
  .sidebar .user-email,
  .sidebar .nav-text,
  .sidebar .section-arrow {
    display: none;
  }

  .sidebar .sidebar-header,
  .sidebar .nav-item,
  .sidebar .nav-section-header,
  .sidebar .user-info {
    padding: 0.5rem;
    justify-content: center;
  }

  .sidebar .nav-icon,
  .sidebar .user-icon {
    margin-right: 0;
  }

  .sidebar .sub-item {
    padding-left: 0.5rem;
  }

  .sidebar .nav-section-content {
    display: none;
  }

  .sidebar-toggle {
    display: none;
  }

  /* Adjust the main content and header/footer to match narrow sidebar */
  .main-content-with-sidebar {
    margin-left: 60px;
    width: calc(100% - 60px);
  }

  .header,
  footer {
    left: 60px;
    width: calc(100% - 60px);
  }

  /* Show tooltips on mobile */
  .sidebar .nav-item::after,
  .sidebar .nav-section-header::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    margin-left: 10px;
    padding: 0.5rem 0.75rem;
    background-color: rgba(0, 0, 0, 0.9);
    color: white;
    border-radius: 4px;
    font-size: 0.85rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 1000;
  }

  .sidebar .nav-item:hover::after,
  .sidebar .nav-section-header:hover::after {
    opacity: 1;
  }
}

@media (min-width: 993px) {
  .mobile-menu-panel {
    display: none !important;
  }
}

/* Mobile menu panel fixes */
.mobile-menu-panel {
  display: none; /* Hidden by default */
  position: fixed;
  top: 70px;
  right: 0;
  width: 250px;
  height: calc(100vh - 70px);
  background-color: white;
  z-index: 99;
  padding: 1rem;
  box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
  transform: translateX(100%);
  transition: transform 0.3s ease;
}

/* When active, show the panel and transform it into view */
.mobile-menu-panel.active {
  display: block !important; /* Override any display:none */
  transform: translateX(0);
}

/* Make sure nav links inside the mobile panel are visible */
.mobile-menu-panel .nav-links {
  display: flex !important; /* Override any display:none */
  flex-direction: column;
  align-items: flex-start;
  margin: 0;
  padding: 0;
}

.mobile-menu-panel .nav-links li {
  margin: 0.8rem 0;
  width: 100%;
  list-style: none;
}

.mobile-menu-panel .nav-links a {
  display: block;
  width: 100%;
  padding: 0.5rem 0;
  text-decoration: none;
  color: var(--dark-color);
  font-weight: 500;
}

/* Style for the login button inside mobile menu */
.mobile-menu-panel .login-btn {
  display: inline-block;
  width: 100%;
  text-align: center;
  margin-top: 1rem;
  padding: 0.5rem 0;
}

/* Fixed Dots Navigation Styles */
.parallax-container {
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
}

.parallax-container::-webkit-scrollbar {
  display: none; /* Chrome, Safari, and Opera */
}

/* Dots navigation container */
.dots-navigation {
  position: fixed;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 15px;
  pointer-events: auto;
}

/* Individual dot */
.dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background-color: rgb(0, 0, 0);
  cursor: pointer;
  transition: all 0.3s ease;
  display: block;
}

/* Active dot style */
.dot.active {
  background-color: rgb(0, 0, 0);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
  transform: scale(1.2);
}

/* Add tooltip for dots on hover */
.dot-container {
  position: relative;
}

.dot-tooltip {
  position: absolute;
  right: 25px;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 12px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  white-space: nowrap;
  pointer-events: none;
}

.dot-container:hover .dot-tooltip {
  opacity: 1;
  visibility: visible;
}

/* Responsive adjustments for dots */
@media (max-width: 768px) {
  .dots-navigation {
    right: 10px;
  }

  .dot {
    width: 10px;
    height: 10px;
  }
}

/* Standalone dots navigation */
.standalone-dots-navigation {
  position: fixed;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.standalone-dots-navigation .dot-container {
  position: relative;
}

.standalone-dots-navigation .dot {
  display: block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.5);
  border: 2px solid rgba(255, 255, 255, 0.7);
  cursor: pointer;
  transition: all 0.3s ease;
}

.standalone-dots-navigation .dot.active {
  background-color: white;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
  transform: scale(1.2);
}

.standalone-dots-navigation .dot-tooltip {
  position: absolute;
  right: 25px;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 12px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  white-space: nowrap;
  pointer-events: none;
}

.standalone-dots-navigation .dot-container:hover .dot-tooltip {
  opacity: 1;
  visibility: visible;
}

/* Ensure content doesn't go under the sidebar */
.main-content-with-sidebar .parallax-container,
.main-content-with-sidebar .dashboard-container,
.main-content-with-sidebar .section-container {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* Prevent tables and Bootstrap containers from overflowing */
.main-content .container,
.main-content .container-fluid {
  max-width: 100% !important;
  padding-left: 15px;
  padding-right: 15px;
  box-sizing: border-box;
}

.main-content table,
.main-content .table-responsive {
  max-width: 100%;
  overflow-x: auto;
  box-sizing: border-box;
}

.main-content table {
  width: 100%;
  table-layout: auto;
}

/* Ensure Bootstrap rows don't cause overflow */
.main-content .row {
  margin-left: -15px;
  margin-right: -15px;
  max-width: none;
}

.main-content [class*="col-"] {
  padding-left: 15px;
  padding-right: 15px;
  box-sizing: border-box;
}

/* ============================================================
   Shared utility classes (used across mappy, anchor_files,
   accounts, clima_index — all extend main/base.html)
   ============================================================ */

/* Sidebar nav-link hover highlight */
.nav-link:hover {
  background-color: #d2f4ea;
}

/* Font-size utilities for tables */
.fs-xs {
  font-size: 0.8rem !important;
}

.fs-xxs {
  font-size: 0.7rem !important;
}

/* Extra-small button variant used in django-tables2 columns */
.btn-xs {
  font-size: 0.6rem !important;
  padding: 0.1rem 0.45rem !important;
  line-height: 1.4 !important;
}
