/* === Базовые настройки ============================================= */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --primary-color: #1a73e8;
  --primary-hover: #0d47a1;
  --accent-color: #ff5722;
  --accent-hover: #e64a19;
  --text-color: #212121;
  --text-light: #757575;
  --text-muted: #9e9e9e;
  --bg-light: #f8f9fa;
  --bg-white: #ffffff;
  --bg-dark: #2c3e50;
  --border-color: #e0e0e0;
  --shadow-sm: 0 2px 5px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 10px 25px rgba(0,0,0,0.12);
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --transition: all 0.3s ease;
}

body {
  font-family: 'Roboto', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
               Arial, sans-serif;
  line-height: 1.7;
  color: var(--text-color);
  background: var(--bg-light);
  font-size: 16px;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: var(--transition);
  position: relative;
}

a:hover {
  color: var(--accent-color);
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 1rem;
  color: var(--text-color);
}

p {
  margin-bottom: 1.5rem;
  line-height: 1.8;
}

/* === Шапка сайта ==================================================== */
.site-header {
  background: var(--bg-white);
  padding: 20px 0;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.logo {
  display: block;
}

.logo img {
  max-height: 60px;
  transition: var(--transition);
}

.logo:hover img {
  transform: scale(1.05);
}

.logo span {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary-color);
  line-height: 1;
}

.header-contact {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.phone {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text-color);
  display: flex;
  align-items: center;
}

.phone i {
  color: var(--accent-color);
  margin-right: 8px;
}

.working-hours {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* === Главное меню навигации ========================================= */
.main-navigation {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  padding: 10px 0;
  border-top: 1px solid var(--border-color);
}

.nav-menu {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-menu li {
  position: relative;
  margin-right: 30px;
}

.nav-menu a {
  display: block;
  padding: 10px 0;
  font-weight: 500;
  color: var(--text-color);
  font-size: 1.05rem;
}

.nav-menu a:hover,
.nav-menu .current-menu-item a {
  color: var(--accent-color);
}

.nav-menu a:after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  display: block;
  margin-top: 4px;
  right: 0;
  background: var(--accent-color);
  transition: width 0.3s ease;
}

.nav-menu a:hover:after,
.nav-menu .current-menu-item a:after {
  width: 100%;
  left: 0;
  right: unset;
}

.nav-toggle {
  display: none;
  cursor: pointer;
  width: 30px;
  height: 24px;
  position: relative;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 3px;
  margin-bottom: 6px;
  background-color: var(--text-color);
  border-radius: 3px;
  transition: var(--transition);
}

.nav-toggle:hover span {
  background-color: var(--accent-color);
}

/* === Хлебные крошки ================================================= */
.breadcrumbs {
  padding: 20px 0;
  font-size: 0.95rem;
  color: var(--text-light);
  background: rgba(0,0,0,0.02);
  margin-bottom: 40px;
  border-bottom: 1px solid var(--border-color);
}

.breadcrumbs a {
  color: var(--primary-color);
  font-weight: 500;
}

.breadcrumbs a:hover {
  color: var(--accent-color);
  text-decoration: underline;
}

.breadcrumbs span {
  color: var(--text-color);
}

/* === Заголовки страниц ============================================== */
.page-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 2rem;
  text-align: center;
  color: var(--text-color);
  position: relative;
  padding-bottom: 15px;
}

.page-title:after {
  content: '';
  position: absolute;
  width: 80px;
  height: 3px;
  background: var(--accent-color);
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
}

.category-description {
  max-width: 800px;
  margin: 0 auto 40px;
  text-align: center;
  color: var(--text-light);
  font-size: 1.1rem;
  line-height: 1.7;
}

/* === Карточка записи в блоге ======================================== */
.post-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
  margin-bottom: 60px;
}

.post-item {
  background: var(--bg-white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(0,0,0,0.05);
}

.post-item:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.post-featured-image {
  overflow: hidden;
  max-height: 220px;
}

.post-featured-image img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
  transition: var(--transition);
  border-radius: 0;
}

.post-item:hover .post-featured-image img {
  transform: scale(1.1);
}

.post-content {
  padding: 25px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  position: relative;
}

.post-title {
  font-size: 1.35rem;
  margin-bottom: 12px;
  line-height: 1.4;
}

.post-title a {
  color: var(--text-color);
  transition: var(--transition);
}

.post-title a:hover {
  color: var(--primary-color);
}

