/* ШРИФТЫ */
@font-face { 
font-family: 'bukvica'; 
src: url('https://lestvicaorthodox.com/wp-content/uploads/bukvica.woff'); 
}
@font-face { 
font-family: 'oglavie'; 
src: url('https://lestvicaorthodox.com/wp-content/uploads/oglavie.woff'); 
}

:root {
--accent: #b59a5a;
--text-dark: #2e2f33;
--bg-card: rgba(255, 255, 255, 0.96);
}

/* ФОРСИРОВАННАЯ ПОЛНОЭКРАННОСТЬ ДЛЯ BODY (отключает отступы темы) */
body.full-width-uteshenie {
margin: 0 !important;
padding: 0 !important;
overflow-x: hidden !important;
}
body.full-width-uteshenie .site-content,
body.full-width-uteshenie #content,
body.full-width-uteshenie .ast-container,
body.full-width-uteshenie .site-main {
max-width: 100% !important;
width: 100% !important;
margin: 0 !important;
padding: 0 !important;
}

/* ФОН НА ВСЮ СТРАНИЦУ (Оригинальный, фиксированный) */
#uteshenie-page-wrapper {
position: relative;
min-height: 100vh;
padding-bottom: 30px; /* Уменьшен воздух снизу */
margin: 0;
width: 100%;
}

.block-subtitle {
text-align: center !important;
display: block !important;
width: 100% !important;
}

#uteshenie-page-wrapper::before {
content: '';
position: fixed !important; /* Статично зафиксирован относительно экрана */
top: 0 !important;
left: 0 !important;
width: 100vw !important;
height: 100vh !important;
background-image: url('https://lestvicaorthodox.com/wp-content/uploads/fon.webp') !important;
background-position: center !important;
background-size: cover !important;
background-repeat: no-repeat !important;
z-index: -1 !important;
/* Убрано свойство background-attachment: fixed; так как position: fixed уже держит элемент на месте.
   Это полностью решает баг ломающегося масштаба фона на iOS Safari и мобильных браузерах. */
transform: translateZ(0); /* Аппаратное ускорение для фиксации на iOS */
will-change: transform;
}

/* ГЕРОЙ-БЛОК */
.hero-ortho {
height: 60vh; /* Уменьшили высоту */
display: flex;
align-items: center;
justify-content: center;
text-align: center;
}

.hero-title {
font-size: clamp(48px, 8vw, 90px) !important;
color: var(--accent);
margin-bottom: 10px; /* Меньше воздуха */
font-weight: normal;
text-shadow: 2px 2px 15px rgba(0,0,0,0.1);
}

.hero-subtitle {
font-size: 20px;
color: var(--text-dark);
background: rgba(255,255,255,0.4);
padding: 12px 20px; /* Уменьшили падинги */
border-radius: 20px;
display: inline-block;
backdrop-filter: blur(5px);
}

/* ФОНАРИКИ И СЕПАРАТОРЫ */
.lanterns-top-right {
position: absolute;
top: 0;
right: 100px; /* Сдвинуто на 100px к центру */
width: 160px;
opacity: 0.8;
z-index: 5;
pointer-events: none;
}

.lanterns-top-right img {
width: 100%;
height: auto;
display: block;
}

.graphic-separator-center, .graphic-separator-bottom {
text-align: center;
margin: 10px auto 30px auto;
}

.graphic-separator-center img, .graphic-separator-bottom img {
max-width: 200px;
height: auto;
opacity: 0.85;
}

/* ФИКСИРОВАННАЯ НАВИГАЦИЯ */
.nav-anchor-point {
position: sticky;
top: 15px;
z-index: 1000;
width: 100%;
display: flex;
justify-content: center;
margin-bottom: 20px; 
}

.inner-nav-ortho {
background: rgba(255, 255, 255, 0.85);
padding: 6px 12px;
border-radius: 50px;
box-shadow: 0 5px 20px rgba(0,0,0,0.08);
backdrop-filter: blur(10px);
border: 1px solid rgba(181, 154, 90, 0.3);
display: flex;
align-items: center;
flex-wrap: wrap;
justify-content: center;
gap: 8px;
}

