/*
Theme Name: Про-шпиц (Полевой гид)
Template: root-lite
Author: Игорь Северцев
Description: Дочерняя тема Root Lite — анимированный hero-блок и стиль «Полевой гид» для главной страницы.
Version: 1.2.7
*/

/* ===== Токены направления «Полевой гид» (см. Настроить → Цвета — совпадает с уже применённой палитрой) ===== */
:root{
  --ground:#F7F1E4; --header:#FFFCF8; --surface:#EFE6D2; --surface2:#F1E7CE;
  --line:#D2BE94; --ink:#241A0E; --ink-soft:#4A3B26; --ink-faint:#6B5A3E;
  --accent:#AD5F16; --accent-hi:#C97A1F; --rust:#9B3B1F; --sage:#5C6B4F;
}

/* Расширяем колонку сайта с 1170px (родительская тема, фиксированный width) до 1400px —
   боковые поля станут заметно уже. .container используется во всей теме (шапка, меню,
   статьи), поэтому ширится весь сайт целиком, не только главная. */
.container{ max-width:1400px; width:100%; }

/* Узор в боковых полях — тот же фирменный файл-паттерн, что был раньше (нашли в медиатеке,
   id 303, "Фирменный фон-паттерн Pro-Shpic"), но бледнее: сверху лёгкая заливка тоном фона. */
html{
  background-color:var(--ground);
  background-image:
    linear-gradient(rgba(247,241,228,.82), rgba(247,241,228,.82)),
    url("https://pro-shpic.ru/wp-content/uploads/2026/03/2026-03-31_00-56-10.png");
  background-repeat:repeat, repeat;
  background-position:0 0, 0 0;
}
#content, header.site-header{ position:relative; z-index:1; }

/* Фон дочерней темы задаём явно: "Цвет фона" в Customizer — это встроенная опция
   WordPress background_color, она хранится отдельно для каждой темы и НЕ переносится
   при переключении на дочернюю тему (сбрасывается на дефолт WP F9F8F5). Задаём и на
   #content напрямую — у родительской темы там свой белый фон с более высоким
   приоритетом в каскаде, чем просто body. */
body{ background-color:transparent !important; }
#content{ background-color:var(--ground); }
header.site-header{ background-color:var(--header); }

/* Подпись под названием сайта — светлый серый терялся на кремовом фоне, отступ увеличен по просьбе */
.site-description{ color:var(--ink-soft); margin-top:16px; font-size:18px; max-width:46ch; }

/* Название сайта — родительская тема даёт жирный Roboto 28px, увеличено по просьбе сверх макетных 38px */
.site-title, .site-title a{ font-family:"PT Serif",serif; font-size:44px; font-weight:700; }
/* На мобильных 44px рядом с логотипом в шапке переносится некрасиво — уменьшаем */
@media (max-width:600px){
  .site-title, .site-title a{ font-size:28px; }
  .site-description{ font-size:14px; margin-top:10px; }
}

/* ===== Логотип в шапке — белая рамка-медальон с анимацией появления (только на главной) ===== */
@keyframes logoSettle{
  0%{ opacity:0; transform:scale(.45) translateY(-30px); }
  55%{ opacity:1; transform:scale(1.1) translateY(6px); }
  75%{ transform:scale(.97) translateY(-2px); }
  100%{ opacity:1; transform:scale(1) translateY(0); }
}
.home .site-logotype{
  width:98px; height:108px; border-radius:50%; border:2px solid var(--accent);
  background:#fff; display:flex; align-items:center; justify-content:center;
  box-shadow:0 3px 10px rgba(43,32,19,.14);
  animation:logoSettle 1.3s cubic-bezier(.22,.85,.28,1.05) both;
}
.home .site-logotype img{ width:66px; height:71px; object-fit:contain; }
@media (prefers-reduced-motion: reduce){
  .home .site-logotype{ animation:none; }
}

/* ===== Меню — жирнее, как в макете «Полевой гид» ===== */
#site-navigation a{ font-weight:600; }

