/* ============================================
   Субботник Ванино - Основные стили
   ============================================ */

/* CSS Variables */
:root {
  --color-primary: #10b981;
  --color-primary-dark: #059669;
  --color-primary-light: #d1fae5;
  --color-secondary: #3b82f6;
  --color-danger: #ef4444;
  --color-warning: #f59e0b;
  --color-success: #22c55e;
  
  --color-bg: #ffffff;
  --color-bg-alt: #f8fafc;
  --color-bg-dark: #0f172a;
  
  --color-text: #1e293b;
  --color-text-muted: #64748b;
  --color-text-light: #94a3b8;
  
  --border-color: #e2e8f0;
  --border-radius: 12px;
  --border-radius-sm: 8px;
  --border-radius-lg: 16px;
  
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
  
  --transition: all 0.2s ease;
  
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  
  --container-max: 1200px;
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--color-primary-dark);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Container */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 20px;
}

/* ============================================
   Header
   ============================================ */
.header {
  background: var(--color-bg);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
  background: rgba(255,255,255,0.95);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  color: #86c28d;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 20px;
  color: #86c28d;
}

.logo__icon {
  font-size: 28px;
}

.nav {
  display: flex;
  gap: 8px;
}

.nav__link {
  padding: 8px 8px;
  border-radius: var(--border-radius-sm);
  color: #86c28d;
  font-weight: 500;
  transition: var(--transition);
}

.nav__link:hover {
  background: var(--color-bg-alt);
  color: #6aad73;
}

.nav__link--active {
  background: #d1fae5;
  color: #6aad73;
}

.nav__link--external {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.nav__link--external svg {
  opacity: 0.6;
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
  position: relative;
  padding: 80px 0;
  overflow: hidden;
}

.hero__content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero__title {
  font-size: 48px;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 16px;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__subtitle {
  font-size: 22px;
  color: var(--color-text-muted);
  margin-bottom: 32px;
}

.hero__stats {
  display: flex;
  gap: 24px;
  margin-bottom: 32px;
}

.hero__stat {
  display: flex;
  flex-direction: column;
}

.hero__stat-num {
  font-size: 42px;
  font-weight: 800;
  color: var(--color-primary);
}

.hero__stat-label {
  font-size: 14px;
  color: var(--color-text-muted);
}

.hero__image {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero__image-placeholder {
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-xl);
  overflow: visible;
}

.hero__image-placeholder img {
  width: 80%;
  height: 100%;
  object-fit: contain;
  border-radius: 50%;
}

/* Tooltip */
.hero-tooltip {
  position: absolute;
  bottom: -40px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-bg-dark);
  color: white;
  padding: 10px 18px;
  border-radius: var(--border-radius-sm);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  box-shadow: var(--shadow-lg);
  z-index: 10;
}

.hero-tooltip::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 50%;
  width: 12px;
  height: 12px;
  background: var(--color-bg-dark);
  border-radius: 2px;
  transform: translateX(-50%) rotate(45deg);
}

.hero__image {
  position: relative;
}

.hero__image-placeholder:hover .hero-tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(-5px);
}

/* Map Modal */
.map-container {
  width: 100%;
  height: 400px;
  border-radius: var(--border-radius-sm);
  overflow: hidden;
  margin-bottom: 12px;
}

.map-container iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.map-modal__title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 4px;
}

.map-modal__address {
  font-size: 14px;
  color: var(--color-text-muted);
  margin-bottom: 16px;
}

.hero__bg-shape {
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(59, 130, 246, 0.05) 100%);
  z-index: 0;
}

/* ============================================
   Buttons
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--border-radius-sm);
  font-weight: 600;
  font-size: 15px;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
  font-family: var(--font-family);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

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

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

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

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

.btn--lg {
  padding: 16px 32px;
  font-size: 18px;
  border-radius: var(--border-radius);
}

.btn--sm {
  padding: 8px 16px;
  font-size: 13px;
}

.btn--block {
  width: 100%;
}

.btn--disabled {
  background: var(--border-color);
  color: var(--color-text-light);
  cursor: not-allowed;
}

.btn--disabled:hover {
  transform: none;
  box-shadow: none;
}

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

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

/* ============================================
   Section Title
   ============================================ */
.section-title {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 32px;
  text-align: center;
}

.page-title {
  font-size: 36px;
  font-weight: 800;
  margin-bottom: 40px;
}

/* ============================================
   Appeals Section
   ============================================ */
.appeals {
  padding: 60px 0;
  background: var(--color-bg-alt);
}

.appeal-card {
  display: flex;
  gap: 32px;
  background: white;
  border-radius: var(--border-radius-lg);
  padding: 32px;
  box-shadow: var(--shadow);
  margin-bottom: 24px;
}

