/* public/home-guide/home-guide.css */
/* стили для инфоблока */



/* ------ SSR-справочник главной страницы ------- */
.home-guide {
box-sizing: border-box;
width: 100%;
margin: 70px 0 60px;
padding: 54px 12px;
background: #242629;
color: #fff;
}
.home-guide__inner {
box-sizing: border-box;
width: min(1240px, 100%);
margin: 0 auto;
}
.home-guide__admin-edit {
box-sizing: border-box;
display: inline-flex;
align-items: center;
justify-content: center;
min-height: 32px;
margin: 0 0 18px;
padding: 8px 13px;
border: 1px solid #79dfd275;
border-radius: 999px;
background: #79dfd214;
color: #bffff8;
font-size: 12px;
font-weight: 700;
line-height: 1;
text-decoration: none;
letter-spacing: 0.03em;
transition: 0.16s ease;
}
.home-guide__admin-edit:hover {
background: #79dfd22e;
color: #fff;
transform: translateY(-1px);
}
.home-guide__admin-edit:focus-visible {
outline: 3px solid #79dfd2;
outline-offset: 3px;
}
.home-guide__header {
max-width: 820px;
margin: 0 auto 28px;
text-align: center;
}
.home-guide__eyebrow {
color: #ffffff85;
font-size: 12px;
font-weight: 100;
letter-spacing: 0.12em;
text-transform: uppercase;
margin: -10px 20px 7px 20px;
}
.home-guide__header h2 {
margin: 0 20px;
font-size: clamp(26px, 4vw, 40px);
font-weight: 600;
line-height: 1.15;
letter-spacing: -0.02em;
}
.home-guide__intro {
margin: 20px;
color: #ffffffb8;
font-size: 16px;
line-height: 1.6;
}
.home-guide__layout {
display: grid;
grid-template-columns: minmax(280px, 370px) minmax(0, 1fr);
gap: 18px;
align-items: stretch;
}
.home-guide__navigation, .home-guide__answers {
box-sizing: border-box;
border-radius: 22px;
background: #303238;
}
.home-guide__navigation {
padding: 14px;
}
.home-guide__themes {
display: grid;
gap: 2px;
}
.home-guide__accordion {
overflow: hidden;
border-radius: 8px;
background: #2b2d33;
}
.home-guide__accordion.is-open {
background: #272a30;
}
.home-guide__theme, .home-guide__question {
box-sizing: border-box;
width: 100%;
border: 0;
font: inherit;
text-align: left;
cursor: pointer;
transition: 0.18s ease;
}
.home-guide__theme {
display: flex;
align-items: center;
justify-content: space-between;
gap: 14px;
padding: 14px 15px;
border-radius: 8px;
background: #3a3d44;
color: #ffffffc2;
font-size: 14px;
font-weight: 600;
line-height: 1.3;
transition: 0.5s;
}
.home-guide__theme:hover, .home-guide__theme.is-active {
background: #6b7283;
color: #ffffff;
transition: 0s;
}
.home-guide__theme-icon {
flex: 0 0 auto;
font-size: 42px;
line-height: 0;
transition: 0.18s ease;
font-weight: 100;
position: relative;
top: -5px;
}
.home-guide__theme[aria-expanded="true"] .home-guide__theme-icon {
transform: rotate(90deg);
top: 1px;
}
.home-guide__theme:focus-visible, .home-guide__question:focus-visible {
outline: 3px solid #7ae4d3;
outline-offset: 2px;
}
.home-guide__question-group {
padding: 8px 4px 6px;
border-top: 1px solid #ffffff0f;
}
.home-guide__questions {
display: grid;
gap: 0px;
}
.home-guide__question {
position: relative;
padding: 10px 30px 10px 20px;
border-radius: 7px;
background: transparent;
color: #ffffff52;
font-size: 15px;
line-height: 1.3;
transition: 1s;
}
.home-guide__question::after {
content: "›";
position: absolute;
top: 50%;
right: 13px;
transform: translateY(-50%);
color: #ffffff47;
font-size: 22px;
line-height: 1;
}
.home-guide__question:hover, .home-guide__question.is-active {
background: hsl(220 11% 23% / 1);
color: #fff;
transition: 0s;
}
.home-guide__question.is-active::after {
color: #fff;
transform: translateY(-62%) translateX(4px);
font-size: 44px;
}
.home-guide__answers {
padding: clamp(24px, 5vw, 40px);
}
.home-guide__answer {
box-sizing: border-box;
}
.home-guide__answer + .home-guide__answer {
margin-top: 32px;
padding-top: 32px;
border-top: 1px solid #ffffff14;
}
.home-guide__answer-topic {
margin: -10px 0 10px 0;
color: #ffffff50;
font-size: 15px;
}
.home-guide__answer h3 {
max-width: 760px;
margin: 0;
color: #fff;
font-size: clamp(24px, 3vw, 34px);
font-weight: 500;
line-height: 1.2;
}
.home-guide__answer > p:last-child {
max-width: 760px;
margin-top: 18px;
color: rgba(255, 255, 255, 0.74);
font-size: 17px;
line-height: 1.7;
}
/* Без JavaScript все вопросы и ответы остаются видимыми.
После улучшения JavaScript показывает только выбранные элементы. */
.home-guide.is-enhanced .home-guide__question-group[hidden], .home-guide.is-enhanced .home-guide__answer[hidden] {
display: none;
}
.home-guide.is-enhanced .home-guide__answer + .home-guide__answer {
margin-top: 0;
padding-top: 0;
border-top: 0;
}
@media (max-width: 760px) {
.home-guide {
margin: 52px 0 42px;
padding: 38px 10px;
}
.home-guide__header {
margin-bottom: 22px;
text-align: left;
}
.home-guide__intro {
font-size: 15px;
}
.home-guide__layout {
grid-template-columns: 1fr;
gap: 12px;
}
.home-guide__navigation {
padding: 10px;
overflow: hidden;
}
.home-guide__theme {
font-size: 14px;
}
.home-guide__question-group {
padding: 8px 0 4px;
}
.home-guide__questions {
display: flex;
gap: 8px;
overflow-x: auto;
overscroll-behavior-inline: contain;
scroll-snap-type: x proximity;
scrollbar-width: thin;
-webkit-overflow-scrolling: touch;
padding: 0 2px 6px;
}
.home-guide__question {
flex: 0 0 min(48vw, 160px);
width: auto;
scroll-snap-align: start;
}
.home-guide__answers {
min-height: 300px;
padding: 26px 20px 30px;
}
.home-guide__answer h3 {
font-size: 25px;
}
.home-guide__answer > p:last-child {
font-size: 16px;
line-height: 1.6;
}
}
@media (prefers-reduced-motion: reduce) {
.home-guide__theme, .home-guide__question, .home-guide__theme-icon {
transition: none;
}
}