.back-link-ortho, button#btnProsheniya {
background: transparent !important;
border: none !important;
color: var(--accent) !important;
padding: 6px 12px !important;
text-decoration: none !important;
font-weight: bold !important;
font-size: 14px !important;
transition: 0.3s !important;
font-family: inherit !important;
cursor: pointer !important;
outline: none !important;
}

.back-link-ortho:hover, button#btnProsheniya:hover {
color: #8b7355 !important;
transform: translateY(-2px) !important;
}

/* КАРТОЧКИ (Золотая обводка, уменьшены отступы) */
.section-container {
max-width: 1000px;
margin: 25px auto; /* Уменьшили воздух между карточками */
padding: 0 15px;
}

.floating-card {
background: var(--bg-card);
padding: 35px 30px; /* Уменьшили гигантские внутренние падинги */
border-radius: 25px; /* Немного уменьшили радиус */
box-shadow: 0 10px 30px rgba(0,0,0,0.06); 
border: 1px solid rgba(181, 154, 90, 0.4); /* Золотая обводка */
}

.block-title {
font-size: 32px; /* Чуть меньше */
color: var(--accent);
text-align: center;
margin-bottom: 5px;
font-family: "Georgia", serif;
}

.support-footer {
text-align: center;
}

.support-text {
font-size: 20px;
line-height: 1.5;
color: var(--accent);
margin: 0;
font-family: "Georgia", serif;
}

/* ПЛЕЕР С ВОЛНОЙ (Аккуратные кнопки) */
.audio-wave-container {
background: #fdfaf5;
padding: 15px;
border-radius: 20px;
border: 1px solid #e6dec9;
}

.audio-info {
text-align: center;
font-weight: bold;
color: #8b7355;
margin-bottom: 10px;
letter-spacing: 1px;
}

#waveform {
width: 100%;
height: 70px; /* Чуть ниже волна */
cursor: pointer;
}

.wave-controls {
display: flex;
align-items: center;
gap: 15px;
margin-top: 10px;
flex-wrap: wrap;
justify-content: center;
}

/* Новая аккуратная кнопка Play */
.wave-btn {
background: var(--accent);
border: none;
color: white;
width: 40px; /* Было 60px */
height: 40px;
border-radius: 50%;
cursor: pointer;
font-size: 14px; /* Было 22px */
box-shadow: 0 3px 10px rgba(181, 154, 90, 0.3);
display: flex;
align-items: center;
justify-content: center;
transition: 0.3s;
}

.wave-btn:hover {
background: #8b7355;
transform: scale(1.05);
}

.wave-time { color: #888; font-size: 12px; font-family: monospace; }

.wave-volume-wrapper { 
display: flex; 
align-items: center; 
gap: 6px; 
color: var(--accent); 
font-size: 12px; 
font-weight: bold; 
}

#wave-volume { 
accent-color: var(--accent); 
width: 70px; 
cursor: pointer; 
}

/* Аккуратная иконка скачивания */
.wave-download { 
color: var(--accent);
background: transparent;
border: 1px solid var(--accent);
border-radius: 50%;
width: 35px;
height: 35px;
display: flex;
align-items: center;
justify-content: center;
transition: 0.3s; 
}

.wave-download svg {
width: 16px;
height: 16px;
}

.wave-download:hover { 
background: var(--accent);
color: white;
}

/* ТЕКСТ МОЛИТВ */
.prayer-item { margin-bottom: 40px; }

.prayer-header {
text-align: center;
color: var(--accent);
border-bottom: 1px solid #e6dec9;
padding-bottom: 10px;
margin-bottom: 20px;
font-size: 22px;
}

.psalm-number {
display: block;
color: #8b9bb0;
margin-bottom: 8px;
font-size: 16px;
font-weight: bold;
text-align: center;
}

.psalm-text {
font-family: "Georgia", serif;
font-size: 17px; /* Чуть мельче */
line-height: 1.7;
color: #333;
display: block;
text-align: justify;
}

.psalm-text::first-letter {
float: left;
font-size: 65px;
line-height: 55px;
padding-right: 10px;
color: var(--accent);
font-family: 'bukvica', serif;
}

/* ВИДЕО */
.video-section-ortho { 
max-width: 900px; 
margin: 30px auto; 
padding: 0 15px; 
}

.video-container { 
border-radius: 20px; 
overflow: hidden; 
box-shadow: 0 10px 30px rgba(0,0,0,0.15); 
line-height: 0; 
border: 4px solid white; 
}