.appeal-card__image,
.appeal-card__image-placeholder {
  width: 180px;
  height: 180px;
  border-radius: var(--border-radius);
  overflow: hidden;
  flex-shrink: 0;
}

.appeal-card__image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.appeal-card__image-placeholder {
  background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.appeal-card__content {
  flex: 1;
}

.appeal-card__title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 12px;
}

.appeal-card__text {
  color: var(--color-text-muted);
  line-height: 1.7;
}

/* ============================================
   Rules Preview
   ============================================ */
.rules-preview {
  padding: 60px 0;
}

.rules-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 40px;
}

.rule-item {
  text-align: center;
  padding: 32px 24px;
  background: var(--color-bg-alt);
  border-radius: var(--border-radius-lg);
  transition: var(--transition);
}

.rule-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.rule-item__icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.rule-item h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}

.rule-item p {
  color: var(--color-text-muted);
  font-size: 14px;
}

.rules-preview__actions {
  text-align: center;
}

/* ============================================
   Footer
   ============================================ */
.footer {
  background: var(--color-bg-dark);
  color: white;
  padding: 24px 0;
}

.footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.footer__left {
  flex: 1;
}

.footer__copy {
  color: var(--color-text-light);
  margin-bottom: 4px;
}

.footer__dev {
  display: none;
  color: var(--color-text-light);
  font-size: 13px;
  opacity: 0.7;
}

.footer__admin {
  color: var(--color-text-light);
  font-size: 14px;
  white-space: nowrap;
}

.footer__admin:hover {
  color: white;
}

/* ============================================
   Register Page
   ============================================ */
.register-page {
  padding: 40px 0 80px;
}

.register-page__header {
  text-align: center;
  margin-bottom: 40px;
}

.register-page__title {
  font-size: 36px;
  font-weight: 800;
  margin-bottom: 12px;
}

.register-page__subtitle {
  font-size: 18px;
  color: var(--color-text-muted);
}

.register-page__layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 32px;
}

/* Sidebar */
.register-page__sidebar {
  position: sticky;
  top: 100px;
  height: fit-content;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--color-bg-alt);
  border-radius: var(--border-radius);
  padding: 16px;
}

.sidebar-nav__link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--border-radius-sm);
  color: var(--color-text-muted);
  font-weight: 500;
  transition: var(--transition);
}

.sidebar-nav__link:hover {
  background: white;
  color: var(--color-text);
}

.sidebar-nav__link--active {
  background: var(--color-primary-light);
  color: var(--color-primary-dark);
}

.sidebar-nav__link--back {
  color: var(--color-secondary);
}

/* Sites Grid */
.sites-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.site-card {
  background: white;
  border-radius: var(--border-radius-lg);
  padding: 24px;
  box-shadow: var(--shadow);
  border: 2px solid transparent;
  transition: var(--transition);
}

.site-card:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--color-primary-light);
}

.site-card--full {
  opacity: 0.7;
}

.site-card__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.site-card__title {
  font-size: 18px;
  font-weight: 600;
  flex: 1;
}

.site-card__status {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  margin-left: 12px;
}

.site-card__status--available {
  background: var(--color-primary-light);
  color: var(--color-primary-dark);
}

.site-card__status--full {
  background: #fee2e2;
  color: var(--color-danger);
}

.site-card__address {
  color: var(--color-text-muted);
  font-size: 14px;
  margin-bottom: 16px;
}

.site-card__progress {
  margin-bottom: 20px;
}

.site-card__progress-bar {
  height: 8px;
  background: var(--color-bg-alt);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 8px;
}

.site-card__progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-secondary) 100%);
  border-radius: 4px;
  transition: width 0.3s ease;
}

.site-card__progress-text {
  font-size: 13px;
  color: var(--color-text-muted);
}

.site-card__btn {
  margin-top: auto;
}

.site-card__map-btn {
  margin-bottom: 12px;
  font-size: 14px;
}

/* Suggest Card */
.site-card--suggest {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border: 2px dashed var(--color-warning);
}

.site-card__suggest-content {
  text-align: center;
}

.site-card__suggest-icon {
  font-size: 48px;
}

.site-card__suggest-title {
  font-size: 18px;
  font-weight: 600;
}

.site-card__suggest-text {
  color: var(--color-text-muted);
  font-size: 14px;
  margin-bottom: 14px;
}

.sites-grid__empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: var(--color-text-muted);
  font-size: 18px;
}

/* ============================================
   Rules Page
   ============================================ */
.rules-page {
  padding: 40px 0 80px;
}

.rules-page__layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 32px;
}

.rules-page__sidebar {
  position: sticky;
  top: 100px;
  height: fit-content;
}

.content-block {
  margin-bottom: 48px;
}

.content-block h2 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border-color);
}

.rules-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.rules-list__num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--color-primary);
  color: white;
  font-weight: 700;
  flex-shrink: 0;
}

