/* Общие стили оформления поверх адаптивной сетки. */
:root{--hope-navy:#172d66;--hope-blue:#244689;--hope-link:#1e4389;--hope-text:#17233e;--hope-muted:#627087;--hope-soft:#f0f5fc;--hope-border:#e3e9f2;--hope-radius:15px}
html{scroll-behavior:smooth}
body{font-family:Geometria,Arial,sans-serif;color:var(--hope-text);font-size:16px;line-height:1.55;background:#fff}
.wrapper{width:calc(100% - 64px);max-width:1320px;margin-left:auto;margin-right:auto;box-sizing:border-box}
a,a:link,a:visited{color:var(--hope-link)}
a:focus-visible,button:focus-visible,input:focus-visible{outline:3px solid #6ea4ff;outline-offset:3px}
#top-header{font-size:12px;color:#3d5585;padding:7px 0}
#top-header a{color:#35538d}
header{background:var(--hope-navy);padding:18px 0;color:#fff;font-size:15px}
header .middle-header,header div.brend{max-width:1320px}
header div.brend{align-items:center;gap:24px}
.brend__logo a,.brend__logo a:link{font-size:18px;font-weight:600;line-height:1.3;color:#fff}
.brend__logo img{max-width:60px;object-fit:contain}
#header_menu{padding-top:0}
#header_menu nav>ul{align-items:center;gap:12px}
#header_menu nav>ul>li>a,#header_menu nav>ul>li>span{border-radius:8px;padding:11px 14px;color:#fff;transition:background .2s}
#header_menu nav>ul>li>a:hover,#header_menu nav>ul>li>a.is-active{background:#36598f}
#header_menu ul ul{background:var(--hope-navy);border-radius:8px;box-shadow:0 12px 28px #10224333}
.phone_header{font-weight:600;white-space:nowrap;font-size:15px}
footer{background:var(--hope-navy);padding:45px 0;font-size:14px;line-height:1.8}
footer a,footer a:link,footer a:visited{color:#fff}
footer>.wrapper>div{max-width:none;gap:25px}
footer #block-footer2{text-align:left}
/* Carousel takes the place of the original static photo; keep Drupal topcontent editable. */
.hope-hero-section{margin-top:18px;margin-bottom:24px}
.hope-carousel{height:390px;overflow:hidden;border-radius:var(--hope-radius);position:relative;background:var(--hope-navy);box-shadow:0 8px 28px rgba(12,34,80,.09)}
.hope-slide{position:absolute;inset:0;opacity:0;visibility:hidden;pointer-events:none;transition:opacity .55s ease,visibility .55s ease;background-repeat:no-repeat;background-position:center;background-size:cover}
.hope-slide.is-current{opacity:1;visibility:visible;pointer-events:auto;z-index:1}
.hope-slide__content,.hope-slide__content.topcontent{background:none!important;padding:0!important;margin:0!important;position:relative;min-height:100%;display:flex;align-items:center;color:#fff}
.hope-slide__inner{margin:0 86px;max-width:720px}
.hope-slide__inner h1,.hope-slide__inner h2,.hope-slide__inner #block-siberiannewmilleniumschoolshkolaschastlivogodetstva h2{color:#fff;font-size:clamp(32px,3.4vw,49px)!important;line-height:1.13;font-weight:700;letter-spacing:-.025em;margin:0 0 24px!important;max-width:720px}
.hope-slide__inner p{font-size:18px;color:#f1f5fc;max-width:570px;margin:0 0 23px}
.hope-slide__inner .button,.hope-slide__inner a.button,.hope-slide__inner #edit-actions-submit{background:#2452a2;color:#fff;border:1px solid #b7cef3;border-radius:9px;padding:15px 25px;font-size:15px;font-weight:600;display:inline-flex;align-items:center;min-height:22px;width:auto;box-shadow:0 5px 14px #071c4255}
.hope-slide__inner .button:hover,.hope-slide__inner a.button:hover{background:#fff;color:var(--hope-navy);padding:15px 25px}
.hope-carousel__arrow{position:absolute;z-index:5;top:50%;transform:translateY(-50%);width:42px;height:42px;border:0;border-radius:50%;background:rgba(255,255,255,.96);color:var(--hope-navy);cursor:pointer;font-family:Arial,sans-serif;font-size:33px;line-height:34px;display:flex;justify-content:center;align-items:center;box-shadow:0 3px 12px #0002;transition:transform .2s,background .2s}
.hope-carousel__arrow:hover{background:#dbe8ff;transform:translateY(-50%) scale(1.07)}
.hope-carousel__arrow--prev{left:17px}.hope-carousel__arrow--next{right:17px}
.hope-carousel__dots{position:absolute;z-index:6;bottom:18px;left:50%;transform:translateX(-50%);display:flex;gap:9px;align-items:center}
.hope-carousel__dots button{height:10px;width:10px;border:1px solid white;border-radius:50%;padding:0;background:#ffffff80;cursor:pointer;transition:width .2s,background .2s}
.hope-carousel__dots button.is-current{background:#fff;width:25px;border-radius:10px}
.hope-benefits{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));background:linear-gradient(110deg,#f5f8fd,#eaf1fb);border-radius:13px;margin-top:16px;padding:14px 22px;gap:0}
.hope-benefit{display:flex;align-items:center;justify-content:center;gap:14px;color:#203153;font-size:13px;line-height:1.35;min-height:42px;padding:2px 14px;border-right:1px solid #cbd8eb}
.hope-benefit:last-child{border-right:0}
.hope-benefit__icon{color:#2a5cb8;font-family:Arial,sans-serif;font-size:37px;font-weight:400;line-height:1;flex-shrink:0}
/* News cards are driven by the existing Drupal Views output. */
main.wrapper{margin-top:24px;margin-bottom:50px}
main.wrapper h2,.main-content h2,.main_teacher>h2{font-size:29px;line-height:1.3;color:var(--hope-text)}
.main-news{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:20px;font-size:13px;align-items:stretch}
.main-news .views-row{max-width:none;width:auto;min-width:0;display:flex;flex-direction:column;overflow:hidden;background:#fff;border:1px solid var(--hope-border);border-radius:12px;box-shadow:0 2px 10px rgba(30,50,93,.035);padding-bottom:16px;transition:box-shadow .25s,transform .25s}
.main-news .views-row:hover{transform:translateY(-3px);box-shadow:0 10px 24px #102d6020}
.main-news .views-field-field-izobrazhenie img{width:100%;height:152px;object-fit:cover;display:block}
.main-news .views-row>.views-field:not(.views-field-field-izobrazhenie),.main-news .views-row>p{margin-left:14px;margin-right:14px}
.main-news .views-field-title{font-size:14px;line-height:1.45;margin-top:5px;margin-bottom:9px}
.main-news .views-field-title a,.main-news .views-field-title a:link{color:#182543}
.main-news .views-row p{font-size:12px;line-height:1.55}
.main-news p.news-date{border:0;background:var(--hope-navy);color:#fff;border-radius:100px;padding:3px 8px;font-size:10px;margin-top:10px;margin-bottom:4px}
.main-news .pager{grid-column:1/-1;min-width:0;margin-top:0}
.main-news .pager__items{padding:0;gap:7px}
.main-news .pager__items li{border:1px solid #c2d0e6;border-radius:6px;overflow:hidden}
.main-news .pager__items li.is-active{background:var(--hope-navy);border-color:var(--hope-navy)}
.main-news .pager__items li>a{width:32px;padding:5px 0}
/* Staff section */
.main_teacher{margin-top:45px;overflow:hidden}
.main_teacher>div:nth-child(2){gap:18px;align-items:stretch}
.main_teacher>div:nth-child(2)>div:not(.arrows_navigation){min-width:0;flex:1;box-sizing:border-box}
.main_teacher>div:nth-child(2)>div>img{max-width:100%;height:210px;object-fit:contain;object-position:center bottom;background:#f1f5fb;border-radius:14px}
.main_teacher h2{margin:12px 0 0 0;font-size:17px;color:var(--hope-text)}
.main_teacher p{margin:5px 0 0 0;font-size:14px;color:var(--hope-muted)}
.main_teacher>a{font-size:14px;width:auto;min-width:130px;background-size:20px;padding-right:22px;color:var(--hope-link)}
.arrows_navigation{z-index:2;pointer-events:none;left:0;right:0}
.arrows_navigation>*{pointer-events:auto;cursor:pointer}
/* Enrollment form, retaining actual Webform submission and validation. */
.formpage{scroll-margin-top:30px;margin:34px 0 26px}
.formpage>.wrapper{background:#eef4fc;border-radius:16px;padding:26px 36px;box-sizing:border-box}
.formpage h2,.formpage h3{font-size:23px;line-height:1.25;margin:0 0 12px;color:var(--hope-text)}
.formpage form{display:flex;flex-wrap:wrap;align-items:flex-end;column-gap:18px;row-gap:14px;font-size:14px}
.formpage form .form-item{flex:1 1 180px;min-width:160px;margin:0}
.formpage form .form-actions{flex:0 0 auto;margin:0}
.formpage form input:not([type=checkbox]):not([type=radio]):not([type=submit]),.formpage form textarea,.formpage form select{box-sizing:border-box;width:100%;border:1px solid #cfdaea;border-radius:7px;padding:12px 14px;font-size:14px;background:white;color:#263349}
.formpage form label{display:block;font-size:13px;font-weight:500;margin-bottom:4px}
.formpage input[type=submit],.formpage .button{padding:12px 24px;border-radius:7px;border:1px solid var(--hope-navy);background:var(--hope-navy);color:#fff;font-size:14px}
.formpage form .form-type-checkbox{flex:1 1 100%}
.formpage form .form-type-checkbox label{display:inline;font-size:12px}
.formpage form input[type=checkbox]{width:auto;accent-color:var(--hope-navy)}
.formpage .form--zayavka--footer{color:var(--hope-muted);font-size:12px}
/* Old pages retain their own structures; adjust generic heading and controls. */
.button,#edit-actions-submit,#edit-actions-submit--2,#edit-actions-submit--3,#edit-actions-submit--4{background:var(--hope-navy);border-color:var(--hope-navy);border-radius:7px;font-size:15px;padding:15px 25px}
.button:hover,#edit-actions-submit:hover{padding:15px 25px;border-color:var(--hope-navy)}
.arrow_go_to_top{opacity:.7;transform:scale(.65);transform-origin:bottom right}
@media(max-width:1100px){.wrapper{width:calc(100% - 40px)}header div.brend{gap:12px}.phone_header{font-size:13px}.main-news{gap:14px}.hope-carousel{height:360px}.hope-slide__inner{margin:0 68px}}
@media(max-width:850px){.main-news{grid-template-columns:repeat(2,minmax(0,1fr))}.hope-benefits{grid-template-columns:repeat(2,minmax(0,1fr));row-gap:14px}.hope-benefit:nth-child(2){border-right:0}.hope-slide__inner h1,.hope-slide__inner h2,.hope-slide__inner #block-siberiannewmilleniumschoolshkolaschastlivogodetstva h2{font-size:clamp(27px,5.4vw,42px)!important}.hope-carousel{height:350px}.main_teacher>div:nth-child(2)>div>img{height:165px}}
@media(max-width:600px){.wrapper{width:calc(100% - 28px)}header{padding:11px 0}.brend__logo a,.brend__logo a:link{font-size:14px}.brend__logo img{max-width:42px}.hope-hero-section{margin-top:12px}.hope-carousel{height:440px;border-radius:11px}.hope-slide--building{background-position:59% center}.hope-slide__inner{margin:0 44px}.hope-slide__inner h1,.hope-slide__inner h2,.hope-slide__inner #block-siberiannewmilleniumschoolshkolaschastlivogodetstva h2{font-size:29px!important;line-height:1.18}.hope-slide__inner p{font-size:14px}.hope-carousel__arrow{width:31px;height:31px;font-size:25px}.hope-carousel__arrow--prev{left:7px}.hope-carousel__arrow--next{right:7px}.hope-benefits{padding:12px 5px;gap:12px}.hope-benefit{font-size:11px;gap:6px;padding:4px;border-right:0}.hope-benefit__icon{font-size:27px}.main-news{gap:12px}.main-news .views-field-field-izobrazhenie img{height:120px}.main-news .views-field-title{font-size:12px}.main-news .views-row>.views-field:not(.views-field-field-izobrazhenie),.main-news .views-row>p{margin-left:10px;margin-right:10px}.main-news .views-row p{font-size:11px}.main_teacher>div:nth-child(2){gap:10px}.main_teacher>div:nth-child(2)>div>img{height:125px}.main_teacher h2{font-size:13px}.main_teacher p{font-size:11px}.formpage>.wrapper{padding:24px 18px}footer>.wrapper>div{display:block}}
@media(max-width:380px){.hope-carousel{height:420px}.hope-slide__inner h1,.hope-slide__inner h2,.hope-slide__inner #block-siberiannewmilleniumschoolshkolaschastlivogodetstva h2{font-size:25px!important}.hope-benefit{font-size:10px}.main-news{grid-template-columns:1fr}.main-news .views-field-field-izobrazhenie img{height:190px}}
@media(prefers-reduced-motion:reduce){.hope-slide,.hope-carousel__arrow,.hope-carousel__dots button{transition:none}html{scroll-behavior:auto}}

/* Дополнения самостоятельной современной темы */
.hope-benefit__icon{font-family:system-ui,Segoe UI Emoji,sans-serif;font-size:29px;filter:grayscale(1);opacity:.9}
.hope-carousel__dots button{min-width:10px;min-height:10px}
.hope-carousel__arrow:focus-visible,.hope-carousel__dots button:focus-visible{outline:3px solid #fff;outline-offset:3px}
@media (hover:hover){.main-news .views-row:hover{border-color:#b8cbe8}}

/* === Top utility bar: Drupal CMS menu + accessibility block ===
   Style the region structure rather than theme-specific block IDs. */
#top-header {
  width: 100%;
  padding: 9px 0;
  margin: 0;
  color: #38517b;
  font-size: 12px;
  line-height: 1.4;
}
#top-header > div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  column-gap: 24px;
  row-gap: 8px;
  width: 100%;
  min-width: 0;
}
#top-header > div > nav {
  display: block;
  flex: 1 1 auto;
  min-width: 0;
  width: auto;
  margin: 0;
  padding: 0;
}
#top-header > div > nav > ul {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 5px 22px;
  list-style: none;
  margin: 0;
  padding: 0;
}
#top-header > div > nav > ul > li {
  display: block;
  width: auto;
  float: none;
  margin: 0;
  padding: 0;
  list-style: none;
  background: none;
}
#top-header a,
#top-header a:link,
#top-header a:visited {
  color: #38517b;
  font-size: inherit;
  text-decoration: none;
  transition: color .2s ease;
}
#top-header a:hover,
#top-header a:focus-visible {
  color: #1c55ae;
  text-decoration: underline;
  text-underline-offset: 3px;
}
#top-header > div > div[id^="block-"] {
  flex: 0 0 auto;
  width: auto;
  margin: 0 0 0 auto;
  padding: 0;
}
#top-header > div > div[id^="block-"] > div,
#top-header > div > div[id^="block-"] p {
  margin: 0;
  padding: 0;
}
#top-header .bvi-open,
#top-header .bvi-open:link,
#top-header .bvi-open:visited {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  font-weight: 500;
}
#top-header .bvi-open::before {
  content: "";
  display: inline-block;
  flex: none;
  width: 17px;
  height: 17px;
  background: url('../img/eye.svg') center / contain no-repeat;
}
@media (max-width: 760px) {
  #top-header { padding: 10px 0; font-size: 11px; }
  #top-header > div { gap: 9px 14px; align-items: flex-start; }
  #top-header > div > nav { flex-basis: 100%; }
  #top-header > div > nav > ul { gap: 7px 15px; }
  #top-header > div > div[id^="block-"] { margin-left: 0; }
}
@media (max-width: 400px) {
  #top-header > div > nav > ul { column-gap: 12px; }
  #top-header .bvi-open { white-space: normal; }
}



/* Добавьте в КОНЕЦ css/redesign.css — переопределяет старые стили блока. */
.hope-benefits {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  padding: 0;
  margin: 26px 0 36px;
  background: transparent;
  border-radius: 0;
}
.hope-benefit {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  gap: 0;
  min-width: 0;
  min-height: 0;
  padding: 20px 17px 23px;
  border: 1px solid #e3eaf5;
  border-radius: 20px;
  background: linear-gradient(165deg, #f4f8ff 0%, #fff 75%);
  box-shadow: 0 8px 28px rgba(21, 48, 104, .06);
  text-align: center;
  color: #203153;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.hope-benefit:last-child { border-right: 1px solid #e3eaf5; }
.hope-benefit__art {
  display: grid;
  place-items: center;
  width: 100%;
  height: 170px;
  margin-bottom: 9px;
}
.hope-benefit__art img {
  display: block;
  max-width: 100%;
  width: 185px;
  height: 165px;
  object-fit: contain;
}
.hope-benefit__body { width: 100%; }
.hope-benefit__body h3 {
  margin: 0 0 9px;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.3;
  color: #192b53;
}
.hope-benefit__body p {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: #60718f;
}
@media (hover: hover) {
  .hope-benefit:hover {
    transform: translateY(-5px);
    border-color: #bfd1ed;
    box-shadow: 0 16px 38px rgba(21, 48, 104, .11);
  }
}
@media (max-width: 1000px) {
  .hope-benefits { gap: 12px; }
  .hope-benefit { padding: 16px 11px 18px; }
  .hope-benefit__art { height: 135px; }
  .hope-benefit__art img { height: 130px; width: 150px; }
  .hope-benefit__body h3 { font-size: 15px; }
  .hope-benefit__body p { font-size: 12px; }
}
@media (max-width: 760px) {
  .hope-benefits { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
  .hope-benefit { border-right: 1px solid #e3eaf5; }
  .hope-benefit:nth-child(2) { border-right: 1px solid #e3eaf5; }
}
@media (max-width: 420px) {
  .hope-benefits { gap: 9px; }
  .hope-benefit { padding: 12px 8px 16px; border-radius: 15px; }
  .hope-benefit__art { height: 114px; margin-bottom: 5px; }
  .hope-benefit__art img { width: 126px; height: 110px; }
  .hope-benefit__body h3 { font-size: 13px; margin-bottom: 7px; }
  .hope-benefit__body p { font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  .hope-benefit { transition: none; }
}



/* Педагогический состав — вариант как на утверждённом мокапе.
   УДАЛИТЕ предыдущие правила .hope-teachers / .hope-teacher перед подключением. */
/* Если Drupal выводит заголовок блока отдельно, скрываем ТОЛЬКО его.
   Заголовок внутри нового HTML остаётся видимым. */
.block:has(.hope-teachers) > h2,
.block:has(.hope-teachers) > .block__title,
[id^="block-"]:has(.hope-teachers) > h2,
[id^="block-"]:has(.hope-teachers) > .block__title { display: none !important; }

.hope-teachers, .hope-teachers * {box-sizing:border-box}
.hope-teachers {max-width:1320px; width:100%; margin:25px auto 34px; padding:0; color:#17233e; background:transparent}
.hope-teachers__heading {display:flex; align-items:center; justify-content:space-between; gap:16px; margin:0 0 27px}
.hope-teachers__heading h2 {margin:0!important; padding:0!important; font-size:clamp(25px,2.1vw,32px)!important; line-height:1.2; color:#17233e; font-weight:600}
.hope-teachers__all {font-size:15px; color:#203a80!important; text-decoration:none!important; white-space:nowrap; display:inline-flex; gap:10px; align-items:center}
.hope-teachers__all:hover {color:#5083bf!important}
.hope-teachers__all span {font-size:24px; line-height:1}
.hope-teachers__list {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:30px;overflow:visible; padding:0; margin:0}
.hope-teachers .hope-teacher {display:grid; grid-template-columns:minmax(0,1.15fr) minmax(0,.85fr); gap:20px; align-items:start; min-width:0; margin:0; padding:0; background:none; box-shadow:none; border:0; transform:none}
.hope-teachers .hope-teacher:hover {box-shadow:none;transform:none}
/* Именно здесь формируем эффект "люди выше блока":
   подложка начинается на 34px ниже верхней точки изображения,
   PNG вырастает поверх подложки и опирается на её нижний край. */
.hope-teachers .hope-teacher__photo {position:relative; height:190px; margin-top:34px; border-radius:22px; background:#f0f3f8; overflow:visible; min-width:0}
.hope-teachers .hope-teacher__photo img {position:absolute; z-index:1; left:50%; bottom:0; transform:translateX(-50%); display:block; width:100%; height:226px; max-width:none; max-height:none; object-fit:contain; object-position:center bottom; margin:0; padding:0; border:0; background:none; border-radius:0}
.hope-teachers .hope-teacher__content {min-width:0; padding-top:51px}
.hope-teachers .hope-teacher__content h3 {font-size:clamp(15px,1.24vw,18px); line-height:1.32; font-weight:600; color:#17233e; margin:0!important; padding:0; overflow-wrap:normal; word-break:normal}
.hope-teachers .hope-teacher__line {display:block; width:64px; height:2px; background:#85b8ed; margin:13px 0 12px}
.hope-teachers .hope-teacher__content p {margin:0!important; color:#455064; font-size:clamp(13px,1.12vw,16px); line-height:1.45}
.hope-teachers__controls {display:none}
@media(max-width:1100px){.hope-teachers__list{gap:20px}.hope-teachers .hope-teacher{gap:12px}.hope-teachers .hope-teacher__photo{height:170px}.hope-teachers .hope-teacher__photo img{height:207px}.hope-teachers .hope-teacher__content{padding-top:44px}}
@media(max-width:820px){.hope-teachers__list{grid-template-columns:repeat(2,minmax(0,1fr));row-gap:28px}.hope-teachers .hope-teacher:last-child{max-width:calc(50% - 10px); grid-column:1/-1}}
@media(max-width:620px){.hope-teachers{margin:18px auto 30px}.hope-teachers__heading{margin-bottom:18px}.hope-teachers__heading h2{font-size:23px!important}.hope-teachers__all{font-size:13px}.hope-teachers__list{display:flex;overflow-x:auto;overflow-y:hidden;scroll-snap-type:x mandatory;gap:18px;scrollbar-width:none;padding:0 1px 12px}.hope-teachers__list::-webkit-scrollbar{display:none}.hope-teachers .hope-teacher,.hope-teachers .hope-teacher:last-child{flex:0 0 min(95%,400px);max-width:none;grid-template-columns:52% minmax(0,1fr);gap:14px;scroll-snap-align:start}.hope-teachers .hope-teacher__photo{height:176px;margin-top:30px}.hope-teachers .hope-teacher__photo img{height:206px}.hope-teachers .hope-teacher__content{padding-top:42px}.hope-teachers .hope-teacher__content h3{font-size:15px}.hope-teachers .hope-teacher__content p{font-size:13px}.hope-teachers__controls{display:flex;justify-content:center;gap:12px;margin-top:10px}.hope-teachers__arrow{display:inline-flex;align-items:center;justify-content:center;width:42px;height:42px;border-radius:50%;border:1px solid #c8d4e9;background:#fff;color:#203a80;font-size:22px;cursor:pointer}.hope-teachers__arrow:hover{background:#203a80;color:#fff}}
@media(prefers-reduced-motion:reduce){.hope-teachers__list{scroll-behavior:auto}}