/* Основные стили */
:root {
  --primary-color: #0d47a1;
  --secondary-color: #1976d2;
  --accent-color: #64b5f6;
  --text-color: #333;
  --light-text: #f5f5f5;
  --bg-color: #fff;
  --light-bg: #f5f7fa;
  --dark-bg: #1a1a2e;
  --border-color: #e0e0e0;
  --success-color: #4caf50;
  --warning-color: #ff9800;
  --error-color: #f44336;
  --font-main: 'Roboto', sans-serif;
  --font-heading: 'Playfair Display', serif;
}

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

body {
  font-family: var(--font-main);
  color: var(--text-color);
  background-color: var(--bg-color);
  line-height: 1.6;
  overflow-x: hidden;
}

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

::-webkit-scrollbar-track {
  background: var(--light-bg);
}

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

::-webkit-scrollbar-thumb:hover {
  background: var(--secondary-color);
}

/* Общие элементы */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

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

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

button {
  cursor: pointer;
  border: none;
  border-radius: 4px;
  padding: 10px 20px;
  font-weight: 500;
  transition: all 0.3s ease;
}

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

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

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

.btn-secondary:hover {
  background-color: var(--primary-color);
  color: var(--light-text);
}

.section {
  padding: 80px 0;
}

.section-title {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  margin-bottom: 40px;
  text-align: center;
  color: var(--primary-color);
}

/* Навигация */
.header {
  background-color: var(--bg-color);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
}

.logo img {
  height: 40px;
  width: auto;
}

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

.nav-links a {
  font-size: 1rem;
  font-weight: 500;
  position: relative;
}

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

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

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

/* Hero секция */
.hero {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: var(--light-text);
  padding: 120px 0;
  text-align: center;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: 3.5rem;
  margin-bottom: 20px;
}

.hero-subtitle {
  font-size: 1.2rem;
  margin-bottom: 30px;
  opacity: 0.9;
}

.hero-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
}

/* Секция "О нас" */
.about-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 30px;
  margin-top: 50px;
}

.team-card {
  background-color: var(--light-bg);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
  text-align: center;
  padding-bottom: 20px;
}

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

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

.team-card h3 {
  margin: 15px 0 5px;
  color: var(--primary-color);
}

.team-card p {
  padding: 0 15px;
  margin-bottom: 5px;
}

.social-icons {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 15px;
}

.social-icon {
  color: var(--primary-color);
  font-size: 1.2rem;
  transition: color 0.3s ease;
}

.social-icon:hover {
  color: var(--secondary-color);
}

/* Блог и посты */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
}

.blog-card {
  background-color: var(--light-bg);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.blog-card:hover {
  transform: translateY(-10px);
}

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

.blog-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.blog-card:hover .blog-image img {
  transform: scale(1.1);
}

.blog-content {
  padding: 20px;
}

.blog-title {
  font-size: 1.3rem;
  margin-bottom: 10px;
  font-weight: 600;
  color: var(--primary-color);
}

.blog-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 15px;
  font-size: 0.9rem;
  color: #777;
}

.blog-excerpt {
  margin-bottom: 20px;
}

.read-more {
  display: inline-block;
  font-weight: 500;
  margin-top: 10px;
}

/* Индивидуальный пост */
.post-header {
  text-align: center;
  margin-bottom: 50px;
}

.post-title {
  font-family: var(--font-heading);
  font-size: 3rem;
  margin-bottom: 20px;
}

.post-meta {
  color: #777;
  margin-bottom: 20px;
}

.post-image {
  width: 100%;
  max-height: 500px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 30px;
}

.post-content {
  max-width: 800px;
  margin: 0 auto;
}

.post-content p {
  margin-bottom: 20px;
}

.post-content h2 {
  font-family: var(--font-heading);
  color: var(--primary-color);
  margin: 40px 0 20px;
}

.post-navigation {
  display: flex;
  justify-content: space-between;
  margin-top: 60px;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
}

/* Контактная форма */
.contact-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
}

