:root {
  --color-primary: linear-gradient(
    135deg,
    #1a1a2e 0%,
    #16213e 50%,
    #0f3460 100%
  );
  --gradient-secondary: linear-gradient(
    135deg,
    #414177 0%,
    #2c4077 50%,
    #134481 100%
  );
  --color-secondary: #42b72a;
  --color-accent: #4267b2;
  --color-surface: #ffffff;
  --color-background: #f0f2f5;
  --color-text: #1c1e21;
  --color-light-text: #65676b;
  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.1);
  --shadow-elevated: 0 2px 4px rgba(0, 0, 0, 0.1);
  --radius: 8px;
}

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

body {
  font-family: 'Poppins', 'Inter', Arial, sans-serif;
  background: var(--color-background);
  color: var(--color-text);
  line-height: 1.5;
  margin: 0;
  padding: 0 0 60px 0; /* Space for footer */
  min-height: 100vh;
}

.container {
  padding-inline: 32px;
  margin-inline: auto;
  max-width: 1300px;
}

/* MAIN */
.main-content {
  padding-block: 20px;
  position: relative;
  z-index: 10; /* Lower than header */
}

/* Story list styles */
.story-list-container {
  max-width: 600px;
  margin: 0 auto 40px auto;
}

.welcome-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.welcome-header h1 {
  color: var(--color-text);
  font-size: 1.5rem;
}

.add-story-btn {
  background-color: var(--color-secondary);
  color: white;
  border: none;
  border-radius: 6px;
  padding: 10px 16px;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background-color 0.2s;
}

.add-story-btn:hover {
  background-color: #3aa424;
}

.story-card {
  background-color: var(--color-surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 16px;
  margin-bottom: 16px;
  transition:
    transform 0.2s,
    box-shadow 0.2s;
  border: 1px solid rgba(0, 0, 0, 0.05);
  overflow: hidden;
}

.story-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-elevated);
}

.story-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  padding: 20px 0;
}

.card-header {
  padding: 12px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  margin-bottom: 12px;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
}

.user-meta {
  flex: 1;
}

.username {
  font-weight: 600;
  margin-bottom: 4px;
}

.post-time {
  color: var(--color-light-text);
  font-size: 0.85rem;
}

.card-image-container {
  margin-bottom: 12px;
  border-radius: var(--radius);
  overflow: hidden;
}

.card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.card-image:hover {
  transform: scale(1.05);
}

.card-content {
  padding: 0 12px 12px 12px;
}

.story-excerpt {
  font-size: 0.95rem;
  color: var(--color-text);
  margin-bottom: 12px;
  line-height: 1.5;
}

.card-actions {
  display: flex;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.action-btn {
  background: none;
  border: none;
  color: var(--color-light-text);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  padding: 8px;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.action-btn:hover {
  background-color: rgba(0, 0, 0, 0.05);
  color: var(--color-primary);
}

.action-btn i {
  font-size: 1rem;
}

.count {
  font-weight: 500;
}

.story-header {
  display: flex;
  align-items: center;
  margin-bottom: 12px;
}

.story-user {
  font-weight: 600;
  font-size: 1rem;
  margin-right: auto;
}

.story-time {
  color: var(--color-light-text);
  font-size: 0.85rem;
}

.story-img {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: 12px;
}

.story-description {
  font-size: 0.95rem;
  margin-bottom: 12px;
  line-height: 1.5;
}

.story-actions {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid #e4e6eb;
  padding-top: 12px;
  margin-top: 12px;
}

.action-btn {
  background: none;
  border: none;
  color: var(--color-light-text);
  font-size: 0.9rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 4px;
}

.action-btn:hover {
  background-color: #f0f2f5;
}

/* Skip Link */
.skip-link {
  position: absolute;
  right: 16px;
  top: -60px; /* Sembunyikan di atas navbar */
  width: auto;
  height: auto;
  opacity: 0;
  pointer-events: none;
  z-index: 99;
  background: var(--color-primary);
  color: #fff;
  padding: 12px 24px;
  border: 2px solid #ffd600;
  border-radius: 8px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  box-shadow: none;
  outline: none;
  transition:
    opacity 0.3s,
    top 0.3s,
    box-shadow 0.3s,
    outline 0.3s;
}

.skip-link:focus {
  top: 205px;
  opacity: 1;
  pointer-events: auto;
  box-shadow: 0 5px #ffd600;
  outline: 2px solid #ffd600;
}

/* Map styles */
#map {
  width: 100%;
  height: 400px;
  margin-top: 24px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  background: var(--color-surface);
}

/* View Transitions */
::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 0.5s;
}

/* Remove global view transition styles */

/* Add Story Page Styles */
.add-story-container {
  max-width: 600px;
  margin: 0 auto;
  background: white;
  padding: 24px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}

.add-story-container h1 {
  color: var(--color-primary);
  margin-bottom: 24px;
  font-size: 1.5rem;
  text-align: center;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: var(--radius);
  font-size: 1rem;
}

.form-group textarea {
  min-height: 120px;
  resize: vertical;
}

.camera-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 20px;
}

#camera-preview {
  width: 100%;
  max-width: 400px;
  border-radius: var(--radius);
  margin-bottom: 12px;
  background: #eee;
}

.camera-buttons {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

#capture-btn {
  background-color: var(--color-primary);
  color: white;
  border: none;
  border-radius: var(--radius);
  padding: 8px 16px;
  cursor: pointer;
  font-weight: 600;
}

#captured-image {
  max-width: 100%;
  border-radius: var(--radius);
}

.map-container {
  margin-bottom: 20px;
  height: 300px;
}

/* Auth pages styles */
.auth-container {
  max-width: 550px;
  margin: 80px auto 40px auto; /* Increased top margin to avoid header overlap */
  background: var(--color-surface);
  padding: 40px; /* Increased padding */
  border-radius: 16px; /* Larger radius for modern look */
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1); /* Enhanced shadow for depth */
  text-align: center; /* Center content */
  position: relative; /* Establish positioning context */
  z-index: 1; /* Lower than header */
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  border: 1px solid rgba(0, 0, 0, 0.05); /* Subtle border */
  overflow: hidden; /* Ensure border-radius applies to children */
}

/* Add subtle pattern to auth container background */
.auth-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.02;
  background-image: url("data:image/svg+xml,%3Csvg width=%2720%27 height=%2720%27 viewBox=%270 0 20 20%27 xmlns=%27http://www.w3.org/2000/svg%27%3E%3Cg fill=%27%23000000%27 fill-opacity=%271%27 fill-rule=%27evenodd%27%3E%3Ccircle cx=%273%27 cy=%273%27 r=%273%27/%3E%3Ccircle cx=%2713%27 cy=%2713%27 r=%273%27/%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
  z-index: -1;
}