.video-player { 
width: 100%; 
height: auto; 
}

/* ЦИТАТЫ */
.quote-card { 
text-align: center; 
background: #fffcf7; 
}

#quote-text { 
font-family: "Georgia", serif; 
font-style: italic; 
font-size: 24px; 
line-height: 1.5; 
margin-bottom: 15px; 
color: #4a4238; 
}

#quote-author { 
color: var(--accent); 
font-weight: bold; 
display: block; 
margin-bottom: 20px; 
font-size: 15px; 
text-transform: uppercase; 
letter-spacing: 1px; 
}

.quote-btn {
border: 2px solid var(--accent);
background: transparent;
color: var(--accent);
padding: 8px 25px;
border-radius: 50px;
cursor: pointer;
font-weight: bold;
transition: 0.3s;
text-transform: uppercase;
font-size: 13px;
}

.quote-btn:hover { 
background: var(--accent); 
color: white; 
transform: translateY(-3px); 
}

/* МОДАЛЬНОЕ ОКНО КНИГИ ПРОШЕНИЙ */
.modal {
display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
background: rgba(0,0,0,0.8); backdrop-filter: blur(8px);
z-index: 4000; justify-content: center; align-items: center;
}

.modal-content {
background: var(--bg-card);
padding: 20px; border: 2px solid var(--accent);
max-width: 950px; width: 95%; height: 85vh;
max-height: 85vh; /* ЖЕСТКОЕ ОГРАНИЧЕНИЕ: не дает окну растянуться больше экрана */
border-radius: 15px; display: flex; flex-direction: column;
box-sizing: border-box;
overflow: hidden; /* Запрещаем контенту разрывать рамки окна */
}

.close-petition-btn {
background: transparent; border: 1px solid #888; color: #333;
padding: 5px 15px; border-radius: 25px; cursor: pointer; transition: 0.3s; font-family: inherit;
}

.close-petition-btn:hover { background: #eee; }

/* СКРОЛЛ И СКРЫТИЕ АДМИН ПАНЕЛИ ВНУТРИ МОДАЛКИ */
#petitionAjaxContainer {
width: 100%;
flex: 1 1 auto; /* Позволяет блоку растягиваться и сжиматься внутри flex */
min-height: 0; /* КРИТИЧЕСКИ ВАЖНО: Разрешает контейнеру сжиматься, включая скролл */
overflow-y: auto;
overflow-x: hidden;
padding-right: 10px;
box-sizing: border-box;
}

/* Кастомный скроллбар для эстетики Книги прошений */
#petitionAjaxContainer::-webkit-scrollbar { width: 8px; }
#petitionAjaxContainer::-webkit-scrollbar-track { background: transparent; }
#petitionAjaxContainer::-webkit-scrollbar-thumb { background-color: var(--accent); border-radius: 10px; }

#petitionAjaxContainer #wpadminbar { display: none !important; }
#petitionAjaxContainer html { margin-top: 0 !important; }

/* АДАПТИВНОСТЬ ДЛЯ МОБИЛЬНЫХ */
@media (max-width: 768px) {
.lanterns-top-right {
display: none; /* Скрываем фонарики на смартфонах */
}
.inner-nav-ortho {
flex-direction: row; 
padding: 6px;
border-radius: 15px;
}
.back-link-ortho, button#btnProsheniya {
padding: 6px 8px !important;
font-size: 12px !important;
}
.hero-title { 
font-size: 42px !important; 
}
.floating-card { padding: 25px 15px; }
.block-title { font-size: 24px; }
.psalm-text { font-size: 15px; text-align: left; }
.nav-anchor-point { top: 10px; }
.support-text { font-size: 18px; }

/* Модалка на весь экран */
.modal-content {
width: 100vw !important; max-width: 100vw !important;
height: 100vh !important; max-height: 100vh !important;
border-radius: 0 !important; border: none !important;
margin: 0 !important; padding: 15px 5px !important;
display: flex !important; flex-direction: column !important;
}

/* Дублируем фикс фона внутри медиа-запроса на всякий случай для гарантии на iPhone */
#uteshenie-page-wrapper::before {
position: fixed !important;
width: 100vw !important;
height: 100vh !important;
}
}