.post-meta {
  margin-bottom: 15px;
  font-size: 0.9rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
}

.post-meta i {
  color: var(--accent-color);
  margin-right: 6px;
}

.post-categories a {
  color: var(--primary-color);
}

.post-excerpt {
  color: var(--text-light);
  margin-bottom: 20px;
  flex-grow: 1;
  line-height: 1.6;
}

.read-more {
  align-self: flex-start;
  background: var(--primary-color);
  color: white;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
}

.read-more:hover {
  background: var(--accent-color);
  color: white;
  transform: translateY(-2px);
}

.read-more:after {
  content: '\f105';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  margin-left: 6px;
  transition: var(--transition);
}

.read-more:hover:after {
  transform: translateX(3px);
}

/* === Страница-контейнер ============================================= */
.page-content {
  background: var(--bg-white);
  padding: 40px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  margin-bottom: 60px;
}

.page-content h1 {
  font-size: 2.2rem;
  margin-bottom: 25px;
  color: var(--text-color);
  text-align: center;
}

.page-content .post-meta {
  margin-bottom: 25px;
  justify-content: center;
}

.page-content .post-featured-image {
  margin-bottom: 30px;
  border-radius: var(--radius-md);
  overflow: hidden;
  max-height: unset;
}

.page-content .post-featured-image img {
  height: auto;
  max-height: 500px;
  object-fit: cover;
}

.page-content .content {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text-color);
}

.page-content .content h2,
.page-content .content h3 {
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.page-content .content p {
  margin-bottom: 1.5rem;
}

.page-content .content a {
  color: var(--primary-color);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.page-content .content a:hover {
  color: var(--accent-color);
}

.page-content .content ul,
.page-content .content ol {
  margin-bottom: 1.5rem;
  padding-left: 2rem;
}

.page-content .content img {
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
}

.page-content .post-tags {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
  color: var(--text-light);
  font-size: 0.95rem;
}

.page-content .post-tags a {
  display: inline-block;
  margin: 5px;
  padding: 5px 10px;
  background: rgba(0,0,0,0.05);
  border-radius: 20px;
  font-size: 0.85rem;
  color: var(--text-light);
  text-decoration: none;
  transition: var(--transition);
}

.page-content .post-tags a:hover {
  background: var(--primary-color);
  color: white;
}

/* Навигация по записям */
.post-navigation {
  margin-bottom: 60px;
}

.prev-post,
.next-post {
  padding: 15px;
  background: rgba(0,0,0,0.02);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  transition: var(--transition);
}

.prev-post:hover,
.next-post:hover {
  background: rgba(0,0,0,0.05);
}

.prev-post a,
.next-post a {
  color: var(--text-color);
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.prev-post a:hover,
.next-post a:hover {
  color: var(--primary-color);
}

.prev-post i,
.next-post i {
  color: var(--accent-color);
}

/* === Пагинация ===================================================== */
.pagination {
  display: flex;
  justify-content: center;
  margin-bottom: 60px;
  gap: 8px;
}

.page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 15px;
  min-width: 40px;
  height: 40px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-color);
  font-weight: 500;
  background: var(--bg-white);
  transition: var(--transition);
}

.page-numbers.current {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.page-numbers:hover {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
  transform: translateY(-2px);
}

.prev.page-numbers,
.next.page-numbers {
  padding: 10px 15px;
  font-size: 0.9rem;
}

/* === Страница 404 =================================================== */
.error-404 {
  text-align: center;
  padding: 60px 20px;
}

.error-404 h1 {
  font-size: 8rem;
  color: var(--accent-color);
  margin-bottom: 10px;
  line-height: 1;
  text-shadow: 3px 3px 0 rgba(0,0,0,0.1);
}

.error-404 h2 {
  font-size: 2rem;
  margin-bottom: 20px;
  color: var(--text-color);
}

.error-404 p {
  font-size: 1.1rem;
  margin-bottom: 30px;
  color: var(--text-light);
}

.error-actions {
  margin-bottom: 40px;
}

.error-actions .btn-primary {
  display: inline-flex;
  align-items: center;
  background: var(--primary-color);
  color: white;
  padding: 12px 25px;
  border-radius: var(--radius-sm);
  font-weight: 500;
  transition: var(--transition);
}

.error-actions .btn-primary:hover {
  background: var(--accent-color);
  transform: translateY(-3px);
}

.error-actions .btn-primary i {
  margin-right: 8px;
}

.search-form-container {
  max-width: 500px;
  margin: 0 auto 40px;
}

.search-form-container h3 {
  margin-bottom: 15px;
  font-size: 1.3rem;
}

.recent-posts {
  max-width: 500px;
  margin: 0 auto;
}

.recent-posts h3 {
  margin-bottom: 15px;
  font-size: 1.3rem;
}

.recent-posts ul {
  list-style: none;
  padding: 0;
  text-align: left;
}

.recent-posts li {
  padding: 10px 0;
  border-bottom: 1px solid var(--border-color);
}

.recent-posts li:last-child {
  border-bottom: none;
}

.recent-posts a {
  color: var(--text-color);
  transition: var(--transition);
}

.recent-posts a:hover {
  color: var(--primary-color);
  padding-left: 5px;
}

/* === Футер ========================================================== */
.site-footer {
  background: var(--bg-dark);
  color: #ecf0f1;
  padding: 60px 0 20px;
  position: relative;
}

.site-footer:before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(to right, var(--primary-color), var(--accent-color));
}

.footer-widget {
  margin-bottom: 30px;
}

.footer-widget h4 {
  color: white;
  margin-bottom: 25px;
  font-size: 1.3rem;
  position: relative;
  padding-bottom: 12px;
}

.footer-widget h4::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 50px;
  height: 3px;
  background: var(--accent-color);
}

