/*
Theme Name: PeakTribe
Theme URI: https://trailentreelles.com
Author: PeakTribe Team
Author URI: https://trailentreelles.com
Description: Женское сообщество по трейлраннингу: совместные забеги, треккинг-стажи и выезды в горы. Делимся опытом, маршрутами и мотивацией, тестируем экипировку для бега по пересечённой местности и поддерживаем друг друга на пути к новым вершинам.
Version: 1.1
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: peaktribe
Tags: trail-running, women, community, responsive, blog
*/

/* ========================================
   CSS VARIABLES
======================================== */
:root {
  /* Основные цвета */
  --trail-dust: #D5CEC5;
  --trail-dust-light: #E8E3DC;
  --trail-dust-dark: #B8B0A5;
  --alpine-berry: #8B4D5C;
  --alpine-berry-hover: #A35A6B;
  --alpine-berry-light: rgba(139, 77, 92, 0.12);
  --forest-shade: #4A6B5A;
  --forest-shade-light: rgba(74, 107, 90, 0.15);
  --summit-gold: #C4956A;
  --summit-gold-light: rgba(196, 149, 106, 0.2);
  --slate: #3A3632;
  --slate-light: #5A5550;
  --slate-muted: #7A7570;

  /* Фон */
  --bg-primary: #E8E3DC;
  --bg-secondary: #D5CEC5;
  --bg-card: #F5F0EB;
  --bg-dark: #3A3632;
  --bg-footer: #2E2A27;

  /* Текст */
  --text-primary: #3A3632;
  --text-secondary: #5A5550;
  --text-muted: #7A7570;
  --text-on-dark: #E8E3DC;
  --text-on-berry: #F5F0EB;

  /* Типографика */
  --font-heading: 'Unbounded', sans-serif;
  --font-body: 'Nunito Sans', sans-serif;
  --font-accent: 'DM Mono', monospace;

  /* Размеры */
  --container-max: 1240px;
  --container-narrow: 800px;
  --gap: 24px;
  --gap-lg: 48px;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 30px;
  --radius-btn: 6px 6px 20px 6px;

  /* Тени */
  --shadow-card: 0 4px 20px rgba(58, 54, 50, 0.08);
  --shadow-card-hover: 0 8px 32px rgba(58, 54, 50, 0.14);
  --shadow-btn: 0 4px 14px rgba(139, 77, 92, 0.25);
  --shadow-btn-hover: 0 8px 24px rgba(139, 77, 92, 0.35);
}

/* ========================================
   RESET & BASE
======================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

/* Зернистая текстура */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}

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

a:hover {
  color: var(--alpine-berry-hover);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul, ol {
  list-style: none;
}

/* ========================================
   TYPOGRAPHY - Топографическая
======================================== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--text-primary);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  background: linear-gradient(135deg, var(--slate) 0%, var(--alpine-berry) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 800;
  position: relative;
}

h2::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--alpine-berry), var(--summit-gold));
  margin-top: 12px;
  border-radius: 2px;
}

h3 {
  font-size: clamp(1.2rem, 2.5vw, 1.6rem);
  font-weight: 700;
}

h4 {
  font-size: 1.1rem;
  font-weight: 700;
}

p {
  margin-bottom: 1em;
}

/* ========================================
   CONTAINER
======================================== */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--gap);
}

.container--narrow {
  max-width: var(--container-narrow);
}

/* ========================================
   BUTTONS
======================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  border: none;
  position: relative;
}

/* Основная кнопка — скошенный срез */
.btn--primary {
  background-color: var(--alpine-berry);
  color: var(--text-on-berry);
  border-radius: var(--radius-btn);
  box-shadow: var(--shadow-btn);
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn--primary:hover {
  background-color: var(--alpine-berry-hover);
  color: var(--text-on-berry);
  transform: translateY(-3px);
  box-shadow: var(--shadow-btn-hover);
}

/* Второстепенная кнопка */
.btn--secondary {
  background-color: rgba(74, 107, 90, 0.15);
  color: var(--forest-shade);
  border-radius: var(--radius-lg);
  border: 1.5px solid var(--forest-shade);
}

.btn--secondary:hover {
  background-color: var(--forest-shade);
  color: var(--text-on-dark);
  transform: translateY(-2px);
}

/* Кнопка-призрак */
.btn--ghost {
  background: transparent;
  color: var(--alpine-berry);
  border-radius: var(--radius-lg);
  border: 1.5px solid var(--alpine-berry);
}

.btn--ghost:hover {
  background-color: var(--alpine-berry);
  color: var(--text-on-berry);
}

/* ========================================
   HEADER
======================================== */
.site-header {
  background-color: var(--bg-card);
  border-bottom: 1px solid rgba(58, 54, 50, 0.08);
  position: relative;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  gap: 20px;
}

/* Логотип */
.site-branding {
  flex-shrink: 0;
}

.site-branding a {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-primary);
}