/* Add subtle top accent to auth container */
.auth-container::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: linear-gradient(
    to right,
    var(--color-primary),
    var(--color-accent)
  );
}

.auth-container h1 {
  color: var(--color-primary);
  margin: 10px 0 35px 0; /* Adjusted margins */
  font-size: 2.2rem; /* Larger font size */
  text-align: center;
  display: flex; /* Align icon and text */
  align-items: center;
  justify-content: center;
  gap: 12px;
  position: relative;
  font-weight: 700;
  letter-spacing: -0.5px; /* Tighter letter spacing for modern look */
}

/* Add decorative underline to auth header */
.auth-container h1::after {
  content: '';
  position: absolute;
  bottom: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background: linear-gradient(
    to right,
    var(--color-primary),
    var(--color-accent)
  );
  border-radius: 2px;
}

.auth-container .form-group {
  margin-bottom: 30px; /* More space between elements */
  text-align: left; /* Align form elements to the left */
  position: relative; /* For floating label effect */
  transition: all 0.3s ease;
}

/* Add focus effect to form group */
.auth-container .form-group:focus-within {
  transform: translateY(-3px);
}

.auth-container label {
  display: block;
  margin-bottom: 10px;
  font-weight: 600;
  color: var(--color-text); /* Use primary text color */
  transition: all 0.3s ease;
  font-size: 0.95rem;
  letter-spacing: 0.5px;
  position: relative;
  padding-left: 2px;
}

/* Show icon marker before label */
.auth-container label::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 4px;
  background-color: var(--color-primary);
  border-radius: 50%;
  margin-right: 8px;
  position: relative;
  top: -3px;
}

.auth-container input {
  width: 100%;
  padding: 16px; /* Increased padding */
  border: 2px solid #e0e0e0; /* Slightly thicker border */
  border-radius: 12px; /* Rounded corners */
  font-size: 1rem;
  transition: all 0.25s ease-in-out; /* Smooth transitions */
  background-color: #f9f9f9; /* Slight background color */
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02); /* Subtle inner shadow */
}

.auth-container input:focus {
  outline: none;
  border-color: var(--color-primary); /* Highlight on focus */
  box-shadow: 0 0 0 3px rgba(24, 119, 242, 0.15); /* Larger, more subtle focus ring */
  background-color: #ffffff; /* Pure white background on focus */
  transform: translateY(-2px); /* Subtle lift effect */
}

.auth-container .form-submit {
  text-align: center;
  margin-top: 40px;
  position: relative;
}

.auth-container button {
  background-color: var(--color-primary); /* Restore solid blue color */
  color: white;
  border: none;
  border-radius: 12px;
  padding: 16px 32px; /* Increased padding */
  font-size: 1.15rem; /* Increased font size */
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease; /* Smoother transition for all properties */
  display: inline-flex; /* Align icon and text */
  align-items: center;
  gap: 10px;
  box-shadow: 0 4px 12px rgba(24, 119, 242, 0.25); /* Add elevation shadow */
  position: relative;
  overflow: hidden; /* For ripple effect */
  letter-spacing: 0.5px; /* Slightly increase letter spacing */
  width: 80%; /* Set width to make button more prominent */
  justify-content: center;
}

.auth-container button:hover {
  background-color: var(--color-accent); /* Use the accent blue on hover */
  box-shadow: 0 6px 15px rgba(24, 119, 242, 0.35); /* Enhanced shadow on hover */
  transform: translateY(-3px); /* Slight lift effect */
}

.auth-container button:active {
  transform: translateY(-1px); /* Reduced lift when clicked */
  box-shadow: 0 3px 8px rgba(24, 119, 242, 0.2); /* Reduced shadow when clicked */
}

/* Add ripple effect on button */
.auth-container button::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 5px;
  height: 5px;
  background: rgba(255, 255, 255, 0.5);
  opacity: 0;
  border-radius: 100%;
  transform: scale(1, 1) translate(-50%, -50%);
  transform-origin: 50% 50%;
}

.auth-container button:focus:not(:active)::after {
  animation: ripple 1s ease-out;
}

@keyframes ripple {
  0% {
    opacity: 1;
    transform: scale(0, 0);
  }
  100% {
    opacity: 0;
    transform: scale(100, 100);
  }
}

.auth-container button:disabled {
  background-color: #cccccc; /* Gray for disabled state */
  cursor: not-allowed;
  box-shadow: none;
  opacity: 0.7;
}

.auth-link {
  text-align: center;
  margin-top: 30px; /* Increased margin-top */
  color: var(--color-light-text);
  font-size: 0.95rem;
  padding: 10px;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  margin-left: -40px;
  margin-right: -40px;
  padding-left: 40px;
  padding-right: 40px;
}

.auth-link a {
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s ease-in-out;
  position: relative;
  padding: 2px 4px;
  border-radius: 4px;
}

.auth-link a:hover {
  color: var(--color-accent);
  background-color: rgba(24, 119, 242, 0.05);
}

/* Add animation for success message */
.alert-success {
  animation: slideInFadeIn 0.5s ease-out forwards;
}

@keyframes slideInFadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.alert {
  padding: 15px 20px; /* Increased padding */
  margin: 20px 0; /* Increased margin */
  border-radius: 12px;
  display: flex; /* Align icon and text */
  align-items: center;
  gap: 12px;
  font-size: 0.95rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  position: relative;
  border-left-width: 4px;
}

.alert-success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
  border-left: 4px solid #28a745;
}

.alert-success i {
  color: #28a745;
  font-size: 1.2rem;
}

.alert-error {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
  border-left: 4px solid #dc3545;
}

.alert-error i {
  color: #dc3545;
  font-size: 1.2rem;
}

.alert-warning {
  background-color: #fff3cd;
  color: #856404;
  border: 1px solid #ffeeba;
  border-left: 4px solid #ffc107;
}

.alert-warning i {
  color: #ffc107;
  font-size: 1.2rem;
}

.form-text {
  font-size: 0.85rem;
  color: var(--color-light-text);
  margin-top: 5px;
  display: block; /* Ensure it takes full width */
}

