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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1600px;
    margin: 0 auto;
}

header {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    text-align: center;
}

h1 {
    color: #2d3748;
    font-size: 32px;
    margin-bottom: 10px;
}

.subtitle {
    color: #718096;
    font-size: 16px;
    line-height: 1.2;     /* было значение по умолчанию, делаем плотнее */
    margin-top: 1px;      /* можно добавить небольшой верхний отступ */
    margin-bottom: 2px;   /* вместо 15px */
}

.stats {
    display: inline-block;
    background: #f7fafc;
    padding: 10px 20px;
    border-radius: 8px;
    color: #4a5568;
    font-weight: 500;
}

/* Поисковая панель */
.search-panel {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.search-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

.search-group label {
    display: block;
    font-weight: 500;
    color: #4a5568;
    margin-bottom: 8px;
    font-size: 14px;
}

.search-group input,
.search-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s;
}

.search-group input:focus,
.search-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.search-actions {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #4a5568;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

button {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #f7fafc;
    color: #4a5568;
}

.btn-secondary:hover {
    background: #e2e8f0;
}

.btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    background: #f7fafc;
    font-size: 18px;
}

.btn-icon:hover {
    background: #e2e8f0;
}

/* Основной контент */
.main-content {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 20px;
    height: calc(100vh - 380px);
    min-height: 600px;
}

.results-panel,
.map-panel {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.panel-header {
    padding: 20px;
    border-bottom: 2px solid #f7fafc;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.panel-header h3 {
    color: #2d3748;
    font-size: 18px;
}

.panel-header span {
    color: #718096;
    font-size: 14px;
}

.map-controls {
    display: flex;
    gap: 8px;
}

.results-list {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
}

.result-item {
    background: #f7fafc;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.result-item:hover {
    background: #edf2f7;
    border-color: #667eea;
    transform: translateX(5px);
}

.result-item.active {
    border-color: #667eea;
    background: #e6f2ff;
}

.result-header {
    display: flex;
    gap: 15px;
    margin-bottom: 10px;
}

.result-photo {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.result-photo.placeholder {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 28px;
}

.result-info {
    flex: 1;
}

.result-name {
    font-weight: 600;
    color: #2d3748;
    font-size: 16px;
    margin-bottom: 5px;
}

.result-dates {
    color: #718096;
    font-size: 13px;
}

.result-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    font-size: 13px;
    color: #4a5568;
}

.result-details span {
    display: flex;
    align-items: center;
    gap: 5px;
}

#map {
    flex: 1;
    min-height: 400px;
}

/* Пагинация */
.pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
    padding: 15px;
    border-top: 2px solid #f7fafc;
    flex-wrap: wrap;
}

.pagination button {
    min-width: 40px;
    padding: 8px 12px;
    background: #f7fafc;
    color: #4a5568;
    font-size: 14px;
}

.pagination button:hover:not(:disabled) {
    background: #e2e8f0;
}

.pagination button.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Модальное окно */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 12px;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    animation: modalSlideIn 0.3s;
}

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

.modal-close {
    position: absolute;
    right: 15px;
    top: 15px;
    font-size: 28px;
    cursor: pointer;
    color: #718096;
}

.modal-close:hover {
    color: #2d3748;
}

/* ФОТО В МОДАЛКЕ: фикс пропорций */
.modal-photo {
    width: 100%;
    max-height: 400px;
    object-fit: contain;
    border-radius: 8px;
    margin-bottom: 20px;
    display: block;
}

/* Остальной контент модалки */
.modal-info {
    display: grid;
    gap: 15px;
}

.modal-info-item {
    display: flex;
    border-bottom: 1px solid #f7fafc;
    padding-bottom: 10px;
}

.modal-info-label {
    font-weight: 600;
    color: #4a5568;
    min-width: 150px;
}

.modal-info-value {
    color: #2d3748;
}

/* Leaflet custom */
.leaflet-popup-content {
    margin: 15px;
    min-width: 200px;
}

.popup-photo {
    width: 100%;
    max-height: 150px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 10px;
}

.popup-name {
    font-weight: 600;
    font-size: 14px;
    color: #2d3748;
    margin-bottom: 5px;
}

.popup-info {
    font-size: 12px;
    color: #718096;
    line-height: 1.5;
}