/* ===== Hero ===== */
@keyframes glowWhite{
  0%,100%{ opacity:.78; transform:scale(.62); }
  40%{ opacity:.03; transform:scale(1.1); }
}
@keyframes glowGold{
  0%,100%{ opacity:.09; transform:scale(.82); }
  35%{ opacity:.08; transform:scale(.9); }
  65%{ opacity:.74; transform:scale(1.34); }
}
.pg-hero{ position:relative; max-width:1400px; margin:-30px auto 0; padding:56px 24px 8px; overflow:hidden; font-family:"Golos Text",system-ui,sans-serif; }
.pg-hero-glow-wrap{ position:absolute; top:50%; left:50%; width:640px; height:640px; transform:translate(-50%,-50%); pointer-events:none; }
.pg-hero-glow-wrap > div{ position:absolute; inset:0; border-radius:50%; }
.pg-hero-glow-white{ background:radial-gradient(circle, rgba(255,255,255,.95) 0%, rgba(255,250,240,0) 55%); animation:glowWhite 7s ease-in-out infinite; }
.pg-hero-glow-gold{ background:radial-gradient(circle, rgba(173,95,22,.42) 0%, rgba(173,95,22,0) 70%); animation:glowGold 7s ease-in-out infinite; }
.pg-hero-rays{ position:absolute; top:50%; left:50%; width:520px; height:520px; transform:translate(-50%,-50%); pointer-events:none; }
.pg-hero-rays line{ stroke:var(--accent); stroke-width:1.5; opacity:.3; }
.pg-hero-rays circle{ fill:none; stroke:var(--accent); stroke-width:1.5; opacity:.45; }

.pg-hero-content{ position:relative; max-width:640px; margin:0 auto; text-align:center; }
.pg-hero-eyebrow{ font-family:"JetBrains Mono",monospace; font-size:12px; letter-spacing:.1em; text-transform:uppercase; color:var(--accent); opacity:0; transform:translateY(26px); animation:pgFadeUp 1s ease both; animation-delay:1.4s; }
.pg-hero h1{ font-family:"PT Serif",serif; font-weight:700; font-size:clamp(28px,4vw,42px); line-height:1.22; margin:14px 0 0; color:var(--ink); }
.pg-hero h1 .pg-line{ display:block; overflow:hidden; padding-bottom:4px; }
.pg-hero h1 .pg-line span{ display:inline-block; opacity:0; transform:translateY(100%); animation:pgFadeUp 1.1s ease both; }
.pg-hero h1 .pg-line:nth-child(1) span{ animation-delay:1.9s; }
.pg-hero h1 .pg-line:nth-child(2) span{ animation-delay:2.5s; }
.pg-hero .pg-keyword{ position:relative; display:inline-block; }
.pg-hero .pg-keyword::after{ content:""; position:absolute; left:0; bottom:2px; width:100%; height:4px; background:var(--accent); transform:scaleX(0); transform-origin:left; animation:pgScaleX 1.2s ease both; animation-delay:3.4s; }
.pg-hero-sub{ margin:18px auto 0; font-size:15px; color:var(--ink-soft); line-height:1.6; max-width:52ch; opacity:0; transform:translateY(26px); animation:pgFadeUp 1s ease both; animation-delay:4.3s; }
.pg-hero-stats{ margin-top:32px; padding-bottom:40px; display:flex; gap:40px; justify-content:center; }
.pg-hero-stat{ opacity:0; transform:translateY(26px); animation:pgFadeUp 1s ease both; }
.pg-hero-stat:nth-child(1){ animation-delay:5.1s; }
.pg-hero-stat:nth-child(2){ animation-delay:5.35s; }
.pg-hero-stat .num{ font-family:"PT Serif",serif; font-weight:700; font-size:32px; color:var(--accent); font-variant-numeric:tabular-nums; }
.pg-hero-stat .lbl{ margin-top:4px; font-size:12.5px; color:var(--ink-faint); }

@keyframes pgFadeUp{ to{ opacity:1; transform:translateY(0); } }
@keyframes pgScaleX{ to{ transform:scaleX(1); } }

@media (prefers-reduced-motion: reduce){
  .pg-hero-glow-white, .pg-hero-glow-gold{ animation:none; opacity:.2; transform:none; }
  .pg-hero-eyebrow, .pg-hero h1 .pg-line span, .pg-hero-sub, .pg-hero-stat{ animation:none !important; opacity:1 !important; transform:none !important; }
  .pg-hero .pg-keyword::after{ animation:none !important; transform:scaleX(1) !important; }
}

/* ===== Главная: лента статей + рекламная колонка ===== */
/* align-items:start -- иначе grid растягивает короткую ленту статей на высоту сайдбара */
.pg-layout{ max-width:1400px; margin:0 auto; padding:36px 24px 48px; display:grid; grid-template-columns:1fr 300px; gap:40px; align-items:start; }
.pg-layout > main{ min-width:0; }
@media (max-width:860px){ .pg-layout{ grid-template-columns:1fr; } }