/* Auth links in navigation */
.auth-links {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.user-name {
  display: block;
  font-weight: 600;
  margin-bottom: 5px;
}

#user-logged-in,
#user-logged-out {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

/* Story detail page */
.story-detail-container {
  max-width: 800px;
  margin: 0 auto;
}

.story-detail-header {
  margin-bottom: 24px;
}

.story-detail-header h1 {
  font-size: 1.8rem;
  margin: 12px 0;
}

.story-detail-image {
  margin-bottom: 24px;
}

.full-width-img {
  width: 100%;
  border-radius: var(--radius);
  max-height: 500px;
  object-fit: cover;
}

.story-detail-body {
  margin-bottom: 24px;
  font-size: 1.1rem;
  line-height: 1.6;
}

.story-detail-map {
  margin: 30px 0;
}

.detail-location-map {
  height: 300px;
  width: 100%;
  border-radius: var(--radius);
}

.back-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 600;
}

.back-button:hover {
  text-decoration: underline;
}

.story-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.story-link:hover .story-img {
  transform: scale(1.02);
  transition: transform 0.3s ease;
}

.full-width {
  width: 100%;
}

.loading-spinner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 0;
  color: var(--color-light-text);
  gap: 16px;
  animation: fadeIn 0.3s ease-out;
}

.loading-spinner i {
  font-size: 2rem;
  color: var(--color-primary);
  animation: spin 1s linear infinite;
}

.loading-spinner span {
  font-size: 0.95rem;
  font-weight: 500;
  margin-top: 8px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes fadeIn {
  0% {
    opacity: 0;
    transform: translateY(10px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Map page styles */
.map-page-container {
  max-width: 1200px;
  margin: 0 auto;
}

.map-page-container h1 {
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.map-description {
  margin-bottom: 20px;
  color: var(--color-light-text);
}

.story-map {
  width: 100%;
  height: 500px;
  border-radius: var(--radius);
  margin-bottom: 30px;
  box-shadow: var(--shadow-card);
}

.map-filters {
  margin-bottom: 20px;
}

.map-filters h3 {
  margin-bottom: 10px;
  font-size: 1.1rem;
}

.filter-options {
  display: flex;
  gap: 10px;
}

.filter-btn {
  padding: 8px 16px;
  background-color: #f0f2f5;
  border: none;
  border-radius: 20px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

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

.map-stories-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-bottom: 30px;
}

.map-story-item {
  display: flex;
  background: var(--color-surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: transform 0.2s;
}

.map-story-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-elevated);
}

.map-story-img {
  width: 120px;
  height: 120px;
  object-fit: cover;
}

.map-story-info {
  padding: 15px;
  flex: 1;
}

.map-story-info h3 {
  margin: 0 0 8px 0;
  font-size: 1.1rem;
}

.map-story-info p {
  margin: 0 0 12px 0;
  font-size: 0.9rem;
  color: var(--color-light-text);
}

/* Offline actions button group */
.offline-actions {
  display: flex;
  gap: 1rem;
  margin: 1.5rem 0 1rem 0;
  justify-content: center;
}

#save-offline-btn {
  background: #42b72a;      /* Hijau terang */
  color: #fff;
}

#save-offline-btn:hover,
#save-offline-btn:focus {
  background: #36981f;
  color: #fff;
}

#show-offline-btn {
  background: var(--color-primary); 
  color: #fff;
}

#show-offline-btn:hover,
#show-offline-btn:focus {
  background: var(--gradient-secondary);
  color: #fff;
}

#clear-offline-btn {
  background: #ff5252;      /* Merah terang */
  color: #fff;
}

#clear-offline-btn:hover,
#clear-offline-btn:focus {
  background: #c62828;
  color: #fff;
}

/* Tetap gunakan style dasar untuk tombol offline */
.offline-actions button {
  border: none;
  border-radius: 6px;
  padding: 0.7rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}

.view-story-btn {
  display: inline-block;
  padding: 6px 12px;
  background-color: var(--color-primary);
  color: white;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 4px;
  text-decoration: none;
}

/* Entrance Animation */
@keyframes fade-slide-in {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-in {
  animation: fade-slide-in 0.5s ease-out forwards;
}

/* Profile page styles */
.profile-container {
  max-width: 800px;
  margin: 0 auto;
  background: var(--color-surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 30px;
}

.profile-header {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 30px;
}

.profile-avatar {
  color: var(--color-primary);
}

.profile-info h1 {
  margin: 0 0 5px 0;
  font-size: 1.5rem;
}

.profile-info p {
  color: var(--color-light-text);
  margin: 0;
}

.profile-stats {
  display: flex;
  justify-content: space-around;
  margin-bottom: 30px;
  padding: 20px 0;
  border-top: 1px solid #eee;
  border-bottom: 1px solid #eee;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

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

.stat-label {
  font-size: 0.9rem;
  color: var(--color-light-text);
}

.profile-actions {
  display: flex;
  gap: 12px;
  margin-bottom: 30px;
}

.btn-primary,
.btn-secondary {
  padding: 12px 20px;
  border-radius: var(--radius);
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  border: none;
}

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

.btn-secondary {
  background: #f0f2f5;
  color: var(--color-text);
}

.profile-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  border-bottom: 1px solid #eee;
}

.tab-button {
  padding: 12px 16px;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--color-light-text);
}

.tab-button.active {
  border-bottom-color: var(--color-primary);
  color: var(--color-primary);
}

.tab-content h2 {
  margin-top: 0;
  font-size: 1.2rem;
  margin-bottom: 20px;
}

.profile-stories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 15px;
}

.profile-story-item {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  height: 200px;
}

.profile-story-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-story-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 10px;
}

.profile-story-description {
  margin: 0 0 5px 0;
  font-size: 0.9rem;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.profile-story-time {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.8);
}

.empty-state {
  text-align: center;
  padding: 30px;
  color: var(--color-light-text);
}

.link-primary {
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 600;
}

.link-primary:hover {
  text-decoration: underline;
}

.map-container p {
  margin-bottom: 12px;
  color: var(--color-light-text);
  font-size: 0.9rem;
}

/* Pagination styles for the map page */
.pagination-container {
  margin-top: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 15px;
}

.load-more-btn {
  background-color: var(--color-primary);
  color: white;
  border: none;
  border-radius: var(--radius);
  padding: 12px 24px;
  font-weight: 600;
  cursor: pointer;
  transition:
    background-color 0.2s,
    transform 0.2s;
}

.load-more-btn:hover {
  background-color: var(--color-accent);
  transform: translateY(-2px);
}

.page-info {
  color: var(--color-light-text);
  font-size: 0.9rem;
}

.loading-more {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 15px;
  color: var(--color-light-text);
  gap: 10px;
}

.form-submit {
  text-align: center;
}

.form-submit button {
  background-color: var(--color-secondary);
  color: white;
  border: none;
  border-radius: var(--radius);
  padding: 12px 24px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s;
}

.form-submit button:hover {
  background-color: #3aa424;
}

.location-display {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
}

.location-display input {
  flex: 1;
  background-color: #f5f5f5;
}