.site-branding a:hover {
  color: var(--alpine-berry);
}

.custom-logo {
  height: 44px;
  width: auto;
}

.site-logo-text {
  display: flex;
  flex-direction: column;
}

.site-title {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.3rem;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.site-tagline {
  font-family: var(--font-accent);
  font-size: 0.65rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 2px;
}

/* SVG-логотип по умолчанию */
.default-logo svg {
  height: 44px;
  width: auto;
}

/* Навигация */
.main-navigation {
  display: flex;
  align-items: center;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-menu li {
  position: relative;
}

.nav-menu a {
  display: block;
  padding: 8px 16px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: all 0.3s ease;
  letter-spacing: 0.02em;
}

.nav-menu a:hover,
.nav-menu .current-menu-item a {
  color: var(--alpine-berry);
  background-color: var(--alpine-berry-light);
}

/* Подменю */
.nav-menu .sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card-hover);
  min-width: 220px;
  padding: 8px;
  z-index: 200;
  border: 1px solid rgba(58, 54, 50, 0.06);
}

.nav-menu li:hover > .sub-menu {
  display: block;
}

.nav-menu .sub-menu a {
  padding: 10px 16px;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
}

/* Мобильное меню */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-direction: column;
  gap: 5px;
  width: 36px;
}

.menu-toggle span {
  display: block;
  width: 100%;
  height: 2.5px;
  background-color: var(--slate);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ========================================
   HERO (Главная)
======================================== */
.hero-section {
  background: linear-gradient(160deg, var(--slate) 0%, #4A4540 50%, var(--alpine-berry) 100%);
  color: var(--text-on-dark);
  padding: clamp(60px, 12vw, 140px) 0;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.06;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Топографические линии */
.hero-section::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 80px;
  background: var(--bg-primary);
  clip-path: polygon(0 60%, 15% 40%, 30% 65%, 50% 30%, 70% 55%, 85% 35%, 100% 50%, 100% 100%, 0 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 700px;
}

.hero-content h1 {
  background: linear-gradient(135deg, #F5F0EB 0%, var(--summit-gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 20px;
  line-height: 1.15;
}

.hero-content p {
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: rgba(245, 240, 235, 0.85);
  margin-bottom: 32px;
  line-height: 1.8;
  max-width: 560px;
}

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

.hero-actions .btn--primary {
  border-color: rgba(255, 255, 255, 0.4);
}

.hero-actions .btn--ghost {
  color: var(--text-on-dark);
  border-color: rgba(245, 240, 235, 0.4);
}

.hero-actions .btn--ghost:hover {
  background-color: rgba(245, 240, 235, 0.15);
  color: var(--text-on-dark);
}

/* Декоративные горы в hero */
.hero-mountains {
  position: absolute;
  right: -40px;
  bottom: 60px;
  width: 500px;
  height: 300px;
  opacity: 0.1;
  z-index: 1;
}

/* ========================================
   СЕКЦИЯ — Общая
======================================== */
.section {
  padding: clamp(40px, 8vw, 80px) 0;
}

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

.section-header {
  margin-bottom: var(--gap-lg);
  max-width: 600px;
}

.section-header h2 {
  margin-bottom: 12px;
}

.section-header p {
  color: var(--text-secondary);
  font-size: 1.05rem;
}

/* ========================================
   MASONRY GRID — Рваная сетка блога
======================================== */
.posts-grid {
  columns: 3;
  column-gap: var(--gap);
  max-width: var(--container-max);
}

.posts-grid .card {
  break-inside: avoid;
  margin-bottom: var(--gap);
  display: inline-block;
  width: 100%;
}

/* ========================================
   CARD — Карточка записи
======================================== */
.card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  position: relative;
}

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

.card-thumbnail {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16/10;
  background-color: var(--bg-secondary);
}

.card-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

.card-category {
  position: absolute;
  top: 14px;
  left: 14px;
  display: inline-block;
  padding: 5px 14px;
  font-family: var(--font-accent);
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background-color: rgba(58, 54, 50, 0.75);
  color: var(--text-on-dark);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(8px);
}

.card-body {
  padding: 22px 24px 26px;
}

.card-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 10px;
}

.card-title a {
  color: var(--text-primary);
}

.card-title a:hover {
  color: var(--alpine-berry);
}

.card-excerpt {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 16px;
}

.card-excerpt a {
  color: var(--alpine-berry);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-accent);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.card-meta-item {
  display: flex;
  align-items: center;
  gap: 5px;
}

.card-meta svg {
  width: 14px;
  height: 14px;
  stroke: var(--summit-gold);
}

.card-read-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--alpine-berry);
  margin-top: 12px;
  transition: gap 0.3s ease;
}