/* Обложка последней статьи — на всю ширину колонки, крупно, чтобы притягивала взгляд как раньше */
.pg-feature{ display:grid; grid-template-columns:1fr; gap:18px; padding-bottom:28px; border-bottom:1px solid var(--line); margin-bottom:28px; }
/* min-width:0 обязателен -- иначе <img> в grid-колонке не сжимается уже своей "естественной" ширины и рвёт мобильную вёрстку горизонтальным скроллом */
.pg-feature{ min-width:0; }
.pg-feature .pg-ph{ aspect-ratio:16/8; border-radius:6px; background:linear-gradient(135deg,var(--line),rgba(138,62,23,.4)); object-fit:cover; width:100%; min-width:0; display:block; }
.pg-feature .pg-tag{ font-family:"JetBrains Mono",monospace; font-size:10.5px; text-transform:uppercase; letter-spacing:.06em; color:var(--accent); }
.pg-feature h2{ font-family:"PT Serif",serif; font-weight:700; font-size:22px; line-height:1.28; margin:10px 0 0; text-wrap:balance; }
.pg-feature h2 a{ color:inherit; }
.pg-feature .pg-meta{ margin-top:10px; font-size:12px; color:var(--ink-faint); }
.pg-feature .pg-excerpt{ margin-top:10px; font-size:13.5px; color:var(--ink-soft); line-height:1.6; }

.pg-postlist{ display:flex; flex-direction:column; gap:1px; background:var(--line); border:1px solid var(--line); border-radius:8px; overflow:hidden; }
/* Фото в списке — увеличены ~в 2,5 раза, затем ещё +30%, затем ещё +10% по просьбе (были еле заметны 100x58) */
.pg-post-row{ background:var(--header); padding:18px 20px; display:grid; grid-template-columns:375px 1fr; gap:20px; align-items:center; transition:background .15s ease; }
.pg-post-row:hover{ background:var(--surface2); }
.pg-post-row .pg-ph{ width:375px; height:215px; border-radius:6px; background:linear-gradient(135deg,var(--line),rgba(138,62,23,.4)); flex:none; object-fit:cover; display:block; }
.pg-post-row .pg-tag{ font-family:"JetBrains Mono",monospace; font-size:9.5px; text-transform:uppercase; color:var(--accent); letter-spacing:.05em; }
/* На узких экранах фиксированная 375px-колонка фото не влезает — переносим фото над текстом */
@media (max-width:640px){
  .pg-post-row{ grid-template-columns:1fr; }
  .pg-post-row{ min-width:0; }
  .pg-post-row .pg-ph{ width:100%; height:auto; min-width:0; aspect-ratio:375/215; }
}
.pg-post-row h3{ font-family:"PT Serif",serif; font-weight:700; font-size:17px; margin:6px 0 0; line-height:1.35; }
.pg-post-row h3 a{ color:inherit; }
.pg-post-row .pg-meta{ margin-top:6px; font-size:11px; color:var(--ink-faint); }

/* ===== Рекламно-виджетная колонка — вместо тяжёлого «сайдбара» узкая колонка в стиле макета ===== */
#secondary.widget-area{ font-family:"Golos Text",system-ui,sans-serif; }
#secondary .widget{ background:var(--header); border:1px solid var(--line); border-radius:8px; padding:18px; margin-bottom:20px; }
#secondary .widget-title{ font-family:"JetBrains Mono",monospace; font-size:10.5px; text-transform:uppercase; letter-spacing:.05em; color:var(--ink-faint); margin:0 0 12px; }
#secondary .widget_custom_html{ background:none; border:none; padding:0; margin-bottom:12px; text-align:center; }
#secondary .widget_custom_html .widget-title{ display:none; }
#secondary .widget_search input[type="search"]{ width:100%; background:var(--surface2); border:1px solid var(--line); border-radius:5px; padding:9px 11px; color:var(--ink); font-size:13px; }
/* Кнопка поиска — стрелка вместо текста "Поиск", как в макете */
#secondary .widget_search button, #secondary .widget_search input[type="submit"]{ background:var(--accent); border:none; border-radius:5px; padding:9px 16px; color:var(--header); font-weight:700; font-size:0; margin-top:8px; position:relative; cursor:pointer; }
#secondary .widget_search button::after{ content:"\2192"; font-size:16px; }
#secondary .widget_recent_entries ul, #secondary .widget_block ul{ list-style:none; margin:0; padding:0; }
#secondary .widget_recent_entries li, #secondary .widget_block li{ padding:9px 0; border-bottom:1px solid var(--line); font-size:13px; }
#secondary .widget_recent_entries li:last-child, #secondary .widget_block li:last-child{ border-bottom:none; }
#secondary .widget_recent_entries a, #secondary .widget_block a{ color:var(--ink-soft); }
#secondary .widget_recent_entries a:hover, #secondary .widget_block a:hover{ color:var(--accent-hi); }
