/* ==========================================================================
   СТ "ЛІДНЕ" — Modern Design System & Stylesheet
   ========================================================================== */

:root {
  /* Color Palette */
  --primary-dark: #1b4332;
  --primary-medium: #2d6a4f;
  --primary-accent: #40916c;
  --primary-light: #74c69d;
  --primary-soft: #d8f3dc;
  
  --amber-accent: #e9c46a;
  --amber-dark: #f4a261;
  --danger-color: #e76f51;
  --success-color: #2a9d8f;

  --bg-main: #f8f9fa;
  --bg-card: #ffffff;
  --bg-alt: #edf2f4;
  
  --text-dark: #2b2d42;
  --text-muted: #6c757d;
  --text-light: #ffffff;
  
  --border-color: #e9ecef;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-md: 0 6px 18px rgba(0,0,0,0.08);
  --shadow-lg: 0 12px 32px rgba(0,0,0,0.12);
  
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
}

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

body {
  font-family: var(--font-family);
  background-color: var(--bg-main);
  color: var(--text-dark);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

p, h1, h2, h3, h4, li {
  text-wrap: pretty;
}

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

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

/* Layout Container */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Navigation & Header */
.top-bar {
  background: var(--primary-dark);
  color: rgba(255,255,255,0.85);
  font-size: 0.85rem;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  overflow: hidden;
}

.ticker-wrap {
  width: 100%;
  overflow: hidden;
  white-space: nowrap;
  display: flex;
}

.ticker-content {
  display: inline-flex;
  white-space: nowrap;
  animation: ticker 32s linear infinite;
}

.ticker-wrap:hover .ticker-content {
  animation-play-state: paused;
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  color: rgba(255, 255, 255, 0.95);
  font-size: 0.88rem;
  font-weight: 500;
  padding-right: 60px;
}

.ticker-item strong {
  color: var(--amber-accent);
  font-weight: 700;
}

.ticker-highlight {
  display: inline-block;
  color: #ffd166;
  font-weight: 800;
  letter-spacing: 0.5px;
  animation: pulseGlow 2s ease-in-out infinite alternate;
  margin: 0 4px;
}

@keyframes pulseGlow {
  0% {
    transform: scale(1);
    text-shadow: 0 0 4px rgba(255, 209, 102, 0.4);
    opacity: 0.85;
  }
  50% {
    transform: scale(1.08);
    text-shadow: 0 0 10px rgba(255, 209, 102, 0.95), 0 0 16px rgba(233, 196, 106, 0.7);
    opacity: 1;
  }
  100% {
    transform: scale(1);
    text-shadow: 0 0 4px rgba(255, 209, 102, 0.4);
    opacity: 0.85;
  }
}

@keyframes ticker {
  0% {
    transform: translate3d(0, 0, 0);
  }
  100% {
    transform: translate3d(-50%, 0, 0);
  }
}

.main-header {
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 76px;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-dark);
  color: white !important;
  padding: 8px 18px;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.2;
  text-decoration: none;
  letter-spacing: 0.02em;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(27, 67, 50, 0.25);
  transition: transform var(--transition-fast), background var(--transition-fast);
}

.brand-logo:hover {
  background: var(--primary-medium);
  transform: translateY(-1px);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  flex: 1;
  margin-left: 24px;
}

#nav-auth-container {
  margin-left: auto;
}

/* Language Switcher */
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: #f0f7f3;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  padding: 3px 6px;
  margin-left: 8px;
}

.lang-btn {
  background: transparent;
  border: none;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  padding: 3px 7px;
  border-radius: var(--radius-full);
  transition: all var(--transition-fast);
}

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

.lang-btn:hover:not(.active) {
  color: var(--primary-dark);
}

.lang-sep {
  color: #ccc;
  font-size: 0.72rem;
  user-select: none;
}

/* Language Display Modes */
body.lang-mode-ua .lang-ru {
  display: none !important;
}

body.lang-mode-ru .lang-ua {
  display: none !important;
}