@media screen and (width > 1000px) {
  .story-list-container {
    max-width: 700px;
  }
}

/* Responsive Design for Mobile Devices */
@media screen and (max-width: 900px) {
  .container {
    padding-inline: 16px;
    max-width: 100vw;
  }
  #map {
    height: 300px;
    margin-top: 16px;
  }
}

@media screen and (max-width: 600px) {
  .container {
    padding-inline: 8px;
  }

  .skip-link {
    right: 8px;
  }

  .skip-link:focus {
    top: 56px;
    padding: 10px 14px;
    font-size: 0.95rem;
  }

  /* Enhanced fixes for login page on small screens */
  .auth-container {
    margin-top: 100px; /* Further increase top margin on small screens */
    padding: 25px 20px; /* Slightly reduce padding on smaller screens */
    width: 95%;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08); /* Softer shadow on mobile */
  }

  .auth-container h1 {
    font-size: 1.8rem; /* Smaller font size on mobile */
    margin-bottom: 25px;
  }

  .auth-container input {
    padding: 14px; /* Slightly smaller input padding */
  }

  .auth-container button {
    width: 100%; /* Full width button on mobile */
    padding: 14px 20px;
  }

  .auth-link {
    margin-left: -20px;
    margin-right: -20px;
    padding-left: 20px;
    padding-right: 20px;
  }

  /* Make alerts more compact on mobile */
  .alert {
    padding: 12px 15px;
    font-size: 0.9rem;
  }

  #map {
    height: 200px;
    margin-top: 10px;
    border-radius: 6px;
  }
}

/* Header styles */
header {
  background: var(--color-primary);
  color: white;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
}

.main-header {
  min-height: 70px;
  padding-block: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: nowrap;
}

.brand-name {
  font-size: 1.8rem;
  font-weight: bold;
  text-decoration: none;
  color: white;
  display: flex;
  align-items: center;
  gap: 10px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
  transition:
    transform 0.2s ease-in-out,
    text-shadow 0.2s ease-in-out;
}

.brand-name:hover {
  transform: translateY(-1px);
  text-shadow: 3px 3px 5px rgba(0, 0, 0, 0.3);
}

.brand-name img {
  filter: brightness(0) invert(1);
  width: 40px;
  height: 40px;
  transition: transform 0.2s ease-in-out;
}

.brand-name:hover i {
  transform: scale(1.1);
}

.navigation-drawer {
  min-height: 100vh;
  width: 200px;
  padding: 20px 10px;
  /* background-color: var(--color-surface); */
  background-color: #16213e;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);

  position: fixed;
  inset-block-start: 0;
  inset-inline-start: 0;

  box-shadow: 0 0 4px 2px #00000033;
  transform: translateX(-100%);
  transition: transform 350ms;

  z-index: 1100;
}

.navigation-drawer.open {
  transform: translateX(0);
}

.drawer-button {
  padding: 8px 12px;
  border: 0;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 24px;
  color: #fff;
  background-color: rgba(255, 255, 255, 0.1);
  min-width: 44px;
  min-height: 44px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.drawer-button:hover,
.drawer-button:focus {
  background-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.drawer-button:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

#main-nav,
.auth-links {
  width: 100%;
}

/* Main navigation visibility controlled by auth state */
#main-nav {
  display: none; /* Hidden by default on mobile */
}

/* Show nav for logged in users */
header.logged-in #main-nav {
  display: block; /* Show when logged in */
}

/* Auth nav items visibility */
.auth-nav-item {
  display: block !important; /* Always show auth nav items */
}

/* Auth buttons container for non-logged in users (Desktop) */
.auth-buttons-container {
  display: none; /* Hidden by default */
  gap: 10px;
  margin-left: auto;
}

/* Individual login/register buttons (Desktop) */
.auth-buttons-container .login-btn,
.auth-buttons-container .register-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  transition: all 0.2s ease;
}

.auth-buttons-container .login-btn {
  background-color: transparent;
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.5);
}

.auth-buttons-container .register-btn {
  background-color: var(--color-primary);
  border: 1px solid rgba(255, 255, 255, 0.5);
  color: white;
}

.auth-buttons-container .login-btn:hover,
.auth-buttons-container .register-btn:hover {
  transform: translateY(-2px);
}

.auth-buttons-container .login-btn:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.auth-buttons-container .register-btn:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

#user-name {
  font-weight: 600;
  background-color: rgba(255, 255, 255, 0.1);
  padding: 5px 10px;
  border-radius: 4px;
  margin-bottom: 8px;
  display: inline-block;
}

#user-logged-out a {
  transition: all 0.2s ease;
  border-radius: 6px;
  padding: 8px 12px;
}

#user-logged-out a:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.nav-list li a {
  padding: 6px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--color-text), #fff;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
}

.nav-list li a:hover,
.nav-list li a:focus {
  color: var(--color-primary);
  background-color: rgba(
    0,
    0,
    0,
    0.05
  ); /* Add a subtle background on hover/focus */
  transform: translateY(-2px);
  transition:
    transform 0.2s ease,
    color 0.2s ease,
    background-color 0.2s ease;
}

/* User dropdown styles */
.user-dropdown-container {
  position: relative;
  order: 2;
  display: none; /* Hidden by default, shown when logged in via JavaScript */
}