/* ------ режим inline-редактирования SSR-справочника ------- */
.home-guide-editor-active .home-guide {
margin-top: 94px;
}
.home-guide-editor-toolbar {
position: fixed;
left: 50%;
top: 10px;
z-index: 90;
box-sizing: border-box;
width: min(760px, calc(100vw - 20px));
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: center;
gap: 10px;
padding: 10px 14px;
border: 1px solid #79dfd261;
border-radius: 999px;
background: #16191eeb;
color: #fff;
box-shadow: 0 14px 40px #00000057;
backdrop-filter: blur(18px);
transform: translateX(-50%);
font-size: 13px;
line-height: 1.25;
}
.home-guide-editor-toolbar strong {
color: #79dfd2;
font-weight: 700;
}
.home-guide-editor-toolbar span {
color: #ffffffc7;
}
.home-guide-editor-toolbar a {
color: #071416;
background: #79dfd2;
border-radius: 999px;
padding: 7px 12px;
font-weight: 700;
text-decoration: none;
}
.home-guide-editor-notice {
position: fixed;
right: 12px;
bottom: 12px;
z-index: 91;
max-width: min(420px, calc(100vw - 24px));
padding: 12px 14px;
border-radius: 14px;
background: #14181ef0;
color: #fff;
box-shadow: 0 14px 40px #0000005c;
font-size: 13px;
line-height: 1.35;
}
.home-guide-editor-notice[data-type="success"] {
border: 1px solid #79dfd275;
}
.home-guide-editor-notice[data-type="error"] {
border: 1px solid #f8717199;
}
.home-guide--editor-ready .home-guide-editable {
position: relative;
cursor: text;
border-radius: 8px;
outline: 1px dashed #79dfd273;
outline-offset: 4px;
transition: 0.16s ease;
}
.home-guide--editor-ready .home-guide-editable:hover, .home-guide--editor-ready .home-guide-editable:focus-visible {
background: #79dfd214;
outline-color: #79dfd2;
}
.home-guide-editor-form {
box-sizing: border-box;
width: 100%;
margin: 10px 0 0;
padding: 12px;
border-radius: 14px;
background: #12151ab8;
}
.home-guide-editor-field {
box-sizing: border-box;
width: 100%;
min-height: 42px;
padding: 11px 12px;
border: 1px solid #ffffff33;
border-radius: 10px;
outline: 0;
background: #fff;
color: #101318;
font: inherit;
line-height: 1.45;
}
textarea.home-guide-editor-field {
resize: vertical;
min-height: 116px;
}
.home-guide-editor-field:focus {
border-color: #79dfd2;
box-shadow: 0 0 0 3px #79dfd238;
}
.home-guide-editor-actions {
display: flex;
flex-wrap: wrap;
gap: 8px;
margin-top: 10px;
}
.home-guide-editor-actions button {
border: 0;
border-radius: 999px;
padding: 8px 13px;
font-size: 13px;
font-weight: 700;
cursor: pointer;
}
.home-guide-editor-save {
background: #79dfd2;
color: #071416;
}
.home-guide-editor-cancel {
background: #ffffff1f;
color: #fff;
}
.home-guide-editor-actions button:disabled, .home-guide-editor-form.is-saving .home-guide-editor-field {
opacity: 0.65;
cursor: wait;
}
.home-guide-editor-error {
margin-top: 9px;
color: #ff9b9b;
font-size: 13px;
line-height: 1.35;
}
@media (max-width: 760px) {
.home-guide-editor-toolbar {
top: 8px;
border-radius: 18px;
}
.home-guide-editor-toolbar span {
display: none;
}
.home-guide-editor-active .home-guide {
margin-top: 86px;
}
}