.card-read-more:hover {
  gap: 12px;
  color: var(--alpine-berry-hover);
}

/* ========================================
   PAGINATION
======================================== */
.pagination-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: var(--gap-lg);
  padding: 20px 0;
}

.pagination-wrap .page-numbers {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  padding: 0 14px;
  font-family: var(--font-accent);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  border: 1.5px solid transparent;
  transition: all 0.3s ease;
}

.pagination-wrap .page-numbers:hover {
  border-color: var(--alpine-berry);
  color: var(--alpine-berry);
}

.pagination-wrap .page-numbers.current {
  background-color: var(--alpine-berry);
  color: var(--text-on-berry);
  border-color: var(--alpine-berry);
}

.pagination-wrap .page-numbers.dots {
  background: none;
  border: none;
  cursor: default;
}

.pagination-wrap .prev,
.pagination-wrap .next {
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.8rem;
}

/* ========================================
   SINGLE POST
======================================== */
.single-header {
  padding: clamp(40px, 8vw, 80px) 0 clamp(20px, 4vw, 40px);
}

.single-header .card-category {
  position: static;
  margin-bottom: 16px;
}

.single-header h1 {
  margin-bottom: 20px;
}

.single-meta {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  font-family: var(--font-accent);
  font-size: 0.85rem;
  color: var(--text-muted);
}

.single-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.single-meta svg {
  width: 16px;
  height: 16px;
  stroke: var(--summit-gold);
}

.single-featured {
  margin-bottom: var(--gap-lg);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.single-featured img {
  width: 100%;
  height: auto;
  display: block;
}

.single-content {
  padding-bottom: var(--gap-lg);
}

.single-content p {
  font-size: 1.05rem;
  line-height: 1.85;
  margin-bottom: 1.4em;
}

.single-content h2 {
  margin-top: 2em;
  margin-bottom: 0.8em;
}

.single-content h3 {
  margin-top: 1.6em;
  margin-bottom: 0.6em;
}

.single-content blockquote {
  margin: 2em 0;
  padding: 24px 30px;
  border-left: 4px solid var(--alpine-berry);
  background: var(--alpine-berry-light);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-style: italic;
  font-size: 1.05rem;
  color: var(--text-secondary);
}

.single-content ul,
.single-content ol {
  margin: 1.2em 0;
  padding-left: 1.5em;
}

.single-content ul {
  list-style: disc;
}

.single-content ol {
  list-style: decimal;
}

.single-content li {
  margin-bottom: 0.5em;
  line-height: 1.7;
}

.single-content img {
  border-radius: var(--radius-md);
  margin: 2em 0;
}

.single-content a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Теги */
.single-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: var(--gap);
  border-top: 1px solid rgba(58, 54, 50, 0.1);
}

.single-tags a {
  display: inline-block;
  padding: 6px 16px;
  font-family: var(--font-accent);
  font-size: 0.78rem;
  color: var(--text-muted);
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  transition: all 0.3s ease;
}

.single-tags a:hover {
  background: var(--forest-shade);
  color: var(--text-on-dark);
}

/* Навигация между записями */
.post-navigation {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap);
  margin-top: var(--gap-lg);
  padding-top: var(--gap);
  border-top: 1px solid rgba(58, 54, 50, 0.1);
}

.post-nav-link {
  padding: 20px;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  transition: all 0.3s ease;
}

.post-nav-link:hover {
  box-shadow: var(--shadow-card);
  transform: translateY(-2px);
}

.post-nav-label {
  font-family: var(--font-accent);
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}

.post-nav-title {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
}

.post-nav-link:hover .post-nav-title {
  color: var(--alpine-berry);
}