.user-dropdown-button {
  background-color: transparent;
  border: none;
  color: white;
  font-size: 1.8rem;
  cursor: pointer;
  padding: 6px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.user-dropdown-button:hover {
  background-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

.user-dropdown-content {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 220px;
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  z-index: 1200;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
}

/* Show dropdown when clicking button (handled by JavaScript) */
.user-dropdown-content.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Additional hover effect for larger screens */
@media (hover: hover) {
  .user-dropdown-container:hover .user-dropdown-content,
  .user-dropdown-button:focus + .user-dropdown-content {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
}

.user-dropdown-header {
  padding: 16px;
  border-bottom: 1px solid #f0f2f5;
  text-align: center;
}

#dropdown-user-name {
  font-weight: 600;
  color: var(--color-text);
  font-size: 1.1rem;
}

.user-dropdown-menu {
  padding: 8px 0;
}

.dropdown-item {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  color: var(--color-text);
  text-decoration: none;
  gap: 10px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.dropdown-item:hover {
  background-color: #f0f2f5;
  color: var(--color-primary);
}

.dropdown-item i {
  width: 18px;
  text-align: center;
  font-size: 1.1rem;
}

/* Responsive styles */
@media screen and (width > 1000px) {
  .navigation-drawer {
    min-height: auto;
    width: auto;
    padding: 0;
    background-color: var(--color-primary); /* Match header background */
    flex-direction: row;
    justify-content: space-between;
    position: static;
    box-shadow: none;
    transform: translateX(0);
  }

  .nav-list {
    flex-direction: row;
  }

  /* Desktop styling for logged in state only */
  header.logged-in #main-nav {
    display: flex !important;
    flex-direction: row; /* Ensure row layout on desktop */
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 0; /* Remove bottom margin on desktop */
  }

  /* Special handling for auth pages (login/register) */
  body.auth-page #main-nav {
    display: none !important;
  }

  /* Fix for navigation drawer on auth pages */
  body.auth-page .navigation-drawer .nav-list {
    display: flex;
    flex-direction: column;
  }

  /* Special styling for auth links in navigation drawer on auth pages */
  body.auth-page .auth-nav-item {
    margin: 5px 0;
  }

  body.auth-page .auth-nav-item a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border-radius: 8px;
    color: var(--color-text);
    font-weight: 600;
    transition: all 0.2s ease;
  }

  body.auth-page .auth-nav-item a:hover {
    background-color: rgba(0, 0, 0, 0.05);
    color: var(--color-primary);
  }

  /* Additional styling for logged-out state */
  header.logged-out #main-nav {
    background-color: var(--color-primary);
  }

  /* Header background consistent styling */
  header.desktop-view .navigation-drawer {
    background-color: var(--color-primary);
  }

  .nav-list li a {
    display: inline-flex;
    align-items: center;
    color: white; /* Set text to white for contrast on primary color */
    padding: 8px 16px;
    border-radius: 8px;
  }

  .nav-list li a:hover {
    background-color: rgba(255, 255, 255, 0.1); /* Light hover effect */
    color: white; /* Keep text white on hover */
  }

  .drawer-button {
    display: none;
  }

  .user-dropdown-container {
    margin-left: auto;
    margin-right: 20px;
    order: unset;
  }

  .user-dropdown-content {
    right: 0;
  }

  /* Show auth buttons container on desktop when logged out */
  /* Always show auth buttons on desktop regardless of login state */
  @media screen and (width > 1000px) {
    .auth-buttons-container {
      display: flex !important;
      margin-left: auto;
    }

    /* Show brand name and basic header structure */
    .main-header {
      padding: 0 2rem;
    }

    /* Desktop navigation container */
    #main-nav {
      display: flex !important; /* Always display in desktop view */
      flex-grow: 1;
      justify-content: center;
      margin-left: auto;
    }

    /* Make sure nav items in desktop use white text */
    .nav-list li a {
      color: white;
    }

    /* Fix hover state to maintain white text */
    .nav-list li a:hover,
    .nav-list li a:focus {
      color: white;
      background-color: rgba(255, 255, 255, 0.1);
    }
  }
}

@media screen and (max-width: 900px) {
  .main-header {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 70px;
    padding-block: 12px;
    flex-wrap: nowrap;
  }
}

@media screen and (max-width: 600px) {
  .main-header {
    gap: 10px;
    padding-block: 8px;
    height: auto;
  }

  .brand-name {
    font-size: 1.1rem;
    gap: 6px;
  }

  .brand-name i {
    font-size: 1.2rem;
  }

  .drawer-button {
    font-size: 36px;
    padding: 14px;
    min-width: 48px;
    min-height: 48px;
    border-radius: 8px;
  }

  .nav-list li a {
    font-size: 1.1rem;
    padding: 14px 16px;
    min-width: 48px;
    min-height: 48px;
    border-radius: 8px;
  }

  /* Ensure auth nav items look like other nav items in mobile */
  .auth-nav-item a {
    color: var(--color-text); /* Match other nav links */
    background-color: transparent; /* Remove button background */
    border: none; /* Remove button border */
    padding: 14px 16px; /* Match other nav links padding */
    border-radius: 8px; /* Match other nav links border-radius */
    font-weight: 600; /* Match other nav links font-weight */
  }

  .auth-nav-item a:hover,
  .auth-nav-item a:focus {
    background-color: rgba(0, 0, 0, 0.05); /* Add hover background */
    color: var(--color-primary); /* Match other nav links hover color */
  }

  .navigation-drawer {
    width: 80vw;
    min-width: 180px;
    max-width: 320px;
    padding: 16px 4px;
  }

  .user-dropdown-button {
    font-size: 1.5rem;
    padding: 4px;
    min-width: 40px;
    min-height: 40px;
  }

  .user-dropdown-content {
    min-width: 200px;
    right: -10px;
  }

  .dropdown-item {
    padding: 10px 14px;
  }
}

/* Improve tap target spacing for all touch devices */
@media (pointer: coarse) {
  .drawer-button,
  .nav-list li a {
    min-width: 48px;
    min-height: 48px;
    padding: 12px 16px;
  }
}
/* Hide main navigation for logged-out users in desktop mode */
header.logged-out.desktop-view #main-nav {
  display: none !important;
}
/* Hide main navigation for logged-out users in desktop mode (always keep in DOM) */
header.logged-out.desktop-view #main-nav {
  display: none !important;
}
/* Hide navigation drawer for logged-out users in desktop mode on login/register page */
body.auth-page header.logged-out.desktop-view nav#navigation-drawer {
  display: none !important;
}
/* Force hide navigation drawer in desktop mode before login on auth pages */
body.auth-page .navigation-drawer {
  display: none !important;
}
/* Hide navigation drawer for logged-out users in desktop mode on about/map pages */
body.about-page header.logged-out.desktop-view .navigation-drawer,
body.map-page header.logged-out.desktop-view .navigation-drawer {
  display: none !important;
}

/* Footer Styles */
html,
body {
  height: 100%;
}

body {
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

.site-footer {
  width: 100%;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  position: relative;
  overflow: hidden;
}

.site-footer::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
}

.site-footer::after {
  content: '';
  position: absolute;
  top: -50px;
  left: -50px;
  width: 100px;
  height: 100px;
  background: radial-gradient(
    circle,
    rgba(102, 126, 234, 0.1) 0%,
    transparent 70%
  );
  border-radius: 50%;
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-20px) rotate(180deg);
  }
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 20px 30px;
  position: relative;
  z-index: 2;
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 60px;
  margin-bottom: 40px;
}

.footer-brand {
  position: relative;
}

.footer-brand h2 {
  font-size: 2.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, #667eea, #764ba2, #f093fb);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 20px;
  animation: gradientShift 3s ease-in-out infinite;
  display: flex;
  align-items: center;
  gap: 15px;
}

