/*
Theme Name: Wyprwy Theme
Theme URI: https://wyprawywedkarskie.pl
Description: Custom theme dla wypraw wędkarskich z mapą Leaflet.js
Author: Ty + AI
Version: 1.0.4
License: GPL v2 or later
Text Domain: wyprwy-theme
*/

/* CSS Variables */
:root {
  --color-primary: #345A2E;
  --color-primary-dark: #2A4825;
  --color-secondary: #3b82f6;
  --color-text: #111827;
  --color-text-light: #6b7280;
  --color-border: #e5e7eb;
  --color-bg: #ffffff;
  --color-bg-light: #f9fafb;
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

/* HTML height only for map page */
html:has(body.home),
html:has(body.page-template-default) {
  height: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  line-height: 1.6;
  margin: 0;
  padding: 0;
}

/* Body styles for main map page */
body.home,
body.page-template-default {
  height: 100%;
  overflow: hidden;
}

/* Body styles for auth pages - allow scrolling */
body.login-page,
body.register-page,
body.lost-password-page,
body.reset-password-page {
  min-height: 100vh;
  overflow-y: auto;
}

/* WordPress Admin Bar fix */
body.admin-bar {
  padding: 0;
}

body.admin-bar .site-header {
  top: 32px;
}

body.admin-bar .main-container {
  top: 102px;
}

/* Header */

.site-header {
    position: sticky;
    top: 0;
    z-index: 10000;
    background: #d4e8d4;
    height: 70px;
    padding: 12px 20px;
    padding-left: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.header-left {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    width: 540px;
    padding-left: 20px;
}

.logo-svg {
    height: 35px;
    width: auto;
}

.header-search {
    position: relative; /* For dropdown positioning */
    flex-grow: 1; /* Rozciąga wyszukiwarkę na środek */
    max-width: none; /* Pozwól rozciągnąć do maksimum */
}

.search-input-header {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #E2E8F0;
    border-radius: 6px;
    background: #F8FAFC;
    height: 36px;
    box-sizing: border-box;
    line-height: 1;
}

/* Stylizacja przycisków jako równych ikon */
.home-btn, .menu-toggle-btn {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #F1F5F9;
    border-radius: 6px;
    border: none;
    color: #345A2E;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    box-sizing: border-box;
}

.location-btn-header {
  position: absolute;
  right: 7.5rem;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.75rem;
  color: #345A2E;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.location-btn-header svg {
  width: 24px;
  height: 24px;
}

.location-btn-header:hover {
  background: rgba(52, 90, 46, 0.1);
  border-radius: 8px;
}

/* Notifications Button */
.notifications-btn {
  position: absolute;
  right: 4.25rem;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.75rem;
  color: #345A2E;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.notifications-btn svg {
  width: 22px;
  height: 22px;
}

.notifications-btn:hover {
  background: rgba(52, 90, 46, 0.1);
  border-radius: 8px;
}

.notification-badge {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: #dc2626;
  color: white;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 0.15rem 0.35rem;
  border-radius: 10px;
  line-height: 1;
  min-width: 16px;
  text-align: center;
}

/* Location Button Animations */
.location-btn-header:hover svg {
  transform: rotate(180deg);
}

.location-btn-header:active {
  transform: rotate(360deg);
}

.location-btn-header svg {
  transition: transform 0.3s ease;
  transform-origin: center center;
}

.location-btn-header.loading svg {
  animation: spin 1s linear infinite;
  transform-origin: center center;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.location-suggestions-header {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #d1d5db;
  border-top: none;
  border-radius: 0 0 8px 8px;
  max-height: 330px;
  overflow-y: auto;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  z-index: 10003;
  margin-top: 0.5rem;
}

.location-suggestion-item {
  padding: 0.75rem 1rem;
  cursor: pointer;
  border-bottom: 1px solid #f3f4f6;
  transition: background 0.2s;
}

.location-suggestion-item:hover {
  background: #f9fafb;
}

.location-suggestion-item:last-child {
  border-bottom: none;
}

.hamburger-line {
  width: 18px;
  height: 2px;
  background-color: var(--color-primary);
  transition: all 0.3s ease;
  border-radius: 2px;
}

.menu-toggle-btn {
  flex-direction: column;
  gap: 3.5px;
}

.menu-toggle-btn.active .hamburger-line:nth-child(1) {
  transform: translateY(5.5px) rotate(45deg);
}

.menu-toggle-btn.active .hamburger-line:nth-child(2) {
  opacity: 0;
}

.menu-toggle-btn.active .hamburger-line:nth-child(3) {
  transform: translateY(-5.5px) rotate(-45deg);
}

.home-btn:hover,
.menu-toggle-btn:hover {
  background: rgba(52, 90, 46, 0.15);
  transform: scale(1.05);
}

/* WordPress Custom Logo */
.site-logo .custom-logo-link {
  display: inline-block;
  line-height: 0;
}

.site-logo .custom-logo {
  display: block;
  height: 65px;
  width: auto;
  max-width: 100%;
}

/* SVG Logo */
.logo-svg {
  height: 80px;
  width: auto;
  filter: drop-shadow(0 0 1px #345A2E) drop-shadow(0 0 1px #345A2E);
}

.logo-svg path {
  fill: white !important;
}

.logo-svg path[fill="#FEFEFE"],
.logo-svg path[fill="#fefefe"] {
  display: none !important;
}

/* Fallback site title */
.site-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-primary);
}

/* Responsive logo */
@media (max-width: 768px) {
  .site-logo .custom-logo {
    height: 55px;
  }
  
  .logo-svg {
    display: none;
  }
}

/* PNG Logo image (fallback) */
.site-logo .logo-image {
  max-height: 30px !important;
  max-width: 250px !important;
  width: auto !important;
  height: auto !important;
}

/* Custom logo (uploaded via WordPress) */
.site-logo .custom-logo-link {
  display: flex;
  align-items: center;
}

.site-logo .custom-logo {
  max-height: 40px;
  width: auto;
  height: auto;
}

/* Fallback emoji logo */
.logo-icon {
  width: 40px;
  height: 40px;
  background: var(--color-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.site-nav {
  position: fixed;
  top: 70px;
  right: calc(-1 * (100vw - 540px) / 2);
  width: calc((100vw - 540px) / 2);
  height: calc(100vh - 70px);
  background: white;
  z-index: 1002;
  transition: right 0.3s ease;
  box-shadow: -2px 0 12px rgba(0,0,0,0.15);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.site-nav.active {
  right: 0;
}

.menu-header {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 1.5rem;
  border-bottom: 1px solid rgba(0,0,0,0.08);
  background: #f3f4f6;
  gap: 1rem;
}

/* Menu User Section */
.menu-user-section {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 1rem;
  width: 100%;
}

.menu-quick-actions {
  display: flex;
  gap: 0.5rem;
  width: 100%;
  padding-top: 0.75rem;
}

.quick-action-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: #f9fafb;
  border-radius: 8px;
  text-decoration: none;
  color: #374151;
  font-size: 0.875rem;
  transition: all 0.2s;
  white-space: nowrap;
}

.quick-action-link:hover {
  background: #f3f4f6;
  color: #345A2E;
}

.quick-action-link svg {
  flex-shrink: 0;
}

.user-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid #e5e7eb;
  transition: all 0.2s;
  flex-shrink: 0;
}

.user-avatar:hover {
  border-color: #2c4a28;
  transform: scale(1.05);
}

.user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-letter {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
  color: #2c4a28;
  font-size: 20px;
  font-weight: 500;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  letter-spacing: 0.5px;
}

/* User Info - nazwa użytkownika */
.user-info {
  flex: 1;
  display: flex;
  align-items: center;
  padding: 0 0.5rem;
}

.user-name {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-text);
  word-wrap: break-word;
  word-break: break-word;
  line-height: 1.4;
}

.auth-buttons {
  display: flex;
  gap: 0.5rem;
  margin-left: auto;
}

.auth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: #e8f1e8;
  border: 1px solid var(--color-primary);
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--color-primary);
  transition: all 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
  -moz-appearance: none;
  -webkit-appearance: none;
  appearance: none;
  box-sizing: border-box;
  min-height: 36px;
  line-height: 1;
}

