/* CSS Variables для кольорів */
:root {
  --bg-primary: #f9f7f7;
  --bg-secondary: #ececec;
  --bg-dark: #393939;
  --bg-white: #fff;
  --header-bg: #283428;
  --footer-bg: #283428;
  --accent-color: #688c7c;
  --text-dark: #333;
  --text-light: #fff;
  --text-muted: #666;
  --border-color: #e0e0e0;
  --shadow-light: 0 2px 8px rgba(0, 0, 0, 0.1);
  --shadow-medium: 0 4px 16px rgba(0, 0, 0, 0.15);
  --border-radius: 8px;
}

/* Базові стилі */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Nunito", sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  background-color: var(--bg-primary);
}

/* Хедер */
.navbar {
  background-color: var(--header-bg) !important;
  padding: 1rem 0;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1030;
  box-shadow: var(--shadow-light);
}

.navbar-brand {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-light) !important;
  text-decoration: none;
}

.navbar-nav .nav-link {
  color: var(--text-light) !important;
  font-weight: 500;
  margin: 0 1rem;
  transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover {
  color: var(--accent-color) !important;
}

.navbar-toggler {
  border: none;
  padding: 0.25rem 0.5rem;
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.75%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Відступ для фіксованого хедера */
body {
  padding-top: 80px;
}

/* Hero секція */
.hero-section {
  background: linear-gradient(rgba(40, 52, 40, 0.7), rgba(40, 52, 40, 0.7)), url('./img/hero-bg.webp');
  background-size: cover;
  background-position: center;
  color: var(--text-light);
  padding: 120px 0;
  text-align: center;
}

.hero-section h1 {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.hero-section p {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  opacity: 0.9;
}

.btn-hero {
  background-color: var(--accent-color);
  color: var(--text-light);
  border: none;
  padding: 15px 35px;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: var(--border-radius);
  text-decoration: none;
  display: inline-block;
  transition: all 0.3s ease;
}

.btn-hero:hover {
  background-color: #5a7a6a;
  color: var(--text-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
}

/* Секції */
.section {
  padding: 80px 0;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 3rem;
  color: var(--text-dark);
}

.section-subtitle {
  font-size: 1.2rem;
  text-align: center;
  margin-bottom: 4rem;
  color: var(--text-muted);
}

/* Альтернативні фони секцій */
.section-light {
  background-color: var(--bg-white);
}

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

.section-dark {
  background-color: var(--bg-dark);
  color: var(--text-light);
}

.section-dark .section-title,
.section-dark .section-subtitle {
  color: var(--text-light);
}

.section-accent {
  background-color: var(--accent-color);
  color: var(--text-light);
}

.section-accent .section-title,
.section-accent .section-subtitle {
  color: var(--text-light);
}

/* Картки */
.card {
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-light);
  transition: all 0.3s ease;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-medium);
}

.card-body {
  padding: 2rem;
}

.card-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text-dark);
}

.card-text {
  color: var(--text-muted);
  line-height: 1.6;
}

/* Статистичні картки */
.stat-card {
  background: var(--bg-white);
  padding: 2rem;
  border-radius: var(--border-radius);
  text-align: center;
  box-shadow: var(--shadow-light);
  transition: all 0.3s ease;
}

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

.stat-number {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--accent-color);
  display: block;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 1.1rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Графіки та діаграми */
.chart-container {
  background: var(--bg-white);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-light);
  margin-bottom: 2rem;
}

.chart-title {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text-dark);
}

.chart-placeholder {
  height: 300px;
  border-radius: var(--border-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-style: italic;
}

/* Новинні картки */
.news-card {
  background: var(--bg-white);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow-light);
  transition: all 0.3s ease;
  cursor: pointer;
}

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

.news-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.news-card-body {
  padding: 1.5rem;
}

.news-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.8rem;
  color: var(--text-dark);
}

.news-meta {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.news-excerpt {
  color: var(--text-muted);
  line-height: 1.5;
}

/* Індексні картки */
.index-card {
  background: var(--bg-white);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-light);
  text-align: center;
  transition: all 0.3s ease;
}

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

.index-icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--text-light);
  font-weight: 600;
}

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

.index-value {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
  color: var(--text-dark);
}

.index-change {
  font-size: 1rem;
  font-weight: 600;
}

.positive {
  color: #28a745;
}

.negative {
  color: #dc3545;
}

/* Форма */
.form-section {
  background: var(--bg-white);
  border-radius: var(--border-radius);
  padding: 3rem;
  box-shadow: var(--shadow-light);
}

.form-control {
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 12px 15px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.form-control:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 0.2rem rgba(104, 140, 124, 0.25);
}

.btn-submit {
  background-color: var(--accent-color);
  color: var(--text-light);
  border: none;
  padding: 12px 30px;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: var(--border-radius);
  transition: all 0.3s ease;
}

.btn-submit:hover {
  background-color: #5a7a6a;
  transform: translateY(-2px);
}

/* Контактна інформація */
.contact-info {
  background: var(--bg-secondary);
  border-radius: var(--border-radius);
  padding: 2rem;
}

.contact-item {
  display: flex;
  align-items: center;
  margin-bottom: 1.5rem;
}

.contact-icon {
  width: 40px;
  height: 40px;
  background: var(--accent-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 1rem;
  color: var(--text-light);
}

/* Карта */
.map-container {
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow-light);
}

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

/* Футер */
.footer {
  background-color: var(--footer-bg);
  color: var(--text-light);
  padding: 3rem 0 1rem;
}

.footer h5 {
  color: var(--text-light);
  margin-bottom: 1.5rem;
  font-weight: 600;
}

.footer a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer a:hover {
  color: var(--accent-color);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1.5rem;
  margin-top: 2rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
}

/* Cookie popup */
.cookie-popup {
  position: fixed;
  bottom: 20px;
  left: 20px;
  right: 20px;
  background: var(--bg-white);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-medium);
  padding: 1.5rem;
  z-index: 1040;
  display: none;
}

.cookie-popup.show {
  display: block;
}

.cookie-buttons {
  margin-top: 1rem;
}

.cookie-buttons .btn {
  margin-right: 1rem;
}

/* Scroll to top кнопка */
.scroll-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: var(--accent-color);
  color: var(--text-light);
  border: none;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1000;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-medium);
}

.scroll-top:hover {
  background: #5a7a6a;
  transform: translateY(-3px);
}

.scroll-top.show {
  display: flex;
}

/* Page header для внутрішніх сторінок */
.page-header {
  background: #ececec;
  padding: 160px 0;
  text-align: center;
}

.page-header h1 {
  font-size: 2.8rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 1rem;
}

.page-header p {
  font-size: 1.2rem;
  color: var(--text-muted);
}

/* Адаптивність */
@media (max-width: 768px) {
  .hero-section h1 {
    font-size: 2.5rem;
  }
  
  .hero-section p {
    font-size: 1.1rem;
  }
  
  .section-title {
    font-size: 2rem;
  }
  
  .section {
    padding: 60px 0;
  }
  
  .stat-number {
    font-size: 2.5rem;
  }
  
  .cookie-popup {
    left: 10px;
    right: 10px;
  }
  
  .scroll-top {
    bottom: 20px;
    right: 20px;
  }
  
  .page-header h1 {
    font-size: 2.2rem;
  }
}

@media (max-width: 576px) {
  .hero-section {
    padding: 80px 0;
  }
  
  .hero-section h1 {
    font-size: 2rem;
  }
  
  .section-title {
    font-size: 1.8rem;
  }
  
  .form-section {
    padding: 2rem;
  }
}