.post-nav-next {
  text-align: right;
}

/* ========================================
   PAGE
======================================== */
.page-header {
  padding: clamp(40px, 8vw, 80px) 0 clamp(20px, 4vw, 40px);
}

.page-content {
  padding-bottom: var(--gap-lg);
}

.page-content p,
.page-content li {
  font-size: 1.05rem;
  line-height: 1.85;
}

/* ========================================
   COMMENTS — Аватарки кристаллы
======================================== */
.comments-area {
  margin-top: var(--gap-lg);
  padding-top: var(--gap-lg);
  border-top: 2px solid rgba(58, 54, 50, 0.08);
}

.comments-title {
  margin-bottom: var(--gap);
}

.comment-list {
  list-style: none;
}

.comment {
  padding: var(--gap) 0;
  border-bottom: 1px solid rgba(58, 54, 50, 0.06);
}

.comment-body {
  display: flex;
  gap: 18px;
}

/* Шестиугольная аватарка — горный кристалл */
.comment-body .avatar {
  width: 56px;
  height: 56px;
  clip-path: polygon(50% 0%, 93% 22%, 93% 78%, 50% 100%, 7% 78%, 7% 22%);
  flex-shrink: 0;
  object-fit: cover;
}

.comment-content-wrap {
  flex: 1;
  min-width: 0;
}

.comment-author {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 2px;
}

.comment-author a {
  color: var(--text-primary);
}

.comment-metadata {
  font-family: var(--font-accent);
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.comment-metadata a {
  color: var(--text-muted);
}

.comment-content p {
  font-size: 0.95rem;
  line-height: 1.7;
}

.reply a {
  font-family: var(--font-accent);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--alpine-berry);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Вложенные комментарии */
.comment .children {
  margin-left: 40px;
  padding-left: 20px;
  border-left: 2px solid var(--alpine-berry-light);
}

/* Форма комментариев */
.comment-respond {
  margin-top: var(--gap-lg);
  padding: var(--gap);
  background: var(--bg-card);
  border-radius: var(--radius-md);
}

.comment-reply-title {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: var(--gap);
}

.comment-form label {
  display: block;
  font-family: var(--font-accent);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  padding: 14px 18px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text-primary);
  background: var(--bg-primary);
  border: 1.5px solid rgba(58, 54, 50, 0.12);
  border-radius: var(--radius-sm);
  transition: all 0.3s ease;
  margin-bottom: 16px;
}

.comment-form input:focus,
.comment-form textarea:focus {
  outline: none;
  border-color: var(--alpine-berry);
  box-shadow: 0 0 0 3px var(--alpine-berry-light);
}

.comment-form textarea {
  min-height: 150px;
  resize: vertical;
}

.comment-form .submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 36px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background-color: var(--alpine-berry);
  color: var(--text-on-berry);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-btn);
  cursor: pointer;
  box-shadow: var(--shadow-btn);
  transition: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.comment-form .submit:hover {
  background-color: var(--alpine-berry-hover);
  transform: translateY(-3px);
  box-shadow: var(--shadow-btn-hover);
}

/* ========================================
   SEARCH FORM
======================================== */
.search-form {
  display: flex;
  gap: 8px;
  max-width: 500px;
}

.search-field {
  flex: 1;
  padding: 14px 20px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text-primary);
  background: var(--bg-card);
  border: 1.5px solid rgba(58, 54, 50, 0.12);
  border-radius: var(--radius-sm);
  transition: all 0.3s ease;
}

.search-field:focus {
  outline: none;
  border-color: var(--alpine-berry);
  box-shadow: 0 0 0 3px var(--alpine-berry-light);
}

.search-submit {
  padding: 14px 24px;
  background: var(--alpine-berry);
  color: var(--text-on-berry);
  border: none;
  border-radius: var(--radius-btn);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.search-submit:hover {
  background: var(--alpine-berry-hover);
  transform: translateY(-2px);
}

/* ========================================
   SIDEBAR / WIDGETS
======================================== */
.widget {
  margin-bottom: var(--gap);
  padding: var(--gap);
  background: var(--bg-card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
}

.widget-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--alpine-berry-light);
}

.widget ul {
  list-style: none;
}

.widget ul li {
  padding: 8px 0;
  border-bottom: 1px solid rgba(58, 54, 50, 0.06);
}

.widget ul li:last-child {
  border-bottom: none;
}