@keyframes gradientShift {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

.footer-brand h2 i {
  color: #667eea;
  filter: drop-shadow(0 0 10px rgba(102, 126, 234, 0.5));
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

.footer-brand p {
  color: #a0a0a0;
  font-size: 1.1rem;
  line-height: 1.6;
  font-weight: 300;
  letter-spacing: 0.5px;
  position: relative;
  padding-left: 20px;
}

.footer-brand p::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 30px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  border-radius: 2px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.footer-links h3 {
  color: #ffffff;
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 25px;
  position: relative;
  padding-bottom: 10px;
}

.footer-links h3::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 3px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  border-radius: 2px;
}

.footer-links ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-links li {
  margin-bottom: 15px;
  transform: translateX(0);
  transition: all 0.3s ease;
}

.footer-links li:hover {
  transform: translateX(10px);
}

.footer-links a {
  color: #c0c0c0;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 400;
  transition: all 0.3s ease;
  position: relative;
  padding: 8px 15px;
  border-radius: 8px;
  display: inline-block;
}

.footer-links a::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    rgba(102, 126, 234, 0.1),
    rgba(118, 75, 162, 0.1)
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: 8px;
}

.footer-links a:hover::before {
  opacity: 1;
}

.footer-links a:hover {
  color: #667eea;
  text-shadow: 0 0 10px rgba(102, 126, 234, 0.5);
}

.copyright {
  text-align: center;
  color: #808080;
  font-size: 0.9rem;
  padding-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  font-weight: 300;
  letter-spacing: 0.5px;
}

.copyright::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 2px;
  background: linear-gradient(90deg, transparent, #667eea, transparent);
}

/* Responsive Design */
@media (max-width: 768px) {
  .container {
    padding: 40px 15px 20px;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }

  .footer-brand h2 {
    font-size: 2rem;
    justify-content: center;
  }

  .footer-brand p {
    padding-left: 0;
    text-align: center;
  }

  .footer-brand p::before {
    display: none;
  }

  .footer-links {
    align-items: center;
  }

  .footer-links h3::after {
    left: 50%;
    transform: translateX(-50%);
  }

  .footer-links li:hover {
    transform: translateX(0) scale(1.05);
  }
}

/* Extra visual effects */
.site-footer {
  box-shadow: 0 -20px 40px rgba(0, 0, 0, 0.3);
}

.container {
  backdrop-filter: blur(10px);
}

/* required styles */

.leaflet-pane,
.leaflet-tile,
.leaflet-marker-icon,
.leaflet-marker-shadow,
.leaflet-tile-container,
.leaflet-pane > svg,
.leaflet-pane > canvas,
.leaflet-zoom-box,
.leaflet-image-layer,
.leaflet-layer {
	position: absolute;
	left: 0;
	top: 0;
	}
.leaflet-container {
	overflow: hidden;
	}
.leaflet-tile,
.leaflet-marker-icon,
.leaflet-marker-shadow {
	-webkit-user-select: none;
	   -moz-user-select: none;
	        user-select: none;
	  -webkit-user-drag: none;
	}
/* Prevents IE11 from highlighting tiles in blue */
.leaflet-tile::selection {
	background: transparent;
}
/* Safari renders non-retina tile on retina better with this, but Chrome is worse */
.leaflet-safari .leaflet-tile {
	image-rendering: -webkit-optimize-contrast;
	}
/* hack that prevents hw layers "stretching" when loading new tiles */
.leaflet-safari .leaflet-tile-container {
	width: 1600px;
	height: 1600px;
	-webkit-transform-origin: 0 0;
	}
.leaflet-marker-icon,
.leaflet-marker-shadow {
	display: block;
	}
/* .leaflet-container svg: reset svg max-width decleration shipped in Joomla! (joomla.org) 3.x */
/* .leaflet-container img: map is broken in FF if you have max-width: 100% on tiles */
.leaflet-container .leaflet-overlay-pane svg {
	max-width: none !important;
	max-height: none !important;
	}
.leaflet-container .leaflet-marker-pane img,
.leaflet-container .leaflet-shadow-pane img,
.leaflet-container .leaflet-tile-pane img,
.leaflet-container img.leaflet-image-layer,
.leaflet-container .leaflet-tile {
	max-width: none !important;
	max-height: none !important;
	width: auto;
	padding: 0;
	}

.leaflet-container img.leaflet-tile {
	/* See: https://bugs.chromium.org/p/chromium/issues/detail?id=600120 */
	mix-blend-mode: plus-lighter;
}

.leaflet-container.leaflet-touch-zoom {
	-ms-touch-action: pan-x pan-y;
	touch-action: pan-x pan-y;
	}
.leaflet-container.leaflet-touch-drag {
	-ms-touch-action: pinch-zoom;
	/* Fallback for FF which doesn't support pinch-zoom */
	touch-action: none;
	touch-action: pinch-zoom;
}
.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom {
	-ms-touch-action: none;
	touch-action: none;
}
.leaflet-container {
	-webkit-tap-highlight-color: transparent;
}
.leaflet-container a {
	-webkit-tap-highlight-color: rgba(51, 181, 229, 0.4);
}
.leaflet-tile {
	filter: inherit;
	visibility: hidden;
	}
.leaflet-tile-loaded {
	visibility: inherit;
	}
.leaflet-zoom-box {
	width: 0;
	height: 0;
	-moz-box-sizing: border-box;
	     box-sizing: border-box;
	z-index: 800;
	}
/* workaround for https://bugzilla.mozilla.org/show_bug.cgi?id=888319 */
.leaflet-overlay-pane svg {
	-moz-user-select: none;
	}

.leaflet-pane         { z-index: 400; }

.leaflet-tile-pane    { z-index: 200; }
.leaflet-overlay-pane { z-index: 400; }
.leaflet-shadow-pane  { z-index: 500; }
.leaflet-marker-pane  { z-index: 600; }
.leaflet-tooltip-pane   { z-index: 650; }
.leaflet-popup-pane   { z-index: 700; }

.leaflet-map-pane canvas { z-index: 100; }
.leaflet-map-pane svg    { z-index: 200; }

.leaflet-vml-shape {
	width: 1px;
	height: 1px;
	}