.login-btn:hover,
.logout-btn:hover,
.register-btn:hover {
  background: #d4e8d4;
}

.auth-btn svg {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  display: block;
}

.menu-header h3 {
  margin: 0;
  font-size: 1.25rem;
  color: var(--color-text);
  text-align: left;
  flex: 1;
}

.menu-close-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--color-text-light);
  border-radius: 4px;
  transition: all 0.2s;
}

.menu-close-btn:hover {
  background: #e5e7eb;
  color: var(--color-text);
}

.menu-close-btn svg {
  width: 20px;
  height: 20px;
}

.menu-content {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  flex: 1;
  overflow-y: auto;
}

.menu-content a {
  padding: 1rem 1.5rem;
  font-size: 1rem;
  color: var(--color-text);
  text-decoration: none;
  border-bottom: 1px solid var(--color-border);
  transition: background 0.2s;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.menu-content a:hover {
  background: #f9fafb;
}

.menu-logout-btn {
  width: calc(100% - 3rem);
  margin: 0.5rem 1.5rem;
  justify-content: flex-start;
  border: 1px solid transparent !important;
  padding: 0.75rem 1rem;
  text-align: left;
}

/* Menu containers */
#login-form-container {
  width: 100%;
}

#menu-links-container {
  display: flex;
  flex-direction: column;
  width: 100%;
}

/* Menu Login Form */
.menu-login-form {
  padding: 2rem 1.5rem;
  max-width: 400px;
  margin: 0 auto;
}

.menu-login-form h3 {
  margin: 0 0 1.5rem 0;
  font-size: 1.25rem;
  color: var(--color-text);
  text-align: center;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text);
}

.form-group input[type="text"],
.form-group input[type="password"] {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  font-size: 0.9rem;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.form-group input[type="text"]:focus,
.form-group input[type="password"]:focus {
  outline: none;
  border-color: var(--color-primary);
}

.form-remember {
  display: flex;
  align-items: center;
}

.form-remember label {
  display: flex;
  align-items: center;
  margin: 0;
  font-weight: normal;
  cursor: pointer;
}

.form-remember input[type="checkbox"] {
  margin-right: 0.5rem;
}

.form-message {
  padding: 0.75rem;
  margin-bottom: 1rem;
  border-radius: 6px;
  font-size: 0.875rem;
  display: none;
}

.form-message.error {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #dc2626;
  display: block;
}

.form-message.success {
  background: #e8f1e8;
  color: #345A2E;
  border: 1px solid #345A2E;
  display: block;
}

.form-submit-btn {
  width: 100%;
  padding: 0.875rem;
  background: var(--color-primary);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}

.form-submit-btn:hover {
  background: #1a2c18;
}

.form-links {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: center;
}

.form-links a {
  color: var(--color-primary);
  text-decoration: none;
  font-size: 0.875rem;
}

.form-links a:hover {
  text-decoration: underline;
}

.back-to-menu-btn {
  background: none;
  border: 1px solid var(--color-border);
  padding: 0.5rem 1rem;
  border-radius: 6px;
  color: var(--color-text);
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s;
}

.back-to-menu-btn:hover {
  background: #f9fafb;
  border-color: var(--color-primary);
  color: var(--color-primary);
}

/* Menu Footer Legal */
.menu-footer-legal {
  display: none;
  padding: 1rem 1.5rem 2rem;
  border-top: 1px solid rgba(44, 74, 40, 0.2);
  text-align: center;
  background: #f9fafb;
  flex-shrink: 0;
}

.menu-footer-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  font-size: 0.75rem;
  flex-wrap: wrap;
}

.menu-footer-links a {
  color: #2c4a28;
  text-decoration: none;
  padding: 0;
  border: none;
  transition: color 0.2s;
}

.menu-footer-links a:hover {
  color: #1a2c18;
  background: transparent;
}

.menu-footer-links .separator {
  color: rgba(44, 74, 40, 0.4);
}

.menu-footer-copyright {
  margin: 0;
  color: #2c4a28;
  font-size: 0.75rem;
  font-weight: 500;
}

/* Main Container */
.main-container {
  position: fixed;
  top: 70px;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
}

/* Sidebar */
.sidebar {
  width: 540px;
  background: #d4e8d4;
  border-right: 1px solid var(--color-border);
  overflow-y: auto;
  z-index: 100;
  display: flex;
  flex-direction: column;
}

/* Map Container */
.map-container {
  flex: 1;
  position: relative;
  overflow: hidden;
}