.widget ul li a {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.widget ul li a:hover {
  color: var(--alpine-berry);
}

/* ========================================
   FOOTER
======================================== */
.site-footer {
  background-color: var(--bg-footer);
  color: var(--text-on-dark);
  position: relative;
}

.site-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  pointer-events: none;
}

.footer-widgets {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap-lg);
  padding: clamp(40px, 6vw, 64px) 0;
  position: relative;
  z-index: 1;
}

.footer-widgets .widget {
  background: rgba(245, 240, 235, 0.05);
  border: 1px solid rgba(245, 240, 235, 0.08);
}

.footer-widgets .widget-title {
  color: var(--summit-gold);
  border-bottom-color: rgba(196, 149, 106, 0.25);
}

.footer-widgets .widget ul li a {
  color: rgba(245, 240, 235, 0.7);
}

.footer-widgets .widget ul li a:hover {
  color: var(--summit-gold);
}

.footer-widgets .widget ul li {
  border-bottom-color: rgba(245, 240, 235, 0.06);
}

.footer-bottom {
  padding: 24px 0;
  border-top: 1px solid rgba(245, 240, 235, 0.08);
  position: relative;
  z-index: 1;
}

.footer-bottom-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-copyright {
  font-family: var(--font-accent);
  font-size: 0.82rem;
  color: rgba(245, 240, 235, 0.55);
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a {
  font-family: var(--font-accent);
  font-size: 0.82rem;
  color: rgba(245, 240, 235, 0.55);
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: var(--summit-gold);
}

/* ========================================
   404 & SEARCH RESULTS
======================================== */
.error-404,
.search-results-page {
  text-align: center;
  padding: clamp(60px, 12vw, 120px) 0;
}

.error-404 h1,
.search-results-page h1 {
  margin-bottom: 20px;
}

.error-404 p,
.search-results-page p {
  color: var(--text-secondary);
  max-width: 500px;
  margin: 0 auto 32px;
}

/* ========================================
   LAZY LOADING PLACEHOLDER
======================================== */
img[loading="lazy"] {
  opacity: 0;
  transition: opacity 0.5s ease;
}

img[loading="lazy"].loaded,
img.loaded {
  opacity: 1;
}

/* Фолбэк если JS отключен */
noscript img,
img:not([loading="lazy"]) {
  opacity: 1;
}

/* ========================================
   RESPONSIVE
======================================== */
@media (max-width: 1024px) {
  .posts-grid {
    columns: 2;
  }

  .footer-widgets {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  /* Мобильное меню */
  .menu-toggle {
    display: flex;
  }

  .main-navigation .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--bg-card);
    padding: 16px;
    box-shadow: var(--shadow-card-hover);
    gap: 4px;
    border-top: 1px solid rgba(58, 54, 50, 0.06);
  }

  .main-navigation .nav-menu.toggled {
    display: flex;
  }

  .nav-menu .sub-menu {
    position: static;
    box-shadow: none;
    padding-left: 16px;
    display: none;
    border-left: 2px solid var(--alpine-berry-light);
    margin-top: 4px;
    min-width: auto;
  }

  .nav-menu li.menu-item-has-children.submenu-open > .sub-menu {
    display: flex;
    flex-direction: column;
  }

  .posts-grid {
    columns: 1;
  }

  .post-navigation {
    grid-template-columns: 1fr;
  }

  .footer-widgets {
    grid-template-columns: 1fr;
  }

  .footer-bottom-inner {
    flex-direction: column;
    text-align: center;
  }

  .hero-content h1 {
    font-size: 1.8rem;
  }

  .comment-body {
    flex-direction: column;
  }

  .comment .children {
    margin-left: 16px;
    padding-left: 12px;
  }

  .site-tagline {
    display: none;
  }
}

@media (max-width: 480px) {
  :root {
    --gap: 16px;
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-actions .btn {
    width: 100%;
  }
}

/* ========================================
   ACCESSIBILITY
======================================== */
.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  word-wrap: normal;
}

:focus-visible {
  outline: 2px solid var(--alpine-berry);
  outline-offset: 2px;
}

/* ========================================
   UTILITY
======================================== */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.mt-1 { margin-top: 16px; }
.mt-2 { margin-top: 32px; }
.mt-3 { margin-top: 48px; }
.mb-1 { margin-bottom: 16px; }
.mb-2 { margin-bottom: 32px; }
.mb-3 { margin-bottom: 48px; }