.contact-info {
  background-color: var(--primary-color);
  color: var(--light-text);
  padding: 40px;
  border-radius: 10px;
}

.contact-info h3 {
  font-size: 1.8rem;
  margin-bottom: 20px;
}

.contact-details {
  margin-top: 30px;
}

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

.contact-icon {
  font-size: 1.2rem;
  color: var(--accent-color);
}

.contact-form {
  background-color: var(--light-bg);
  padding: 40px;
  border-radius: 10px;
}

.contact-form h3 {
  font-size: 1.8rem;
  margin-bottom: 20px;
  color: var(--primary-color);
}

.form-group {
  margin-bottom: 20px;
}

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

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

.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
}

textarea.form-control {
  resize: vertical;
  min-height: 120px;
}

.submit-btn {
  background-color: var(--primary-color);
  color: var(--light-text);
  font-size: 1rem;
  padding: 12px 25px;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.submit-btn:hover {
  background-color: var(--secondary-color);
}

/* Футер */
.footer {
  background-color: var(--dark-bg);
  color: var(--light-text);
  padding: 60px 0 20px;
}

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

.footer-column h3 {
  font-size: 1.2rem;
  margin-bottom: 20px;
  color: var(--accent-color);
}

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

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

.footer-links a {
  color: var(--light-text);
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

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

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

.footer-social a {
  color: var(--light-text);
  font-size: 1.2rem;
  transition: color 0.3s ease;
}

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

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

.footer-bottom p {
  opacity: 0.7;
  font-size: 0.9rem;
}

/* Cookie плашка */
.cookie-banner {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 1200px;
  background-color: var(--light-bg);
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
  padding: 20px;
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.cookie-banner.show {
  opacity: 1;
  visibility: visible;
}

.cookie-text {
  flex: 1;
}

.cookie-text h3 {
  font-size: 1.2rem;
  margin-bottom: 5px;
  color: var(--primary-color);
}

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

.cookie-btn {
  padding: 8px 15px;
  border-radius: 4px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
}

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

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

.cookie-decline {
  background-color: transparent;
  color: #777;
}

/* Модальное окно */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.modal-overlay.show {
  opacity: 1;
  visibility: visible;
}

.modal {
  background-color: var(--bg-color);
  padding: 30px;
  border-radius: 10px;
  max-width: 500px;
  width: 90%;
  text-align: center;
  transform: translateY(-50px);
  transition: transform 0.3s ease;
}

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

.modal-icon {
  font-size: 3rem;
  color: var(--success-color);
  margin-bottom: 20px;
}

.modal h3 {
  font-size: 1.5rem;
  margin-bottom: 15px;
  color: var(--primary-color);
}

.modal p {
  margin-bottom: 20px;
}

.modal-close {
  background-color: var(--primary-color);
  color: white;
  padding: 10px 20px;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

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

/* Адаптивность */
@media (max-width: 992px) {
  .section-title {
    font-size: 2rem;
  }
  
  .hero-title {
    font-size: 2.5rem;
  }
  
  .contact-section {
    grid-template-columns: 1fr;
  }
  
  .post-title {
    font-size: 2.5rem;
  }
}

@media (max-width: 768px) {
  .mobile-toggle {
    display: block;
  }
  
  .nav-links {
    position: absolute;
    top: 80px;
    left: 0;
    right: 0;
    background-color: var(--bg-color);
    flex-direction: column;
    align-items: center;
    padding: 20px 0;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
    clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
    transition: clip-path 0.4s ease;
  }
  
  .nav-links.active {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
  }
  
  .hero-buttons {
    flex-direction: column;
    align-items: center;
    gap: 15px;
  }
  
  .section {
    padding: 60px 0;
  }
}

@media (max-width: 576px) {
  .hero-title {
    font-size: 2rem;
  }
  
  .post-title {
    font-size: 2rem;
  }
  
  .cookie-banner {
    flex-direction: column;
    text-align: center;
  }
  
  .cookie-text {
    margin-bottom: 15px;
  }
  
  .cookie-actions {
    justify-content: center;
    width: 100%;
  }
}