#wyprawy-map {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
}

/* Map Controls Container */
.map-controls-container {
  position: absolute;
  bottom: 2rem;
  right: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  z-index: 500;
}

.map-controls-container .location-btn-header {
  position: static !important;
  width: 40px;
  height: 40px;
  background: white !important;
  border: 2px solid rgba(0,0,0,0.2) !important;
  border-radius: 4px !important;
  padding: 0 !important;
  box-shadow: 0 1px 4px rgba(0,0,0,0.3);
  display: flex !important;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  right: auto !important;
  top: auto !important;
  left: auto !important;
  bottom: auto !important;
  transform: translateZ(0);
  backface-visibility: hidden;
}

.map-controls-container .location-btn-header:hover {
  background: white !important;
  box-shadow: 0 1px 8px rgba(0,0,0,0.4);
}

.map-controls-container .location-btn-header svg {
  width: 20px !important;
  height: 20px !important;
  will-change: transform;
}

.map-controls-container .location-btn-header.loading svg {
  animation: spin 1s linear infinite;
}

/* Leaflet attribution fix */
.leaflet-container {
  font-family: var(--font-body);
}

.leaflet-control-attribution {
  background: rgba(255, 255, 255, 0.8) !important;
  font-size: 10px !important;
  padding: 2px 5px !important;
}

/* Sidebar Footer */
.sidebar-footer {
  background: #f9fafb;
  padding: 1.5rem;
  padding-bottom: 9px;
  text-align: center;
  border-top: 1px solid #e5e7eb;
  margin-top: auto;
}

.footer-links-compact {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  font-size: 0.85rem;
}

.footer-links-compact a {
  color: #6b7280;
  text-decoration: none;
  transition: color 0.2s;
}

.footer-links-compact a:hover {
  color: #2c4a28;
}

.footer-links-compact .separator {
  color: #d1d5db;
}

.sidebar-footer p {
  margin: 0.25rem 0;
  color: #6b7280;
  font-size: 0.85rem;
}

/* Main Footer - w sidebarze */
.main-footer {
  position: relative;
  width: 100%;
  background: #d4e8d4;
  padding: 1.5rem;
  margin-top: auto;
  border-top: 1px solid rgba(44, 74, 40, 0.2);
}

.footer-content-grid {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  color: #2c4a28;
}

.footer-section h3 {
  font-size: 0.9rem;
  margin: 0 0 0.5rem 0;
  color: #2c4a28;
}

.footer-section h4 {
  font-size: 0.85rem;
  margin: 0 0 0.4rem 0;
  color: #2c4a28;
  font-weight: 600;
}

.footer-section p {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.5;
  color: #2c4a28;
}

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

.footer-links-list li {
  margin-bottom: 0.375rem;
}

.footer-links-list a {
  color: #2c4a28;
  text-decoration: none;
  font-size: 0.8rem;
  transition: color 0.2s;
}

.footer-links-list a:hover {
  color: #1a2c18;
}

/* Footer Legal Section */
.footer-legal {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(44, 74, 40, 0.2);
  text-align: center;
}

.footer-legal .footer-links-compact {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  font-size: 0.75rem;
  flex-wrap: wrap;
}

.footer-legal .footer-links-compact a {
  color: #2c4a28;
  text-decoration: none;
  transition: color 0.2s;
}

.footer-legal .footer-links-compact a:hover {
  color: #1a2c18;
}

.footer-legal .footer-links-compact .separator {
  color: rgba(44, 74, 40, 0.4);
}

.footer-copyright {
  margin: 0;
  color: #2c4a28;
  font-size: 0.75rem;
  font-weight: 500;
}

/* Map Loading Spinner */
.map-loader {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1000;
  pointer-events: none;
  /* Automatycznie znika po 0.5s */
  animation: fadeOutHide 0.3s ease-in 0.5s forwards !important;
  display: none !important;
}

.spinner {
  width: 60px;
  height: 60px;
  border: 5px solid rgba(255, 255, 255, 0.3);
  border-top: 5px solid var(--color-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

@keyframes fadeOut {
  to {
    opacity: 0;
    visibility: hidden;
  }
}

@keyframes fadeOutHide {
  0% {
    opacity: 1;
  }
  99% {
    opacity: 0;
  }
  100% {
    opacity: 0;
    display: none;
    visibility: hidden;
  }
}

/* Filters Bar in Sidebar */
.filters-bar-sidebar {
  display: none;
}

/* Filters Bar on Map */
.filters-bar-map {
  position: absolute;
  top: 6rem;
  left: 1rem;
  right: 1rem;
  padding: 0.75rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  z-index: 1000;
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  -ms-overflow-style: none;
  scrollbar-width: none;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

.filters-bar-map::-webkit-scrollbar {
  display: none;
}

/* Filters Bar on Map - HIDDEN for test */
.filters-bar {
  display: none;
}

.filter-btn {
  padding: 0.5rem 1rem;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--color-text-light);
  transition: all 0.2s;
  flex-shrink: 0;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  -moz-appearance: none;
  -webkit-appearance: none;
  appearance: none;
  box-sizing: border-box;
  min-height: 36px;
  line-height: 1;
}

.filter-btn svg {
  flex-shrink: 0;
  display: block;
}

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

.filter-btn-reset {
  background: white !important;
  border-color: #d1d5db !important;
  color: #374151 !important;
  transition: none !important;
}

.filter-btn.outlined {
  background: white !important;
  border-color: var(--color-primary) !important;
  border-width: 2px !important;
  color: var(--color-primary) !important;
}

.filter-btn:hover:not(.active) {
  border-color: #9ca3af;
}

.filter-btn-fixed {
  background: white !important;
  box-shadow: none !important;
  border: none !important;
  transition: transform 0.3s ease;
  padding: 0.5rem 1rem !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.filter-btn-fixed:active {
  transform: scale(0.95);
}

.filter-btn-fixed:hover .slider-knob-1 {
  animation: slideKnob1 0.6s ease;
}

.filter-btn-fixed:hover .slider-knob-2 {
  animation: slideKnob2 0.6s ease 0.1s;
}

.filter-btn-fixed:hover .slider-knob-3 {
  animation: slideKnob3 0.6s ease 0.2s;
}

.filter-btn-fixed.active .slider-knob-1,
.filter-btn-fixed.outlined .slider-knob-1 {
  animation: slideKnob1 0.6s ease;
}

.filter-btn-fixed.active .slider-knob-2,
.filter-btn-fixed.outlined .slider-knob-2 {
  animation: slideKnob2 0.6s ease 0.1s;
}

.filter-btn-fixed.active .slider-knob-3,
.filter-btn-fixed.outlined .slider-knob-3 {
  animation: slideKnob3 0.6s ease 0.2s;
}

.filter-btn-fixed.active,
.filter-btn-fixed.outlined {
  background: white !important;
  border: none !important;
}

@keyframes slideKnob1 {
  0% { transform: translateX(0); }
  50% { transform: translateX(10px); }
  100% { transform: translateX(0); }
}

@keyframes slideKnob2 {
  0% { transform: translateX(0); }
  50% { transform: translateX(-10px); }
  100% { transform: translateX(0); }
}

@keyframes slideKnob3 {
  0% { transform: translateX(0); }
  50% { transform: translateX(5px); }
  100% { transform: translateX(0); }
}

/* Force background persistence during animation */
.filter-btn-fixed.active,
.filter-btn-fixed.outlined,
.filter-btn-fixed.active .slider-knob,
.filter-btn-fixed.outlined .slider-knob {
  will-change: transform;
}

/* Advanced Filters Panel */
.advanced-filters-panel {
  position: absolute;
  top: 0;
  left: -50%;
  width: 50%;
  height: 100%;
  background: white;
  z-index: 1001;
  box-shadow: 2px 0 12px rgba(0,0,0,0.15);
  transition: left 0.3s ease;
  overflow-y: auto;
}

.advanced-filters-panel.active {
  left: 0;
}

.advanced-filters-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 1.5rem;
  border-bottom: 1px solid var(--color-border);
  background: #f9fafb;
}

.filters-header-content {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.filters-category-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  border-radius: 8px;
  border: 1px solid var(--color-border);
}

.filters-category-icon svg {
  width: 24px;
  height: 24px;
  color: var(--color-primary);
}

.filters-header-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
}

.advanced-filters-header h3 {
  margin: 0;
  font-size: 1.25rem;
  color: var(--color-text);
  text-align: left;
}

.filters-subtitle {
  margin: 0;
  font-size: 0.875rem;
  color: #6b7280;
  text-align: left;
}

.close-filters-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--color-text-light);
  border-radius: 4px;
  transition: all 0.2s;
}