.footer-widget p {
  margin-bottom: 15px;
  color: #bdc3c7;
  font-size: 1rem;
  line-height: 1.7;
}

.footer-contact p {
  margin-bottom: 12px;
  display: flex;
  align-items: flex-start;
}

.footer-contact i {
  margin-right: 12px;
  color: var(--accent-color);
  margin-top: 5px;
}

.footer-links {
  list-style: none;
  padding: 0;
}

.footer-links li {
  margin-bottom: 12px;
  position: relative;
}

.footer-links li:before {
  content: '\f105';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  color: var(--accent-color);
  margin-right: 10px;
  font-size: 0.9rem;
}

.footer-links a {
  color: #bdc3c7;
  font-size: 1rem;
  transition: var(--transition);
}

.footer-links a:hover {
  color: white;
  padding-left: 5px;
}

.social-links {
  display: flex;
  gap: 15px;
  margin-top: 5px;
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
  color: white;
  transition: var(--transition);
}

.social-links a:hover {
  background: var(--accent-color);
  color: white;
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(255,87,34,0.4);
}

.footer-bottom {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.1);
  text-align: center;
  font-size: 0.9rem;
  color: #95a5a6;
}

/* === Адаптивность =================================================== */
@media (max-width: 1199px) {
  .container {
    max-width: 960px;
  }
}

@media (max-width: 991px) {
  .container {
    max-width: 720px;
  }

  body {
    font-size: 15px;
  }
  
  .header-top {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 20px;
  }
  
  .header-contact {
    margin-top: 0;
    align-items: center;
  }
  
  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-white);
    flex-direction: column;
    box-shadow: var(--shadow-md);
    z-index: 100;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    overflow: hidden;
  }
  
  .nav-menu.active {
    display: flex;
  }
  
  .nav-menu li {
    margin-right: 0;
    border-bottom: 1px solid var(--border-color);
  }
  
  .nav-menu a {
    padding: 15px 20px;
    font-size: 1rem;
  }
  
  .nav-menu a:after {
    display: none;
  }
  
  .nav-toggle {
    display: block;
  }
  
  .page-title {
    font-size: 2.2rem;
  }
  
  .post-list {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .page-content {
    padding: 30px;
  }
}

@media (max-width: 767px) {
  .container {
    max-width: 540px;
  }

  body {
    font-size: 14px;
  }
  
  .post-list {
    grid-template-columns: 1fr;
  }
  
  .page-title {
    font-size: 1.8rem;
  }
  
  .page-content h1 {
    font-size: 1.8rem;
  }
  
  .site-footer {
    padding: 40px 0 20px;
  }
  
  .error-404 h1 {
    font-size: 6rem;
  }
  
  .error-404 h2 {
    font-size: 1.8rem;
  }
}

@media (max-width: 575px) {
  .container {
    width: 100%;
    padding: 0 15px;
  }
  
  .header-top {
    margin-bottom: 15px;
  }
  
  .page-content {
    padding: 20px;
  }
  
  .post-content {
    padding: 20px;
  }
  
  .breadcrumbs {
    margin-bottom: 30px;
  }
} 