/* Футер в стиле uolega.ru */
.footer {
    margin-top: 20px;
    background: linear-gradient(135deg, #6150d4 0%, #764ba2 100%);
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.25);
    color: #edf2f7;
    text-align: center;
    padding: 24px 20px 20px;

    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
}
.footer-content {
    max-width: 800px;
    margin: 0 auto;
}

.footer h3 {
    font-size: 20px;
    margin-bottom: 8px;
    font-weight: 700;
}

.footer p {
    font-size: 14px;
    margin-bottom: 4px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin: 1rem 0 0.3rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: #D4AF37;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.6rem 1.3rem;
    border-radius: 30px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(212, 175, 55, 0.4);
    transition: all 0.3s ease;
}

.footer-links a:hover {
    background: rgba(212, 175, 55, 0.18);
    border-color: #D4AF37;
    transform: translateY(-2px);
}

.footer .location {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-top: 0.4rem;
}

/* Адаптив */
@media (max-width: 1024px) {
    .main-content {
        grid-template-columns: 1fr;
        height: auto;
    }
    
    .results-panel {
        max-height: 400px;
    }
    
    #map {
        min-height: 500px;
    }
}

@media (max-width: 768px) {
    .search-row {
        grid-template-columns: 1fr;
    }
    
    h1 {
        font-size: 24px;
    }
    
    .search-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-actions button {
        width: 100%;
    }

    .footer-links {
        flex-direction: column;
        gap: 0.8rem;
    }

    .footer-links a {
        width: 100%;
        max-width: 280px;
        margin: 0 auto;
    }
}
/* Спиннер рядом с кнопкой поиска */
.search-loader {
    display: none;
    margin-left: 12px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid #a0aec0;
    border-top-color: #2b6cb0;
    animation: spin 0.7s linear infinite;
}

.search-loader.active {
    display: inline-block;
}

.btn-primary.loading {
    opacity: 0.6;
    pointer-events: none;
}

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

/* Обёртка для карты и оверлей загрузки */
.map-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}

#map {
    width: 100%;
    height: 100%;
}

/* Полупрозрачный оверлей поверх карты */
.map-loader {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.75);
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    z-index: 500; /* выше маркеров и тайлов */
}

.map-loader.active {
    display: flex;
}

.map-loader-spinner {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 3px solid #a0aec0;
    border-top-color: #2b6cb0;
    animation: spin 0.7s linear infinite;
    margin-bottom: 8px;
}

.map-loader-text {
    font-size: 14px;
    color: #4a5568;
}
.cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: #1a202c;
  color: #edf2f7;
  padding: 12px 16px;
  z-index: 9999;
  box-shadow: 0 -2px 8px rgba(0,0,0,0.3);
  font-size: 14px;
}

.cookie-banner__inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.cookie-banner a {
  color: #90cdf4;
  text-decoration: underline;
}

.cookie-banner .btn-primary {
  white-space: nowrap;
}
.footer-donate {
    margin: 18px 0 8px;
    padding: 10px 12px;
    border-radius: 10px;
    background: #1a202c;
    color: #e2e8f0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    justify-content: center;
}

.footer-donate-text {
    font-size: 13px;
    line-height: 1.4;
    text-align: center;
}

.footer-donate-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border-radius: 999px;
    background: #3182ce;
    color: #f7fafc;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(49, 130, 206, 0.45);
    transition: transform 0.1s ease, box-shadow 0.1s ease, background 0.15s ease;
}

.footer-donate-button:hover {
    background: #2b6cb0;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(49, 130, 206, 0.6);
}

.footer-donate-button:active {
    transform: translateY(0);
    box-shadow: 0 3px 8px rgba(49, 130, 206, 0.5);
}

@media (max-width: 640px) {
    .footer-donate {
        flex-direction: column;
    }
}
.footer-support-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 8px;
    padding: 6px 14px;
    border-radius: 999px;
    background: #ecc94b; /* жёлтая кнопка на тёмном фоне */
    color: #1a202c !important;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.35);
    transition: transform 0.1s ease, box-shadow 0.1s ease, background 0.15s ease;
}

.footer-support-btn:hover {
    background: #f6e05e;
    transform: translateY(-1px);
    box-shadow: 0 5px 12px rgba(0, 0, 0, 0.45);
}

.footer-support-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

@media (max-width: 640px) {
    .footer-links {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 4px;
    }
    .footer-support-btn {
        margin-left: 0;
        margin-top: 6px;
    }
}