.close-filters-btn:hover {
  background: #e5e7eb;
  color: var(--color-text);
}

.advanced-filters-content {
  padding: 1.5rem;
}

/* Responsive */
@media (max-width: 1024px) {
  .sidebar {
    width: 400px;
  }
  
  .site-nav {
    right: calc(-1 * (100vw - 400px) / 2);
    width: calc((100vw - 400px) / 2);
  }
}

@media (max-width: 768px) {
  /* Body - no scroll on mobile (only for home/map page) */
  body.home {
    overflow: hidden;
    height: 100%;
  }
  
  /* Allow scrolling on dashboard pages */
  body.dashboard-page {
    overflow: visible !important;
    height: auto !important;
  }
  
  /* Main layout */
  .main-container {
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    bottom: 0;
    margin-top: 0;
    flex-direction: column;
  }
  
  .sidebar {
    display: none;
  }
  
  .map-container {
    height: 100%;
    order: 1;
  }
  
  /* Header mobile */
  .site-header {
    position: fixed;
    height: 60px;
    padding: 10px 16px;
    gap: 10px;
    width: 100%;
  }
  
  .header-left {
    display: none;
    width: auto;
    padding-left: 0;
  }
  
  /* Logo hidden on mobile */
  .site-logo {
    display: none;
  }
  
  /* Search bar - reduce size */
  .header-search {
    flex: 1;
    max-width: none;
  }
  
  .search-input-header {
    padding: 0.625rem 0.75rem;
    font-size: 0.875rem;
    border-radius: 8px;
  }
  
  /* Buttons smaller on mobile */
  .home-btn, .menu-toggle-btn {
    width: 38px;
    height: 38px;
  }
  
  .location-btn-header {
    position: absolute;
    right: 6.25rem;
    padding: 0.5rem;
    background: none !important;
    border: none !important;
  }
  
  .location-btn-header svg {
    width: 24px;
    height: 24px;
  }
  
  .location-suggestions-header {
    max-height: 250px;
  }
  
  /* Menu toggle button */
  .menu-toggle-btn {
    display: flex;
    padding: 0.5rem;
    flex-shrink: 0;
  }
  
  .menu-toggle-btn:hover {
    background: rgba(52, 90, 46, 0.1);
  }
  
  .hamburger-line {
    width: 22px;
    height: 3px;
  }
  
  /* Menu close button */
  .menu-close-btn {
    top: 15px;
    right: 0.75rem;
  }
  
  .menu-close-btn svg {
    width: 28px;
    height: 28px;
  }
  
  /* Slide-in menu */
  .site-nav {
    top: 60px;
    right: -100%;
    width: 100%;
    height: calc(100vh - 60px);
  }
  
  .site-nav.active {
    right: 0;
  }
  
  /* Menu Footer Legal - pokazać na mobile */
  .menu-footer-legal {
    display: block;
    padding-bottom: 5rem;
  }
  
  body.menu-open {
    overflow: hidden;
  }
  
  /* Footer mobile - ukryć */
  .main-footer {
    display: none;
  }
  
  /* Filters on map - mobile optimized */
  .filters-on-map {
    top: 0.5rem !important;
    left: 0.5rem !important;
    right: 0.5rem !important;
    padding: 0.375rem !important;
    gap: 0.5rem !important;
  }
  
  /* Advanced Filters Panel on mobile */
  .advanced-filters-panel {
    width: 100%;
    left: -100%;
  }
  
  .advanced-filters-panel.active {
    left: 0;
  }
  
  .filter-btn {
    padding: 0.5rem 0.875rem;
    font-size: 0.8125rem;
    gap: 0.375rem;
    min-height: 36px;
    line-height: 1;
  }
  
  .filter-btn svg {
    width: 18px;
    height: 18px;
    display: block;
  }
  
  .filter-btn-fixed {
    padding: 0.5rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
  
  .filter-btn-fixed svg {
    width: 20px !important;
    height: 20px !important;
  }
  
  #filters-container {
    gap: 0.5rem !important;
  }
  
  /* Map controls - mobile position */
  .map-container > div[style*="bottom: 2rem"] {
    bottom: 1rem !important;
    right: 0.75rem !important;
    gap: 0.375rem !important;
  }
  
  .map-control-btn {
    width: 44px;
    height: 44px;
    font-size: 1.25rem;
    touch-action: manipulation;
  }
  
  .map-control-btn svg {
    width: 20px;
    height: 20px;
  }
  
  /* Map controls container - raised higher on tablet to not cover attribution */
  .map-controls-container {
    bottom: calc(2rem + 15px) !important;
  }
  
  /* Leaflet popup mobile */
  .custom-popup .leaflet-popup-content {
    min-width: 200px;
  }
  
  .popup-image {
    height: 120px;
  }
  
  .popup-content {
    padding: 0.875rem;
  }
  
  .popup-title {
    font-size: 1rem;
  }
  
  .popup-price {
    font-size: 1.125rem;
  }
  
  .popup-details {
    font-size: 0.8125rem;
  }
  
  .popup-btn {
    padding: 0.625rem;
    font-size: 0.9375rem;
  }
  
  /* WordPress Admin Bar mobile fix */
  body.admin-bar .site-header {
    top: 46px;
  }
  
  body.admin-bar .main-container {
    top: 106px;
  }
  
  body.admin-bar .location-btn-header {
    /* No top override needed - auto-centered by flex */
  }
}

