/* Основные стили */
:root {
  --primary-color: #3f51b5;
  --secondary-color: #f44336;
  --text-color: #333;
  --light-text: #666;
  --background-color: #f5f5f5;
  --white: #ffffff;
  --border-radius: 8px;
  --box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
  --footer-bg: #2c3e50;
}

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

body {
  font-family: 'Roboto', Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--background-color);
  overflow-x: hidden;
}

/* Кастомный скроллбар */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: rgba(63, 81, 181, 0.1);
}

::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: #303f9f;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--primary-color);
}

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

a:hover {
  color: var(--secondary-color);
}

p {
  margin-bottom: 15px;
}

img {
  max-width: 100%;
  height: auto;
  border-radius: var(--border-radius);
}

button {
  cursor: pointer;
  border: none;
  padding: 10px 20px;
  border-radius: var(--border-radius);
  background-color: var(--primary-color);
  color: var(--white);
  font-weight: 600;
  transition: var(--transition);
}

button:hover {
  background-color: #303f9f;
  transform: translateY(-2px);
}

input, textarea, select {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: var(--border-radius);
  margin-bottom: 20px;
  font-family: inherit;
  transition: var(--transition);
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(63, 81, 181, 0.2);
}

/* Шапка */
.header {
  background-color: var(--white);
  box-shadow: var(--box-shadow);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 15px 0;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 24px;
  font-weight: 700;
  display: flex;
  align-items: center;
}

.logo img {
  width: 40px;
  margin-right: 10px;
}

.nav-links {
  display: flex;
  list-style: none;
}

.nav-links li {
  margin-left: 30px;
}

.nav-links a {
  font-weight: 600;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -5px;
  left: 0;
  background-color: var(--secondary-color);
  transition: var(--transition);
}

.nav-links a:hover::after {
  width: 100%;
}

.mobile-toggle {
  display: none;
  font-size: 24px;
}

/* Hero секция */
.hero {
  background: linear-gradient(135deg, var(--primary-color), #303f9f);
  color: var(--white);
  padding: 100px 0 80px;
  text-align: center;
}

.hero h1 {
  font-size: 48px;
  margin-bottom: 20px;
  color: var(--white);
}

.hero p {
  font-size: 20px;
  max-width: 800px;
  margin: 0 auto 40px;
}

.cta-button {
  padding: 15px 30px;
  font-size: 18px;
  background-color: var(--secondary-color);
}

.cta-button:hover {
  background-color: #d32f2f;
}

/* Блог секция */
.blog-section {
  padding: 80px 0;
}

.section-title {
  text-align: center;
  margin-bottom: 60px;
  position: relative;
}

.section-title::after {
  content: '';
  position: absolute;
  width: 80px;
  height: 3px;
  background-color: var(--secondary-color);
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
}

.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 40px;
}

.post-card {
  background-color: var(--white);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--box-shadow);
  transition: var(--transition);
}

.post-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.post-image {
  height: 200px;
  overflow: hidden;
}

.post-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.post-card:hover .post-image img {
  transform: scale(1.05);
}

.post-content {
  padding: 25px;
}

.post-date {
  color: var(--light-text);
  font-size: 14px;
  margin-bottom: 10px;
}

.post-title {
  font-size: 22px;
  margin-bottom: 15px;
}

.post-excerpt {
  color: var(--light-text);
  margin-bottom: 20px;
}

.read-more {
  font-weight: 600;
  display: inline-flex;
  align-items: center;
}

.read-more svg {
  margin-left: 8px;
  transition: var(--transition);
}

.read-more:hover svg {
  transform: translateX(5px);
}

/* Калькулятор */
.calculator-section {
  background-color: var(--white);
  padding: 80px 0;
}

.calculator-container {
  max-width: 600px;
  margin: 0 auto;
  background-color: #f9f9f9;
  padding: 30px;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
}

.calculator-form label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
}

.calculator-result {
  margin-top: 30px;
  padding: 20px;
  background-color: #e8f5e9;
  border-radius: var(--border-radius);
  text-align: center;
}

.calculator-result h3 {
  color: #2e7d32;
  margin-bottom: 10px;
}

/* О нас */
.about-section {
  padding: 80px 0;
}

.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
}

.about-text {
  font-size: 17px;
}

.about-image {
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--box-shadow);
}

.team-section {
  padding: 60px 0;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 30px;
}

.team-card {
  background-color: var(--white);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--box-shadow);
  text-align: center;
  transition: var(--transition);
}