.nav-link {
  padding: 8px 9px;
  border-radius: var(--radius-sm);
  color: var(--text-dark);
  font-weight: 500;
  font-size: 0.92rem;
  transition: all var(--transition-fast);
}

.nav-link:hover, .nav-link.active {
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.auth-btn {
  background: var(--primary-dark);
  color: white !important;
  padding: 8px 18px;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  white-space: nowrap;
  letter-spacing: 0.02em;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(27, 67, 50, 0.25);
  transition: transform var(--transition-fast), background var(--transition-fast);
}

.auth-btn:hover {
  background: var(--primary-medium);
  transform: translateY(-1px);
}

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-dark);
  cursor: pointer;
}

/* Hero Section */
.hero-section {
  position: relative;
  background: linear-gradient(rgba(27, 67, 50, 0.85), rgba(45, 106, 79, 0.75)), url('../main.jpg') center/cover no-repeat;
  color: white;
  padding: 42px 0 75px;
  text-align: center;
}

.hero-title {
  font-size: 2.6rem;
  font-weight: 800;
  margin-bottom: 16px;
  line-height: 1.25;
}

.hero-subtitle {
  font-size: 1.15rem;
  max-width: 720px;
  margin: 0 auto 32px;
  opacity: 0.92;
  font-weight: 400;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
}

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

.btn-primary:hover {
  background: #95d5b2;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.15);
  color: white;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}

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

.btn-dark:hover {
  background: #081c15;
}

.btn-amber {
  background: var(--amber-accent);
  color: #4a3200;
  border: 1.5px solid #b78a28;
}

.btn-amber:hover {
  background: var(--amber-dark);
  color: white;
  border-color: #a46d17;
}

.btn-sm {
  padding: 6px 14px;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
}

/* Quick Features Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-top: -45px;
  position: relative;
  z-index: 10;
  margin-bottom: 50px;
}

.feature-card {
  background: var(--bg-card);
  padding: 24px 20px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
  text-align: center;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

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

.feature-icon {
  width: 56px;
  height: 56px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin: 0 auto 16px;
}

.feature-card h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
  color: var(--primary-dark);
}

.feature-card p {
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* Sections */
.section {
  padding: 50px 0;
}

.section-alt {
  background-color: var(--bg-alt);
}

.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 40px;
}

.section-tag {
  display: inline-block;
  background: var(--primary-soft);
  color: var(--primary-dark);
  border: 1px solid var(--primary-medium);
  padding: 4px 14px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.section-title {
  font-size: 1.8rem;
  color: var(--primary-dark);
  font-weight: 800;
  margin-bottom: 10px;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 1rem;
}

/* Cards & Layout Grid */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  padding: 24px;
  display: flex;
  flex-direction: column;
  transition: all var(--transition-fast);
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 14px;
}

.card-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary-dark);
}

.card-badge {
  background: var(--primary-soft);
  color: var(--primary-dark);
  border: 1px solid var(--primary-medium);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
}

/* Tables */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
}

.custom-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.custom-table th {
  background: var(--primary-dark);
  color: white;
  padding: 12px 16px;
  font-size: 0.88rem;
  font-weight: 600;
}

.custom-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.9rem;
}

.custom-table tbody tr:last-child td {
  border-bottom: none;
}

.custom-table tbody tr:hover {
  background: var(--primary-soft);
}

/* Badges */
.badge-status {
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 600;
  display: inline-block;
}

.badge-paid, .badge-active {
  background: #e8f5e9;
  color: #2e7d32;
  border: 1px solid #2e7d32;
}

.badge-unpaid, .badge-danger {
  background: #ffebee;
  color: #c62828;
  border: 1px solid #c62828;
}

.badge-warning {
  background: #fff8e1;
  color: #b76e00;
  border: 1px solid #b76e00;
}

.badge-role {
  background: var(--primary-dark);
  color: white;
  border: 1px solid var(--primary-dark);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
}

/* Forms & Inputs */
.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-weight: 600;
  font-size: 0.88rem;
  margin-bottom: 6px;
  color: var(--text-dark);
}