/* Leaflet Popup Custom Styles */
.leaflet-popup-content-wrapper {
  border-radius: 8px;
  padding: 0;
}

.custom-popup .leaflet-popup-content {
  margin: 0;
  min-width: 250px;
}

.popup-image {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 6px 6px 0 0;
}

.popup-content {
  padding: 1rem;
}

.popup-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--color-text);
}

.popup-price {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 0.5rem;
}

.popup-details {
  font-size: 0.9rem;
  color: var(--color-text-light);
  margin-bottom: 1rem;
}

.popup-btn {
  width: 100%;
  padding: 0.75rem;
  background: var(--color-primary);
  color: white;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}

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

/* Utilities */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.btn {
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  transition: all 0.2s;
  border: none;
  cursor: pointer;
}

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

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

.btn-secondary {
  background: white;
  color: var(--color-text-light);
  border: 1px solid var(--color-border);
}

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

/* Mobile-specific improvements */
@media (max-width: 480px) {
  /* Extra small screens - phones in portrait */
  .site-header {
    gap: 10px;
    padding: 8px 12px;
  }
  
  .main-container {
    top: 56px;
  }
  
  .map-container {
    height: 100%;
  }
  
  .search-input-header {
    font-size: 0.8125rem;
    padding: 0.5rem 0.625rem;
  }
  
  /* Buttons even smaller on very small screens */
  .home-btn, .menu-toggle-btn {
    width: 34px;
    height: 34px;
  }
  
  .location-btn-header {
    position: absolute;
    right: 6.25rem;
    padding: 0.5rem;
    background: none !important;
    border: none !important;
  }
  
  .location-btn-header svg {
    width: 22px;
    height: 22px;
  }
  
  .hamburger-line {
    width: 20px;
    height: 2.5px;
  }
  
  .site-nav {
    top: 56px;
    right: -100%;
    width: 100%;
    height: calc(100vh - 56px);
  }
  
  .site-nav.active {
    right: 0;
  }
  
  /* Footer mobile - ukryć */
  .main-footer {
    display: none;
  }
  
  /* Filters extra compact */
  .filters-on-map {
    top: 0.375rem !important;
    left: 0.375rem !important;
    right: 0.375rem !important;
    padding: 0.25rem !important;
  }
  
  .filter-btn {
    padding: 0.4375rem 0.75rem;
    font-size: 0.75rem;
  }
  
  .filter-btn svg {
    width: 16px;
    height: 16px;
  }
  
  .filter-btn-fixed {
    padding: 0.4375rem;
  }
  
  /* Map controls larger for touch */
  .map-control-btn {
    width: 48px;
    height: 48px;
  }
  
  /* Map controls container - raised 15px on mobile */
  .map-controls-container {
    bottom: calc(2rem + 15px) !important;
  }
  
  .popup-title {
    font-size: 0.9375rem;
  }
  
  .popup-price {
    font-size: 1.0625rem;
  }
  
  /* Admin bar */
  body.admin-bar .site-header {
    top: 46px;
  }
  
  body.admin-bar .main-container {
    top: 102px;
  }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
  /* Better touch targets */
  .filter-btn,
  .map-control-btn,
  .menu-toggle-btn,
  .location-btn-header {
    min-width: 44px;
    min-height: 44px;
  }
  
  /* Remove hover effects on touch devices */
  .filter-btn:hover:not(.active),
  .map-control-btn:hover,
  .popup-btn:hover,
  .menu-content a:hover {
    background: inherit;
    color: inherit;
    border-color: inherit;
  }
  
  /* Active states for touch feedback */
  .filter-btn:active:not(.active) {
    background: #f3f4f6;
  }
  
  .map-control-btn:active {
    background: #e5e7eb;
  }
  
  .popup-btn:active {
    opacity: 0.9;
  }
}

/* Landscape mobile optimization */
@media (max-width: 768px) and (orientation: landscape) {
  .site-header {
    height: 50px;
  }
  
  .main-container {
    top: 50px;
  }
  
  .map-container {
    height: 100%;
  }
  
  .site-nav {
    top: 50px;
    height: calc(100vh - 50px);
  }
  
  /* Footer mobile - ukryć */
  .main-footer {
    display: none;
  }
  
  .search-input-header {
    padding: 0.5rem 0.625rem 0.5rem 2.5rem;
  }
  
  .filters-on-map {
    top: 0.375rem !important;
  }
  
  body.admin-bar .site-header {
    top: 0;
  }
  
  body.admin-bar .main-container {
    top: 50px;
  }
}

/* Auth Modal Styles */
.auth-modal {
  display: none;
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow-y: auto;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

/* Login Required Page */
.login-required-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
  padding: 2rem;
}