.lvml {
	behavior: url(#default#VML);
	display: inline-block;
	position: absolute;
	}


/* control positioning */

.leaflet-control {
	position: relative;
	z-index: 800;
	pointer-events: visiblePainted; /* IE 9-10 doesn't have auto */
	pointer-events: auto;
	}
.leaflet-top,
.leaflet-bottom {
	position: absolute;
	z-index: 1000;
	pointer-events: none;
	}
.leaflet-top {
	top: 0;
	}
.leaflet-right {
	right: 0;
	}
.leaflet-bottom {
	bottom: 0;
	}
.leaflet-left {
	left: 0;
	}
.leaflet-control {
	float: left;
	clear: both;
	}
.leaflet-right .leaflet-control {
	float: right;
	}
.leaflet-top .leaflet-control {
	margin-top: 10px;
	}
.leaflet-bottom .leaflet-control {
	margin-bottom: 10px;
	}
.leaflet-left .leaflet-control {
	margin-left: 10px;
	}
.leaflet-right .leaflet-control {
	margin-right: 10px;
	}


/* zoom and fade animations */

.leaflet-fade-anim .leaflet-popup {
	opacity: 0;
	-webkit-transition: opacity 0.2s linear;
	   -moz-transition: opacity 0.2s linear;
	        transition: opacity 0.2s linear;
	}
.leaflet-fade-anim .leaflet-map-pane .leaflet-popup {
	opacity: 1;
	}
.leaflet-zoom-animated {
	-webkit-transform-origin: 0 0;
	    -ms-transform-origin: 0 0;
	        transform-origin: 0 0;
	}
svg.leaflet-zoom-animated {
	will-change: transform;
}

.leaflet-zoom-anim .leaflet-zoom-animated {
	-webkit-transition: -webkit-transform 0.25s cubic-bezier(0,0,0.25,1);
	   -moz-transition:    -moz-transform 0.25s cubic-bezier(0,0,0.25,1);
	        transition:         transform 0.25s cubic-bezier(0,0,0.25,1);
	}
.leaflet-zoom-anim .leaflet-tile,
.leaflet-pan-anim .leaflet-tile {
	-webkit-transition: none;
	   -moz-transition: none;
	        transition: none;
	}

.leaflet-zoom-anim .leaflet-zoom-hide {
	visibility: hidden;
	}


/* cursors */

.leaflet-interactive {
	cursor: pointer;
	}
.leaflet-grab {
	cursor: -webkit-grab;
	cursor:    -moz-grab;
	cursor:         grab;
	}
.leaflet-crosshair,
.leaflet-crosshair .leaflet-interactive {
	cursor: crosshair;
	}
.leaflet-popup-pane,
.leaflet-control {
	cursor: auto;
	}
.leaflet-dragging .leaflet-grab,
.leaflet-dragging .leaflet-grab .leaflet-interactive,
.leaflet-dragging .leaflet-marker-draggable {
	cursor: move;
	cursor: -webkit-grabbing;
	cursor:    -moz-grabbing;
	cursor:         grabbing;
	}

/* marker & overlays interactivity */
.leaflet-marker-icon,
.leaflet-marker-shadow,
.leaflet-image-layer,
.leaflet-pane > svg path,
.leaflet-tile-container {
	pointer-events: none;
	}

.leaflet-marker-icon.leaflet-interactive,
.leaflet-image-layer.leaflet-interactive,
.leaflet-pane > svg path.leaflet-interactive,
svg.leaflet-image-layer.leaflet-interactive path {
	pointer-events: visiblePainted; /* IE 9-10 doesn't have auto */
	pointer-events: auto;
	}

/* visual tweaks */

.leaflet-container {
	background: #ddd;
	outline-offset: 1px;
	}
.leaflet-container a {
	color: #0078A8;
	}
.leaflet-zoom-box {
	border: 2px dotted #38f;
	background: rgba(255,255,255,0.5);
	}


/* general typography */
.leaflet-container {
	font-family: "Helvetica Neue", Arial, Helvetica, sans-serif;
	font-size: 12px;
	font-size: 0.75rem;
	line-height: 1.5;
	}


/* general toolbar styles */

.leaflet-bar {
	box-shadow: 0 1px 5px rgba(0,0,0,0.65);
	border-radius: 4px;
	}
.leaflet-bar a {
	background-color: #fff;
	border-bottom: 1px solid #ccc;
	width: 26px;
	height: 26px;
	line-height: 26px;
	display: block;
	text-align: center;
	text-decoration: none;
	color: black;
	}
.leaflet-bar a,
.leaflet-control-layers-toggle {
	background-position: 50% 50%;
	background-repeat: no-repeat;
	display: block;
	}
.leaflet-bar a:hover,
.leaflet-bar a:focus {
	background-color: #f4f4f4;
	}
.leaflet-bar a:first-child {
	border-top-left-radius: 4px;
	border-top-right-radius: 4px;
	}
.leaflet-bar a:last-child {
	border-bottom-left-radius: 4px;
	border-bottom-right-radius: 4px;
	border-bottom: none;
	}
.leaflet-bar a.leaflet-disabled {
	cursor: default;
	background-color: #f4f4f4;
	color: #bbb;
	}

.leaflet-touch .leaflet-bar a {
	width: 30px;
	height: 30px;
	line-height: 30px;
	}
.leaflet-touch .leaflet-bar a:first-child {
	border-top-left-radius: 2px;
	border-top-right-radius: 2px;
	}
.leaflet-touch .leaflet-bar a:last-child {
	border-bottom-left-radius: 2px;
	border-bottom-right-radius: 2px;
	}

/* zoom control */

.leaflet-control-zoom-in,
.leaflet-control-zoom-out {
	font: bold 18px 'Lucida Console', Monaco, monospace;
	text-indent: 1px;
	}

.leaflet-touch .leaflet-control-zoom-in, .leaflet-touch .leaflet-control-zoom-out  {
	font-size: 22px;
	}


/* layers control */

.leaflet-control-layers {
	box-shadow: 0 1px 5px rgba(0,0,0,0.4);
	background: #fff;
	border-radius: 5px;
	}
.leaflet-control-layers-toggle {
	background-image: url(416d91365b44e4b4f477.png);
	width: 36px;
	height: 36px;
	}
.leaflet-retina .leaflet-control-layers-toggle {
	background-image: url(8f2c4d11474275fbc161.png);
	background-size: 26px 26px;
	}
.leaflet-touch .leaflet-control-layers-toggle {
	width: 44px;
	height: 44px;
	}
.leaflet-control-layers .leaflet-control-layers-list,
.leaflet-control-layers-expanded .leaflet-control-layers-toggle {
	display: none;
	}
.leaflet-control-layers-expanded .leaflet-control-layers-list {
	display: block;
	position: relative;
	}
.leaflet-control-layers-expanded {
	padding: 6px 10px 6px 6px;
	color: #333;
	background: #fff;
	}
.leaflet-control-layers-scrollbar {
	overflow-y: scroll;
	overflow-x: hidden;
	padding-right: 5px;
	}
.leaflet-control-layers-selector {
	margin-top: 2px;
	position: relative;
	top: 1px;
	}
.leaflet-control-layers label {
	display: block;
	font-size: 13px;
	font-size: 1.08333em;
	}
.leaflet-control-layers-separator {
	height: 0;
	border-top: 1px solid #ddd;
	margin: 5px -10px 5px -6px;
	}

/* Default icon URLs */
.leaflet-default-icon-path { /* used only in path-guessing heuristic, see L.Icon.Default */
	background-image: url(2b3e1faf89f94a483539.png);
	}


/* attribution and scale controls */

.leaflet-container .leaflet-control-attribution {
	background: #fff;
	background: rgba(255, 255, 255, 0.8);
	margin: 0;
	}
.leaflet-control-attribution,
.leaflet-control-scale-line {
	padding: 0 5px;
	color: #333;
	line-height: 1.4;
	}
.leaflet-control-attribution a {
	text-decoration: none;
	}
.leaflet-control-attribution a:hover,
.leaflet-control-attribution a:focus {
	text-decoration: underline;
	}
.leaflet-attribution-flag {
	display: inline !important;
	vertical-align: baseline !important;
	width: 1em;
	height: 0.6669em;
	}
.leaflet-left .leaflet-control-scale {
	margin-left: 5px;
	}
.leaflet-bottom .leaflet-control-scale {
	margin-bottom: 5px;
	}
.leaflet-control-scale-line {
	border: 2px solid #777;
	border-top: none;
	line-height: 1.1;
	padding: 2px 5px 1px;
	white-space: nowrap;
	-moz-box-sizing: border-box;
	     box-sizing: border-box;
	background: rgba(255, 255, 255, 0.8);
	text-shadow: 1px 1px #fff;
	}
.leaflet-control-scale-line:not(:first-child) {
	border-top: 2px solid #777;
	border-bottom: none;
	margin-top: -2px;
	}
.leaflet-control-scale-line:not(:first-child):not(:last-child) {
	border-bottom: 2px solid #777;
	}

.leaflet-touch .leaflet-control-attribution,
.leaflet-touch .leaflet-control-layers,
.leaflet-touch .leaflet-bar {
	box-shadow: none;
	}
.leaflet-touch .leaflet-control-layers,
.leaflet-touch .leaflet-bar {
	border: 2px solid rgba(0,0,0,0.2);
	background-clip: padding-box;
	}


/* popup */

.leaflet-popup {
	position: absolute;
	text-align: center;
	margin-bottom: 20px;
	}
.leaflet-popup-content-wrapper {
	padding: 1px;
	text-align: left;
	border-radius: 12px;
	}
.leaflet-popup-content {
	margin: 13px 24px 13px 20px;
	line-height: 1.3;
	font-size: 13px;
	font-size: 1.08333em;
	min-height: 1px;
	}
.leaflet-popup-content p {
	margin: 17px 0;
	margin: 1.3em 0;
	}
.leaflet-popup-tip-container {
	width: 40px;
	height: 20px;
	position: absolute;
	left: 50%;
	margin-top: -1px;
	margin-left: -20px;
	overflow: hidden;
	pointer-events: none;
	}
.leaflet-popup-tip {
	width: 17px;
	height: 17px;
	padding: 1px;

	margin: -10px auto 0;
	pointer-events: auto;

	-webkit-transform: rotate(45deg);
	   -moz-transform: rotate(45deg);
	    -ms-transform: rotate(45deg);
	        transform: rotate(45deg);
	}
.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
	background: white;
	color: #333;
	box-shadow: 0 3px 14px rgba(0,0,0,0.4);
	}