.rules-list li {
  display: flex;
  gap: 16px;
}

.rules-list li div strong {
  display: block;
  font-size: 16px;
  margin-bottom: 4px;
}

.rules-list li div p {
  color: var(--color-text-muted);
  font-size: 14px;
}

.prohibitions-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.prohibitions-list__icon {
  font-size: 24px;
  flex-shrink: 0;
}

.prohibitions-list li {
  display: flex;
  gap: 16px;
}

.prohibitions-list li div strong {
  display: block;
  font-size: 16px;
  margin-bottom: 4px;
  color: var(--color-danger);
}

.prohibitions-list li div p {
  color: var(--color-text-muted);
  font-size: 14px;
}

/* ============================================
   Modal
   ============================================ */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal.active {
  display: flex;
}

.modal__overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
}

.modal__content {
  position: relative;
  background: white;
  border-radius: var(--border-radius-lg);
  padding: 32px;
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  z-index: 1;
}

.modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border: none;
  background: var(--color-bg-alt);
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.modal__close:hover {
  background: var(--border-color);
}

.modal__title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
}

.modal__subtitle {
  color: var(--color-text-muted);
  margin-bottom: 24px;
}

/* ============================================
   Form
   ============================================ */
.form__group {
  margin-bottom: 20px;
}

.form__label {
  display: block;
  font-weight: 500;
  margin-bottom: 8px;
  font-size: 14px;
}

.form__required {
  color: var(--color-danger);
}

.form__input,
.form__select,
.form__textarea {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  font-size: 15px;
  font-family: var(--font-family);
  transition: var(--transition);
  background: white;
}

.form__input:focus,
.form__select:focus,
.form__textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.form__textarea {
  min-height: 100px;
  resize: vertical;
}

.form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form__group--checkbox {
  margin-bottom: 24px;
}

.form__checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-size: 14px;
  color: var(--color-text-muted);
  line-height: 1.4;
}

.form__checkbox {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--color-primary);
  flex-shrink: 0;
  cursor: pointer;
}

/*.form__select {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--color-primary);
  flex-shrink: 0;
  cursor: pointer;
}*/

.form__actions {
  margin-top: 24px;
}

/* ============================================
   Cookie Banner
   ============================================ */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--color-bg-dark);
  color: white;
  padding: 16px 0;
  z-index: 999;
  display: none;
}

.cookie-banner.active {
  display: block;
}

.cookie-banner__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.cookie-banner__text {
  font-size: 14px;
  flex: 1;
}

.cookie-banner__btn {
  padding: 10px 24px;
  background: var(--color-primary);
  color: white;
  border: none;
  border-radius: var(--border-radius-sm);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

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

/* ============================================
   Toast Notifications
   ============================================ */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.toast {
  padding: 16px 24px;
  border-radius: var(--border-radius-sm);
  background: white;
  box-shadow: var(--shadow-lg);
  animation: slideIn 0.3s ease;
  max-width: 400px;
}

.toast--success {
  border-left: 4px solid var(--color-success);
}

.toast--error {
  border-left: 4px solid var(--color-danger);
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 1024px) {
  .hero__content {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  
  .hero__image {
    order: -1;
  }
  
  .hero__image-placeholder {
    width: 200px;
    height: 200px;
  }
  
  .rules-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .header__inner {
    flex-direction: column;
    gap: 12px;
  }
  
  .nav {
    width: 100%;
    justify-content: center;
  }
  
  .hero {
    padding: 40px 0;
  }
  
  .hero__title {
    font-size: 32px;
  }
  
  .hero__subtitle {
    font-size: 18px;
  }
  
  .hero__stat-num {
    font-size: 32px;
  }
  
  .appeal-card {
    flex-direction: column;
    gap: 20px;
  }
  
  .appeal-card__image,
  .appeal-card__image-placeholder {
    width: 100%;
    height: 200px;
  }
  
  .rules-grid {
    grid-template-columns: 1fr;
  }
  
  .register-page__layout,
  .rules-page__layout {
    grid-template-columns: 1fr;
  }
  
  .register-page__sidebar {
    position: static;
  }
  
  .sidebar-nav {
    flex-direction: row;
    flex-wrap: wrap;
  }
  
  .sites-grid {
    grid-template-columns: 1fr;
  }
  
  .footer__inner {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }

  .footer__left {
    text-align: center;
  }
  
  .cookie-banner__inner {
    flex-direction: column;
    text-align: center;
  }
}

  .map-container {
    height: 300px;
  }
}

@media (max-width: 480px) {
  .hero__title {
    font-size: 28px;
  }
  
  .btn--lg {
    padding: 14px 24px;
    font-size: 16px;
  }
  
  .page-title,
  .register-page__title {
    font-size: 28px;
  }
  
  .section-title {
    font-size: 24px;
  }
  
  .modal__content {
    padding: 24px;
  }
}