.form-control {
  width: 100%;
  padding: 10px 14px;
  font-size: 0.92rem;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: white;
  transition: border-color var(--transition-fast);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-medium);
  box-shadow: 0 0 0 3px rgba(45, 106, 79, 0.15);
}

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-box {
  background: white;
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 520px;
  padding: 28px;
  box-shadow: var(--shadow-lg);
  transform: translateY(20px);
  transition: transform var(--transition-normal);
  max-height: 90vh;
  overflow-y: auto;
}

.modal-overlay.active .modal-box {
  transform: translateY(0);
}

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

.modal-title {
  font-size: 1.3rem;
  color: var(--primary-dark);
  font-weight: 700;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  color: var(--text-muted);
}

/* QR Code & Invoice styling */
.qr-card {
  text-align: center;
  background: white;
  padding: 24px;
  border-radius: var(--radius-md);
  border: 1px dashed var(--primary-light);
}

.qr-placeholder {
  width: 180px;
  height: 180px;
  margin: 16px auto;
  background: #f0f4f1;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Footer */
.main-footer {
  background: var(--primary-dark);
  color: white;
  margin-top: auto;
  padding: 50px 0 20px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 32px;
  margin-bottom: 32px;
}

.footer-col h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--primary-light);
}

.footer-col p, .footer-col li {
  font-size: 0.88rem;
  opacity: 0.85;
  margin-bottom: 8px;
  list-style: none;
}

.footer-col a {
  color: rgba(255,255,255,0.85);
}

.footer-col a:hover {
  color: white;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 20px;
  text-align: center;
  font-size: 0.82rem;
  opacity: 0.75;
}

/* Responsive Mobile Rules */
@media (max-width: 868px) {
  .nav-menu {
    position: fixed;
    top: 76px;
    left: 0;
    width: 100%;
    background: white;
    flex-direction: column;
    padding: 20px;
    box-shadow: var(--shadow-lg);
    display: none;
  }

  .nav-menu.active {
    display: flex;
  }

  .mobile-toggle {
    display: block;
  }

  /* Show lang-switch properly inside mobile dropdown */
  .nav-menu .lang-switch {
    margin-left: 0;
  }

  .nav-menu li:last-child {
    width: 100%;
    display: flex;
    justify-content: center;
    padding-top: 8px;
    border-top: 1px solid var(--border-color);
    margin-top: 4px;
  }

  .hero-title {
    font-size: 1.8rem;
  }

  .top-bar-info {
    font-size: 0.75rem;
    gap: 10px;
  }
}

/* Custom Appeal & Voting Styles */
.quote-box {
  background: #f4fbf7;
  border-left: 5px solid var(--primary-medium);
  border-radius: var(--radius-sm);
  padding: 18px 22px;
  margin: 20px 0;
  font-style: italic;
  color: var(--primary-dark);
  font-size: 0.98rem;
}

.fact-card {
  background: white;
  border-radius: var(--radius-md);
  padding: 22px;
  border-top: 4px solid var(--primary-medium);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast);
}

.fact-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.fact-card.danger {
  border-top-color: var(--danger-color);
}

.fact-card.warning {
  border-top-color: var(--amber-dark);
}

.fact-card.success {
  border-top-color: var(--success-color);
}

.fact-icon {
  font-size: 1.8rem;
  margin-bottom: 10px;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin: 30px 0;
}

.step-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  position: relative;
}

.step-badge {
  display: inline-block;
  background: var(--primary-dark);
  color: white;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 12px;
}

.step-badge.highlight {
  background: var(--amber-dark);
  color: white;
}

.step-card h3 {
  color: var(--primary-dark);
  font-size: 1.25rem;
  margin-bottom: 10px;
}

.action-cta-box {
  background: linear-gradient(135deg, var(--primary-dark), #143628);
  color: white;
  border-radius: var(--radius-lg);
  padding: 40px 30px;
  text-align: center;
  box-shadow: var(--shadow-lg);
  margin-top: 40px;
}