.login-required-container {
  background: white;
  border-radius: 16px;
  padding: 3rem 2rem;
  max-width: 500px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.login-required-icon {
  display: flex;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.login-required-icon svg {
  animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.login-required-container h1 {
  font-size: 2rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 1rem;
}

.login-required-container p {
  font-size: 1.125rem;
  color: #6b7280;
  margin-bottom: 2rem;
  line-height: 1.6;
}

.login-required-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.login-required-buttons .auth-btn {
  min-width: 160px;
}

@media (max-width: 480px) {
  .login-required-page {
    padding: 1rem;
  }
  
  .login-required-container {
    padding: 2rem 1.5rem;
  }
  
  .login-required-container h1 {
    font-size: 1.5rem;
  }
  
  .login-required-container p {
    font-size: 1rem;
  }
  
  .login-required-buttons {
    flex-direction: column;
  }
  
  .login-required-buttons .auth-btn {
    width: 100%;
  }
}

.auth-modal-content {
  position: relative;
  background-color: white;
  margin: 10% auto;
  padding: 2rem;
  border-radius: 12px;
  width: 90%;
  max-width: 420px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  animation: modalFadeIn 0.3s ease-out;
}

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

.auth-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 2rem;
  font-weight: 300;
  color: #9ca3af;
  cursor: pointer;
  line-height: 1;
  transition: color 0.2s;
}

.auth-modal-close:hover {
  color: #374151;
}

.auth-modal h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #111827;
  margin-bottom: 1.5rem;
  text-align: center;
}

/* Auth form - no scrolling, whole page scrolls */
.auth-form .form-group {
  margin-bottom: 1.25rem;
}

.auth-form label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
  margin-bottom: 0.5rem;
}

.auth-form input[type="text"],
.auth-form input[type="email"],
.auth-form input[type="password"],
.auth-form input[type="tel"] {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.auth-form input[type="text"]:focus,
.auth-form input[type="email"]:focus,
.auth-form input[type="password"]:focus,
.auth-form input[type="tel"]:focus {
  outline: none;
  border-color: #345A2E;
  box-shadow: 0 0 0 3px rgba(52, 90, 46, 0.1);
}

.auth-form .form-group-checkbox {
  margin-bottom: 1.25rem;
}

.auth-form .form-group-checkbox label {
  display: flex;
  align-items: center;
  font-weight: 400;
  cursor: pointer;
}

.auth-form .form-group-checkbox input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  margin-right: 0.5rem;
  cursor: pointer;
}

.auth-form .form-message {
  padding: 0.75rem;
  margin-bottom: 1rem;
  border-radius: 6px;
  font-size: 0.875rem;
  display: none;
}

.auth-form .form-message.success {
  display: block;
  background-color: #e8f1e8;
  color: #345A2E;
  border: 1px solid #345A2E;
}

.auth-form .form-message.error {
  display: block;
  background-color: #fef2f2;
  color: #dc2626;
  border: 1px solid #dc2626;
}

.auth-submit-btn {
  width: 100%;
  padding: 0.75rem;
  background-color: white;
  color: #345A2E;
  border: 1px solid #345A2E;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.auth-submit-btn:hover {
  background-color: #345A2E;
  color: white;
}

.auth-submit-btn:disabled {
  background-color: #f3f4f6;
  border-color: #d1d5db;
  color: #9ca3af;
  cursor: not-allowed;
}

.auth-form .form-links {
  margin-top: 1rem;
  text-align: center;
}

.auth-form .form-links a {
  color: #345A2E;
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.2s;
}

.auth-form .form-links a:hover {
  color: #2A4825;
  text-decoration: underline;
}

/* Mobile responsiveness */
@media (max-width: 480px) {
  .auth-modal-content {
    margin: 20% auto;
    padding: 1.5rem;
    width: 95%;
  }
  
  .auth-modal h2 {
    font-size: 1.25rem;
  }
}

/* Auth Page Styles (dedicated /login and /register pages) */
.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
  padding: 2rem 1rem;
}

.auth-page-container {
  background: white;
  border-radius: 16px;
  padding: 2.5rem;
  max-width: 480px;
  width: 100%;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.auth-page-container.register-container {
  max-width: 600px;
}

.auth-page-logo {
  text-align: center;
  margin-bottom: 2rem;
}

.auth-page-logo img {
  max-width: 200px;
  height: auto;
}

.auth-page-form h1 {
  font-size: 1.875rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 0.5rem;
  text-align: center;
}

.auth-page-subtitle {
  text-align: center;
  color: #6b7280;
  font-size: 0.9375rem;
  margin-bottom: 2rem;
  line-height: 1.5;
}

/* Account Type Selection */
.account-type-group {
  margin-bottom: 2rem;
}

.account-type-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 1rem;
}

.account-type-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.account-type-option {
  cursor: pointer;
}

.account-type-option input[type="radio"] {
  display: none;
}

.account-type-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1.5rem 1rem;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  transition: all 0.2s;
  background: white;
}

.account-type-card svg {
  color: #6b7280;
  margin-bottom: 0.75rem;
  transition: color 0.2s;
}

.account-type-card strong {
  display: block;
  font-size: 1rem;
  color: #111827;
  margin-bottom: 0.25rem;
}

.account-type-card small {
  font-size: 0.8125rem;
  color: #6b7280;
  line-height: 1.4;
}

.account-type-option input[type="radio"]:checked + .account-type-card {
  border-color: #345A2E;
  background: #f0f9f0;
}

.account-type-option input[type="radio"]:checked + .account-type-card svg {
  color: #345A2E;
}

.account-type-option input[type="radio"]:checked + .account-type-card strong {
  color: #345A2E;
}

.account-type-card:hover {
  border-color: #345A2E;
  transform: translateY(-2px);
}

/* Form Notice */
.form-notice {
  display: flex;
  gap: 0.75rem;
  padding: 1rem;
  background: #fef3c7;
  border: 1px solid #fbbf24;
  border-radius: 8px;
  margin-bottom: 1.25rem;
}

.form-notice svg {
  flex-shrink: 0;
  color: #f59e0b;
  margin-top: 0.125rem;
}

.form-notice p {
  font-size: 0.875rem;
  color: #92400e;
  line-height: 1.5;
  margin: 0;
}

/* Auth Page Footer */
.auth-page-footer {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e5e7eb;
  text-align: center;
}

.auth-page-footer p {
  font-size: 0.9375rem;
  color: #6b7280;
  margin: 0;
}

.auth-page-footer a {
  color: #345A2E;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.auth-page-footer a:hover {
  color: #2A4825;
  text-decoration: underline;
}

