/* ===== text-alignment-frame-fix.css ===== */
/* Final text alignment and framed mission block */
:root{--text-fix-wine:#5f0a18;--text-fix-deep:#33060d;--text-fix-gold:#b69042;--text-fix-paper:#fffaf2;--text-fix-ink:#302428}
/* Prevent awkward title fragmentation and keep hero text aligned */
.page-hero h1,.pres-hero h1,.memory-hero h1,.institution-hero h1,.about-command h1,.home-command h1{
  max-width:min(900px,100%)!important;
  overflow-wrap:normal!important;
  word-break:normal!important;
  hyphens:none!important;
  text-wrap:balance!important;
}
.privacy-policy-page .page-hero h1, body[data-page="privacy-policy"] .page-hero h1{
  max-width:980px!important;
  font-size:clamp(2.25rem,6vw,4.35rem)!important;
  line-height:1.06!important;
  letter-spacing:-.025em!important;
}
.page-hero .container,.pres-hero .container,.memory-hero .container{ text-align:center!important; }
.page-hero-sub,.pres-subtitle,.memory-hero p{max-width:820px!important;margin-left:auto!important;margin-right:auto!important;text-align:center!important}
/* Align ordinary prose consistently */
main p, main li{overflow-wrap:break-word!important;word-break:normal!important;hyphens:auto!important}
.section-heading,.about-heading,.home-heading,.pres-section-sub,.section-header{max-width:860px!important}
/* Beautiful frame for the mission text shown on the About page */
.about-profile__statement{
  position:relative!important;
  max-width:1040px!important;
  margin:0 auto!important;
  padding:clamp(28px,4vw,52px)!important;
  border:1px solid rgba(182,144,66,.44)!important;
  border-left:7px solid var(--text-fix-wine)!important;
  border-radius:24px!important;
  background:linear-gradient(135deg,#fff 0%,#fff8ea 100%)!important;
  box-shadow:0 26px 64px rgba(79,7,17,.10), inset 0 1px 0 rgba(255,255,255,.9)!important;
  overflow:hidden!important;
}
.about-profile__statement::before{
  content:""!important;position:absolute!important;inset:0 0 auto!important;height:6px!important;
  background:linear-gradient(90deg,#fff 0 33.333%,#0039a6 33.333% 66.666%,#d52b1e 66.666% 100%)!important;
}
.about-profile__statement::after{
  content:""!important;position:absolute!important;right:-74px!important;bottom:-74px!important;width:210px!important;height:210px!important;border-radius:50%!important;
  background:radial-gradient(circle,rgba(182,144,66,.18),transparent 64%)!important;pointer-events:none!important;
}
.about-profile__statement .about-kicker{color:var(--text-fix-wine)!important;opacity:1!important;letter-spacing:.17em!important}
.about-profile__statement h2{
  color:var(--text-fix-wine)!important;
  max-width:720px!important;
  margin-top:16px!important;
  text-wrap:balance!important;
}
.about-profile__statement p{
  color:#3f3337!important;
  max-width:76ch!important;
  font-size:clamp(1.02rem,1.45vw,1.15rem)!important;
  line-height:1.82!important;
}
@media(max-width:900px){
  .about-profile__statement{display:block!important;padding:30px 24px!important}
  .about-profile__statement .about-kicker,.about-profile__statement h2,.about-profile__statement p{grid-column:auto!important}
  .privacy-policy-page .page-hero h1, body[data-page="privacy-policy"] .page-hero h1{font-size:clamp(2rem,9vw,3.4rem)!important}
}
@media(max-width:520px){
  .page-hero h1,.pres-hero h1,.memory-hero h1,.institution-hero h1{font-size:clamp(2rem,10vw,3rem)!important;line-height:1.1!important}
  .about-profile__statement{border-radius:18px!important;padding:26px 20px!important}
}

/* Decorative elements must never be counted as shifted text or create visual imbalance on narrow screens. */
.hero-flag-corner{overflow:hidden!important;max-width:96px!important}
@media(max-width:520px){
  .hero-flag-corner{display:none!important}
  .page-hero,.pres-hero,.memory-hero,.institution-hero{padding-left:10px!important;padding-right:10px!important}
}

@media(max-width:1000px){.hero-flag-corner{display:none!important}}

/* Remove stray decorative flag marker that was positioned outside the hero text area. */
.hero-flag-corner{display:none!important}

/* ===== final-readability-override.css ===== */
/* Final readability override: all text must remain visible after page renaming and redesign layers. */
:root{--read-wine:#5f0a18;--read-deep:#33060d;--read-gold:#b69042;--read-ink:#302428;--read-muted:#514046;--read-paper:#fffaf2}
body{color:var(--read-ink)!important;background:#fffaf2!important}
main :where(p,li,dd,dt,small,label,span:not([aria-hidden="true"])){text-shadow:none!important;opacity:1!important}
main :where(h1,h2,h3,h4){opacity:1!important;text-shadow:none!important}
/* Light sections */
main :where(.institution-section,.about-profile,.about-values,.about-system,.home-programs,.home-memory,.legal-intro,.law-group,.organization-data,.contact-intro,.memory-roster,.memory-stories,.pres-section,.timeline) :where(p,li,dd,dt,small,label,span:not([aria-hidden="true"])){color:var(--read-muted)!important}
main :where(.institution-section,.about-profile,.about-values,.about-system,.home-programs,.home-memory,.legal-intro,.law-group,.organization-data,.contact-intro,.memory-roster,.memory-stories,.pres-section,.timeline) :where(h1,h2,h3,h4,strong){color:var(--read-wine)!important}
/* Dark hero and CTA blocks */
:where(.home-command,.about-command,.institution-hero,.page-hero,.pres-hero,.memory-hero,.contact-dialogue,.institution-cta__card,.legal-source .institution-cta__card,.cta-section) :where(h1,h2,h3,h4,strong){color:#fff!important;text-shadow:0 2px 10px rgba(0,0,0,.22)!important}
:where(.home-command,.about-command,.institution-hero,.page-hero,.pres-hero,.memory-hero,.contact-dialogue,.institution-cta__card,.legal-source .institution-cta__card,.cta-section) :where(p,li,small,label,span:not([aria-hidden="true"])){color:#f8eef0!important;opacity:1!important;text-shadow:none!important}
:where(.home-command,.about-command,.institution-hero,.page-hero,.pres-hero,.memory-hero,.contact-dialogue,.institution-cta__card,.legal-source .institution-cta__card,.cta-section) :where(.institution-kicker,.page-kicker,.about-kicker,.home-heading__kicker,.pres-rank,.card-index,.law-card__number){color:#f1d99d!important}
/* Cards and form panels always use dark text */
:where(.feature-card,.activity-item,.impact-card,.law-card,.contact-cards article,.organization-grid article,.contact-form-panel,.about-profile__statement,.memory-card,.memorial-card,.state-award-card,.tl-body,.home-direction,.home-programs__grid article){background-color:#fff!important;color:var(--read-ink)!important}
:where(.feature-card,.activity-item,.impact-card,.law-card,.contact-cards article,.organization-grid article,.contact-form-panel,.about-profile__statement,.memory-card,.memorial-card,.state-award-card,.tl-body,.home-direction,.home-programs__grid article) :where(p,li,small,label,span:not([aria-hidden="true"]),dd,dt){color:var(--read-muted)!important;text-shadow:none!important;opacity:1!important}
:where(.feature-card,.activity-item,.impact-card,.law-card,.contact-cards article,.organization-grid article,.contact-form-panel,.about-profile__statement,.memory-card,.memorial-card,.state-award-card,.tl-body,.home-direction,.home-programs__grid article) :where(h1,h2,h3,h4,strong){color:var(--read-wine)!important;text-shadow:none!important;opacity:1!important}
/* Links */
main a{color:#7d1122!important;text-decoration-thickness:2px!important;text-underline-offset:3px!important}
:where(.home-command,.about-command,.institution-hero,.page-hero,.pres-hero,.memory-hero,.contact-dialogue,.institution-cta__card,.cta-section) a{color:#f1d99d!important;text-decoration-color:#f1d99d!important}
/* Buttons keep readable labels */
:where(.btn-primary,.home-btn--wine,.about-btn--wine,.institution-button:not(.institution-button--light),button[type="submit"]){background:#7d1122!important;color:#fff!important;border-color:#7d1122!important;text-shadow:none!important}
:where(.btn-secondary,.home-btn--light,.about-btn--light,.institution-button--light){color:#5f0a18!important;background:#fff!important;border-color:#fff!important;text-shadow:none!important}
/* Form fields */
input,textarea,select{background:#fff!important;color:#302428!important;border-color:rgba(95,10,24,.28)!important;opacity:1!important;text-shadow:none!important}
input::placeholder,textarea::placeholder{color:#7b6c70!important;opacity:1!important}
.consent-row,.home-contact__consent{background:#fff4dc!important;color:#4c3d42!important;border-color:rgba(182,144,66,.32)!important}
.consent-row span,.home-contact__consent span{color:#4c3d42!important}
/* Footer */
footer,footer *{opacity:1!important;text-shadow:none!important} footer p,footer li,footer span,footer small{color:#f8eef0!important} footer h3,footer strong{color:#fff!important} footer a{color:#f1d99d!important}

/* ===== unified-footer.css ===== */
/* Unified footer: identical appearance on every page. */
footer{
  background:linear-gradient(180deg,#341218,#210d11)!important;
  border-top:4px solid #b69042!important;
  margin-top:78px!important;
  padding:50px 0 20px!important;
  color:#fff!important;
  box-shadow:none!important;
}
footer::before{display:none!important}
footer .footer-flag-line{
  display:block!important;height:6px!important;border-radius:99px!important;margin:0 0 26px!important;opacity:1!important;
  background:linear-gradient(90deg,#fff 0 33.33%,#0039a6 33.33% 66.66%,#d52b1e 66.66% 100%)!important;
}
footer .footer-grid{display:grid!important;grid-template-columns:1.2fr .8fr 1fr!important;gap:36px!important;align-items:start!important}
footer .footer-section h3{
  color:#fff!important;font:700 1.22rem/1.25 Georgia,serif!important;margin:0 0 14px!important;
  padding-bottom:10px!important;border-bottom:2px solid rgba(182,144,66,.65)!important;text-shadow:none!important;opacity:1!important
}
footer .footer-section p,footer .footer-section li{color:#e9dede!important;line-height:1.7!important;margin:0 0 10px!important;text-shadow:none!important;opacity:1!important}
footer .footer-section ul{margin:0!important;padding:0!important;list-style:none!important}
footer .footer-section strong{color:#fff!important}
footer .footer-section a{color:#f1d99d!important;text-decoration:none!important;transition:color .2s ease!important;text-shadow:none!important}
footer .footer-section a:hover{color:#fff!important;text-decoration:underline!important;text-underline-offset:3px!important}
footer .footer-bottom{
  margin-top:34px!important;padding-top:18px!important;border-top:1px solid rgba(255,255,255,.14)!important;
  text-align:center!important;color:#d8c9c9!important;font-size:.9rem!important;text-shadow:none!important;opacity:1!important
}
footer .footer-bottom a{color:#f1d99d!important}
@media(max-width:860px){footer .footer-grid{grid-template-columns:1fr!important;gap:26px!important}}

/* ===== visibility-safeguard-final.css ===== */
/* Final visibility safeguard: text must never be transparent or invisible. */
body:not(.accessibility-mode) :where(h1,h2,h3,h4,h5,h6,p,li,dd,dt,label,small,strong,em,td,th,figcaption,blockquote){
  opacity:1!important;
}
/* Keep intentional reveal/animation states working: they transition to 1 anyway, but never leave text stuck hidden after load. */
.loaded .reveal-patriotic,[data-reveal],[data-about-reveal],[data-institution-reveal]{
  opacity:1!important;
}
/* Decorative layers never sit above text */
.patriotic-layer,.anim-memory-stars,.anim-laurel-orbit,.anim-medal-salute,.anim-document-ribbons,.anim-signal-lines{
  pointer-events:none!important;z-index:0!important;
}
main,main section{position:relative;z-index:1}
/* Carousel text stays readable in every slide state */
.carousel-slide:not(.active) *{visibility:hidden!important}
.carousel-slide.active *{visibility:visible!important;opacity:1!important}
/* Focus visibility for accessibility */
:focus-visible{outline:3px solid #0039a6!important;outline-offset:2px!important}
/* Placeholders readable */
::placeholder{color:#7b6c70!important;opacity:1!important}
/* Selection readable */
::selection{background:#7d1122!important;color:#fff!important}
/* Honeypot anti-spam field: invisible to people, present for bots */
.hp-field{position:absolute!important;left:-9999px!important;top:-9999px!important;width:1px!important;height:1px!important;overflow:hidden!important;opacity:0!important;pointer-events:none!important}
/* Мягкая защита фото от перетаскивания/сохранения одним кликом */
img{-webkit-user-drag:none;user-drag:none;-webkit-touch-callout:none}

/* Выравнивание "голых" текстовых блоков в <main> (без .container-разметки):
   раньше параграфы сжимались до случайной ширины и уезжали влево вместо
   центрирования наравне с заголовками. */
.honor-wrap{max-width:920px!important;margin:32px auto!important;width:100%!important}
.honor-wrap p{max-width:100%!important;width:100%!important;text-align:left!important}
.merit-grid{max-width:1180px!important;margin:0 auto!important;display:grid!important;grid-template-columns:repeat(auto-fit,minmax(280px,1fr))!important;gap:22px!important}
/* Тот же баг "голого" текстового блока — теперь на .pres-narrative («Биография в деталях») */
body[data-page="president"] .pres-narrative{max-width:900px!important;margin:14px auto 0!important;width:100%!important;display:block!important}
body[data-page="president"] .pres-narrative p{max-width:100%!important;width:100%!important;text-align:left!important;float:none!important}

/* ==================== Триколор-индикатор прокрутки ==================== */
#pdScrollProgress{position:fixed;top:0;left:0;width:100%;height:4px;z-index:9999;background:rgba(0,0,0,.06);pointer-events:none}
#pdScrollProgress span{display:block;height:100%;width:0%;background:linear-gradient(90deg,#ffffff 0%,#ffffff 33%,#0039A6 33%,#0039A6 66%,#D52B1E 66%,#D52B1E 100%);box-shadow:0 0 10px rgba(165,125,34,.55);transition:width .12s linear}
.accessibility-mode #pdScrollProgress{display:none!important}
@media(prefers-reduced-motion:reduce){#pdScrollProgress span{transition:none}}

/* ==================== Мерцающая триколор-линия в подвале ==================== */
.footer-flag-line{position:relative;overflow:hidden}
.footer-flag-line:after{content:"";position:absolute;inset:0;background:linear-gradient(110deg,transparent,rgba(255,255,255,.55),transparent);transform:translateX(-130%);animation:footerFlagSheen 6s ease-in-out infinite}
@keyframes footerFlagSheen{0%,60%{transform:translateX(-130%)}90%,100%{transform:translateX(130%)}}
@media(prefers-reduced-motion:reduce){.footer-flag-line:after{animation:none!important}}

/* ==================== Три карточки главных памятников на Аллее памяти ==================== */
.memory-feature-stack{display:flex!important;flex-direction:column!important;gap:40px!important}
/* Единая высота и выравнивание фото во всех трёх карточках, на любом брейкпоинте */
.memory-feature-stack .memory-feature-card{width:100%!important;max-width:1080px!important;margin-inline:auto!important;box-sizing:border-box!important}
.memory-feature-stack .memory-feature-visual{display:flex!important;align-items:center!important;justify-content:center!important}
body[data-page="memory"] .memory-feature-stack .memory-feature-visual img{width:100%!important;height:auto!important;aspect-ratio:3/4!important;max-height:none!important;min-height:0!important;object-fit:cover!important;object-position:center!important;display:block!important}

/* ==================== Богаче фоновые декоративные частицы ==================== */
.anim-memory-stars span,.anim-laurel-orbit span,.anim-medal-salute span,.anim-signal-lines span{filter:drop-shadow(0 2px 6px rgba(165,125,34,.28))}
.anim-memory-stars span:nth-child(3n){transform:scale(1.3)}
.anim-laurel-orbit span:nth-child(4n){transform:scale(1.25) rotate(calc(var(--i)*22deg))}