.leaflet-container a.leaflet-popup-close-button {
	position: absolute;
	top: 0;
	right: 0;
	border: none;
	text-align: center;
	width: 24px;
	height: 24px;
	font: 16px/24px Tahoma, Verdana, sans-serif;
	color: #757575;
	text-decoration: none;
	background: transparent;
	}
.leaflet-container a.leaflet-popup-close-button:hover,
.leaflet-container a.leaflet-popup-close-button:focus {
	color: #585858;
	}
.leaflet-popup-scrolled {
	overflow: auto;
	}

.leaflet-oldie .leaflet-popup-content-wrapper {
	-ms-zoom: 1;
	}
.leaflet-oldie .leaflet-popup-tip {
	width: 24px;
	margin: 0 auto;

	-ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)";
	filter: progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678);
	}

.leaflet-oldie .leaflet-control-zoom,
.leaflet-oldie .leaflet-control-layers,
.leaflet-oldie .leaflet-popup-content-wrapper,
.leaflet-oldie .leaflet-popup-tip {
	border: 1px solid #999;
	}


/* div icon */

.leaflet-div-icon {
	background: #fff;
	border: 1px solid #666;
	}


/* Tooltip */
/* Base styles for the element that has a tooltip */
.leaflet-tooltip {
	position: absolute;
	padding: 6px;
	background-color: #fff;
	border: 1px solid #fff;
	border-radius: 3px;
	color: #222;
	white-space: nowrap;
	-webkit-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
	user-select: none;
	pointer-events: none;
	box-shadow: 0 1px 3px rgba(0,0,0,0.4);
	}
.leaflet-tooltip.leaflet-interactive {
	cursor: pointer;
	pointer-events: auto;
	}
.leaflet-tooltip-top:before,
.leaflet-tooltip-bottom:before,
.leaflet-tooltip-left:before,
.leaflet-tooltip-right:before {
	position: absolute;
	pointer-events: none;
	border: 6px solid transparent;
	background: transparent;
	content: "";
	}

/* Directions */

.leaflet-tooltip-bottom {
	margin-top: 6px;
}
.leaflet-tooltip-top {
	margin-top: -6px;
}
.leaflet-tooltip-bottom:before,
.leaflet-tooltip-top:before {
	left: 50%;
	margin-left: -6px;
	}
.leaflet-tooltip-top:before {
	bottom: 0;
	margin-bottom: -12px;
	border-top-color: #fff;
	}
.leaflet-tooltip-bottom:before {
	top: 0;
	margin-top: -12px;
	margin-left: -6px;
	border-bottom-color: #fff;
	}
.leaflet-tooltip-left {
	margin-left: -6px;
}
.leaflet-tooltip-right {
	margin-left: 6px;
}
.leaflet-tooltip-left:before,
.leaflet-tooltip-right:before {
	top: 50%;
	margin-top: -6px;
	}
.leaflet-tooltip-left:before {
	right: 0;
	margin-right: -12px;
	border-left-color: #fff;
	}
.leaflet-tooltip-right:before {
	left: 0;
	margin-left: -12px;
	border-right-color: #fff;
	}

/* Printing */

@media print {
	/* Prevent printers from removing background-images of controls. */
	.leaflet-control {
		-webkit-print-color-adjust: exact;
		print-color-adjust: exact;
		}
	}