/* Responsive Auth Page */
@media (max-width: 640px) {
  .auth-page {
    padding: 1rem 0.5rem;
  }
  
  .auth-page-container {
    padding: 2rem 1.5rem;
  }
  
  .auth-page-form h1 {
    font-size: 1.5rem;
  }
  
  .account-type-options {
    grid-template-columns: 1fr;
  }
  
  .account-type-card {
    padding: 1.25rem 1rem;
  }
  
  .auth-modal-content {
    width: 95%;
    padding: 1.5rem;
  }
}

/* Dashboard Styles */
.dashboard-container {
  display: block;
  min-height: 100vh;
  margin-top: 1px;
  padding: 0;
  background: transparent;
  border: none;
}

.dashboard-sidebar {
  width: 280px;
  background: #ffffff;
  border-right: 1px solid #e5e7eb;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.dashboard-logo {
  padding: 1.5rem;
  border-bottom: 1px solid #e5e7eb;
  text-align: center;
}

.dashboard-logo img {
  height: 50px;
  width: auto;
}

.dashboard-nav {
  flex: 1;
  padding: 1rem 0;
  overflow-y: auto;
}

.dashboard-nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.5rem;
  color: #6b7280;
  text-decoration: none;
  transition: all 0.2s;
  font-size: 0.9375rem;
  font-weight: 500;
}

.dashboard-nav-item:hover {
  background: #f9fafb;
  color: #111827;
}

.dashboard-nav-item.active {
  background: #e8f5e9;
  color: #2e7d32;
  border-right: 3px solid #2e7d32;
}

.dashboard-nav-item svg {
  flex-shrink: 0;
}

.dashboard-user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  border-top: 1px solid #e5e7eb;
}

.dashboard-user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: #2e7d32;
  flex-shrink: 0;
}

.dashboard-user-info {
  flex: 1;
  min-width: 0;
}

.dashboard-user-info strong {
  display: block;
  font-size: 0.875rem;
  color: #111827;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dashboard-user-info span {
  display: block;
  font-size: 0.75rem;
  color: #6b7280;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dashboard-logout-btn {
  padding: 0.5rem;
  color: #6b7280;
  transition: color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dashboard-logout-btn:hover {
  color: #dc2626;
}

.dashboard-main {
  width: 100%;
  background: #f9fafb;
  padding: 0;
  min-height: calc(100vh - 70px);
}

.dashboard-section {
  display: none;
  padding: 1.5rem 1rem;
  max-width: 1400px;
  margin: 0 auto;
}

.dashboard-section.active {
  display: block;
}

.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.dashboard-stat-card {
  background: white;
  padding: 1.25rem;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.dashboard-add-card {
  cursor: pointer;
  transition: box-shadow 0.3s ease;
}

.dashboard-add-card:hover {
  box-shadow: 0 4px 12px rgba(46, 125, 50, 0.15);
}

.dashboard-stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dashboard-stat-content {
  flex: 1;
}

.dashboard-stat-label {
  display: block;
  font-size: 0.875rem;
  color: #6b7280;
  margin-bottom: 0.25rem;
}

.dashboard-stat-value {
  display: block;
  font-size: 1.875rem;
  font-weight: 700;
  color: #111827;
}

.dashboard-info-box {
  background: white;
  padding: 1.25rem;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
}

.dashboard-info-box h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: #111827;
  margin-bottom: 1rem;
}

.dashboard-info-list {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.75rem 1.25rem;
}

.dashboard-info-list dt {
  font-weight: 500;
  color: #6b7280;
}

.dashboard-info-list dd {
  color: #111827;
  margin: 0;
}

.dashboard-objects-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.dashboard-object-card {
  background: white;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  padding: 1.25rem;
  display: grid;
  grid-template-columns: 100px 1fr auto;
  gap: 1.25rem;
  align-items: center;
  transition: box-shadow 0.2s;
}

.dashboard-object-card:hover {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.dashboard-object-image {
  width: 100px;
  height: 100px;
  border-radius: 8px;
  overflow: hidden;
  background: #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dashboard-object-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dashboard-object-image .no-image {
  color: #d1d5db;
}

.dashboard-object-content h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: #111827;
  margin-bottom: 0.5rem;
}

.dashboard-object-meta {
  display: flex;
  gap: 1rem;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
}

.object-category {
  padding: 0.25rem 0.625rem;
  background: #e8f5e9;
  color: #2e7d32;
  border-radius: 4px;
  font-weight: 500;
}

.object-date {
  color: #6b7280;
}

.dashboard-object-excerpt {
  color: #6b7280;
  font-size: 0.875rem;
  line-height: 1.5;
}

.dashboard-object-status {
  text-align: right;
}

.status-badge {
  display: inline-block;
  padding: 0.375rem 0.75rem;
  border-radius: 6px;
  font-size: 0.8125rem;
  font-weight: 500;
  margin-bottom: 0.75rem;
}

.status-published {
  background: #d1fae5;
  color: #065f46;
}

.status-pending {
  background: #fef3c7;
  color: #92400e;
}

.status-draft {
  background: #e5e7eb;
  color: #374151;
}

.dashboard-object-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
}

.btn-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: white;
  color: #6b7280;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-icon:hover {
  background: #f3f4f6;
  color: #111827;
}

.dashboard-empty-state {
  text-align: center;
  padding: 4rem 2rem;
  background: white;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
}

.dashboard-empty-state svg {
  color: #d1d5db;
  margin-bottom: 1.5rem;
}

.dashboard-empty-state h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #111827;
  margin-bottom: 0.5rem;
}

.dashboard-empty-state p {
  color: #6b7280;
  margin-bottom: 1.5rem;
}

.btn-primary {
  padding: 0.75rem 1.5rem;
  background: #345A2E;
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-primary:hover {
  background: #2A4825;
}

.add-object-categories {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.5rem;
}

.add-object-category-card {
  background: white;
  padding: 2rem 1.5rem;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  text-align: center;
  transition: all 0.2s;
}

.add-object-category-card:hover {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  border-color: #345A2E;
}

.category-icon {
  margin-bottom: 1rem;
  color: #345A2E;
}

.add-object-category-card h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: #111827;
  margin-bottom: 0.5rem;
}

.add-object-category-card p {
  font-size: 0.875rem;
  color: #6b7280;
  margin-bottom: 1.25rem;
  line-height: 1.5;
}