.team-card:hover {
  transform: translateY(-5px);
}

.team-image {
  width: 100%;
  height: 250px;
}

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

.team-info {
  padding: 20px;
}

.team-info h3 {
  margin-bottom: 5px;
}

.team-position {
  color: var(--light-text);
  margin-bottom: 15px;
  font-style: italic;
}

.team-bio {
  font-size: 14px;
  color: var(--text-color);
  margin-bottom: 15px;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 15px;
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  background-color: var(--primary-color);
  color: var(--white);
  transition: var(--transition);
}

.social-links a:hover {
  background-color: var(--secondary-color);
  transform: translateY(-3px);
}

/* Контакты */
.contact-section {
  padding: 80px 0;
}

.contact-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
}

.contact-info {
  padding: 30px;
  background-color: var(--white);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
}

.contact-item {
  margin-bottom: 30px;
  display: flex;
  align-items: flex-start;
}

.contact-icon {
  font-size: 24px;
  color: var(--primary-color);
  margin-right: 15px;
  flex-shrink: 0;
}

.contact-form {
  padding: 30px;
  background-color: var(--white);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
}

.submit-btn {
  width: 100%;
  padding: 15px;
  font-size: 16px;
}

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

.footer-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
}

.footer-column h3 {
  color: var(--white);
  margin-bottom: 25px;
  position: relative;
}

.footer-column h3::after {
  content: '';
  position: absolute;
  width: 50px;
  height: 2px;
  background-color: var(--secondary-color);
  bottom: -10px;
  left: 0;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: #bdc3c7;
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--white);
  padding-left: 5px;
}

.footer-social {
  display: flex;
  gap: 15px;
  margin-top: 20px;
}

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: var(--white);
  transition: var(--transition);
}

.footer-social a:hover {
  background-color: var(--primary-color);
  transform: translateY(-5px);
}

.copyright {
  text-align: center;
  margin-top: 60px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #bdc3c7;
  font-size: 14px;
}

/* Cookies */
.cookie-banner {
  position: fixed;
  bottom: -100%;
  left: 0;
  right: 0;
  background-color: var(--white);
  padding: 20px 30px;
  box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  z-index: 9999;
  transition: bottom 0.5s ease;
}

.cookie-banner.active {
  bottom: 0;
}

.cookie-text {
  flex: 1;
}

.cookie-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.cookie-btn {
  white-space: nowrap;
  padding: 10px 15px;
  font-size: 14px;
}

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

.cookie-btn.customize {
  background-color: transparent;
  border: 1px solid var(--primary-color);
  color: var(--primary-color);
}

.cookie-btn.reject {
  background-color: transparent;
  color: var(--light-text);
}

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

.modal.active {
  display: flex;
}

.modal-content {
  background-color: var(--white);
  padding: 30px;
  border-radius: var(--border-radius);
  text-align: center;
  max-width: 500px;
  width: 90%;
  box-shadow: var(--box-shadow);
  position: relative;
  animation: modal-slide-up 0.3s ease;
}

@keyframes modal-slide-up {
  from {
    transform: translateY(30px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.modal-title {
  margin-bottom: 15px;
  color: var(--primary-color);
}

.close-modal {
  position: absolute;
  top: 15px;
  right: 15px;
  font-size: 24px;
  cursor: pointer;
  color: var(--light-text);
  transition: var(--transition);
}

.close-modal:hover {
  color: var(--secondary-color);
}

/* Адаптивность */
@media screen and (max-width: 992px) {
  .about-content,
  .contact-container {
    grid-template-columns: 1fr;
  }
  
  .posts-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  }
}

@media screen and (max-width: 768px) {
  .mobile-toggle {
    display: block;
  }
  
  .nav-links {
    position: fixed;
    top: 70px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 70px);
    background-color: var(--white);
    flex-direction: column;
    align-items: center;
    padding-top: 50px;
    transition: var(--transition);
  }
  
  .nav-links.active {
    left: 0;
  }
  
  .nav-links li {
    margin: 15px 0;
  }
  
  .hero h1 {
    font-size: 36px;
  }
  
  .hero p {
    font-size: 18px;
  }
}

@media screen and (max-width: 576px) {
  .cookie-banner {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .cookie-buttons {
    width: 100%;
  }
  
  .hero h1 {
    font-size: 28px;
  }
  
  .team-grid {
    grid-template-columns: 1fr;
  }
}