.btn-secondary {
  padding: 0.625rem 1.25rem;
  background: white;
  color: #345A2E;
  border: 1px solid #345A2E;
  border-radius: 8px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-secondary:hover {
  background: #345A2E;
  color: white;
}

/* Responsive Dashboard */
@media (max-width: 1024px) {
  .dashboard-sidebar {
    width: 240px;
  }
  
  .dashboard-object-card {
    grid-template-columns: 80px 1fr auto;
  }
  
  .dashboard-object-image {
    width: 80px;
    height: 80px;
  }
}

@media (max-width: 768px) {
  .dashboard-container {
    flex-direction: column;
    height: 100vh;
    margin-top: 70px;
  }
  
  .dashboard-main {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  .dashboard-section {
    padding: 1rem;
    padding-bottom: 2rem;
  }
  
  .dashboard-stats {
    grid-template-columns: 1fr;
  }
  
  .dashboard-object-card {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .dashboard-object-image {
    width: 100%;
    height: 200px;
  }
  
  .dashboard-object-status {
    text-align: left;
  }
  
  .add-object-categories {
    grid-template-columns: 1fr;
  }
}

/* Page Template - Strony */
.page-container {
  margin-top: 70px;
  min-height: calc(100vh - 70px);
}

.page-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 2rem;
}

.page-content .entry-content {
  line-height: 1.8;
  color: #374151;
}

.page-content .entry-content h1 {
  font-size: 2.5rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 1.5rem;
  margin-top: 2rem;
}

.page-content .entry-content h2 {
  font-size: 2rem;
  font-weight: 600;
  color: #111827;
  margin-bottom: 1.25rem;
  margin-top: 2rem;
}

.page-content .entry-content h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #111827;
  margin-bottom: 1rem;
  margin-top: 1.5rem;
}

.page-content .entry-content p {
  margin-bottom: 1rem;
}

.page-content .entry-content a {
  color: #2e7d32;
  text-decoration: underline;
}

.page-content .entry-content a:hover {
  color: #1b5e20;
}

.page-content .entry-content ul,
.page-content .entry-content ol {
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}

.page-content .entry-content li {
  margin-bottom: 0.5rem;
}

.page-content .entry-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 1.5rem 0;
}

.page-content .entry-content blockquote {
  border-left: 4px solid #2e7d32;
  padding-left: 1.5rem;
  margin: 1.5rem 0;
  font-style: italic;
  color: #6b7280;
}

@media (max-width: 768px) {
  .page-content {
    padding: 2rem 1rem;
  }
  
  .page-content .entry-content h1 {
    font-size: 2rem;
  }
  
  .page-content .entry-content h2 {
    font-size: 1.5rem;
  }
  
  .page-content .entry-content h3 {
    font-size: 1.25rem;
  }
}

/* ===========================
   USER PINS - Pinezki użytkowników na mapie
   =========================== */

/* User Pin Marker - małe kółko z literą (identyczne jak menu avatar) */
.user-pin-icon {
  background: transparent !important;
  border: none !important;
}

.user-pin-marker {
  width: 40px !important;
  height: 40px !important;
  border-radius: 50% !important;
  overflow: hidden !important;
  border: 3px solid white !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25) !important;
  transition: transform 0.2s, box-shadow 0.2s !important;
  cursor: pointer !important;
  background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.user-pin-marker:hover {
  transform: scale(1.15) !important;
  box-shadow: 0 4px 12px rgba(44, 74, 40, 0.4) !important;
  border-color: #2c4a28 !important;
}

.user-pin-letter {
  width: 100% !important;
  height: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #2c4a28 !important;
  font-size: 18px !important;
  font-weight: 500 !important;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
  letter-spacing: 0.5px !important;
  line-height: 1 !important;
}

/* User Pin Popup */
.user-pin-popup {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  min-width: 200px;
}

.user-pin-popup-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.user-pin-popup-avatar {
  width: 50px !important;
  height: 50px !important;
  border-radius: 50% !important;
  overflow: hidden !important;
  background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%) !important;
  border: 2px solid #2c4a28 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
}

.user-pin-popup-letter {
  color: #2c4a28 !important;
  font-size: 24px !important;
  font-weight: 500 !important;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
  letter-spacing: 0.5px !important;
  line-height: 1 !important;
}

.user-pin-popup-name {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 0.25rem;
}

.user-pin-popup-label {
  display: block;
  font-size: 0.85rem;
  color: #6b7280;
}

.user-pin-popup-description {
  color: #374151;
  font-size: 0.9rem;
  line-height: 1.5;
  margin: 0;
  padding: 0.75rem;
  background: #f9fafb;
  border-radius: 6px;
  border-left: 3px solid #2c4a28;
}

/* Leaflet popup override for user pins */
.leaflet-popup-content-wrapper {
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.leaflet-popup-content {
  margin: 0.75rem;
}

/* User Pin Card in Sidebar - identyczny styl jak menu avatar */
.user-pin-card {
  cursor: pointer;
  transition: all 0.2s;
}

.user-pin-card:hover {
  transform: translateX(4px);
  box-shadow: 0 2px 8px rgba(44, 74, 40, 0.2);
}

.user-pin-avatar-sidebar {
  width: 80px !important;
  height: 80px !important;
  min-width: 80px;
  border-radius: 50% !important;
  background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%) !important;
  border: 2px solid #2c4a28 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: hidden;
}

.user-pin-sidebar-letter {
  color: #2c4a28;
  font-size: 32px;
  font-weight: 500;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  letter-spacing: 0.5px;
}

/* ============================================
   SITE FOOTER
   ============================================ */

.site-footer {
  background: #2c4a28;
  color: #ffffff;
  padding: 3rem 2rem 1.5rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto 2rem;
}

.footer-section h3 {
  color: #ffffff;
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.footer-section h4 {
  color: #ffffff;
  font-size: 1rem;
  margin-bottom: 0.75rem;
  font-weight: 600;
}

.footer-section p {
  color: #d1d5db;
  font-size: 0.875rem;
  line-height: 1.6;
}

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

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: #d1d5db;
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: #ffffff;
}

.footer-bottom {
  text-align: center;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #9ca3af;
  font-size: 0.875rem;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .footer-content {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
}

@media (max-width: 480px) {
  .footer-content {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .site-footer {
    padding: 2rem 1rem 1rem;
  }
}
