/* === Правки по ТЗ (WGBG). Подключается из template-parts/header-menu.php === */

/* H1. Десктоп: меню в строку, выпадашки по hover/focus, бургер только на мобилке */
@media (min-width: 1280px) {
    .header-menu {
        display: flex !important;           /* JS прячет меню инлайн-стилем — перебиваем */
        position: static; margin: 0 0 0 auto; padding: 0;
        background: none; border: 0; border-radius: 0; max-width: none; width: auto; height: auto;
    }
    .header-menu__list { flex-direction: row; align-items: center; flex-wrap: nowrap; gap: 20px; }
    .header-menu__list-item + .header-menu__list-item { margin-top: 0; }
    .header-menu__list-item { padding: 20px 0; }
    .header-menu__list-item-header { display: flex; align-items: center; white-space: nowrap; }
    .header-menu__list-link { font-size: 13px; line-height: 18px; }
    .header-menu__dropdown {
        display: none !important;
        position: absolute; top: 100%; left: -20px; z-index: 30;
        width: max-content; min-width: 220px; margin: 0; padding: 16px 20px;
        background: #fff; border: 1px solid #e8ded3; border-radius: 10px;
        box-shadow: 0 12px 30px rgba(56, 83, 93, .12);
    }
    .header-menu__list-item:hover > .header-menu__dropdown,
    .header-menu__list-item:focus-within > .header-menu__dropdown { display: block !important; }
    .header-menu__list-item:hover .header-menu__list-item-arrow,
    .header-menu__list-item:focus-within .header-menu__list-item-arrow { transform: rotate(0deg); }
    .header-menu__open { display: none; }
    .header-lang { margin-left: 28px; }

    [dir=rtl] .header-menu { margin: 0 auto 0 0; }
    [dir=rtl] .header-menu__dropdown { left: auto; right: -20px; }
    [dir=rtl] .header-lang { margin-left: 0; margin-right: 28px; }
}
@media (min-width: 1440px) {
    .header-menu__list { gap: 28px; }
    .header-menu__list-link { font-size: 14px; }
}

/* H1 доработка: шапка в одну строку, длинные пункты — в 2 строки, правая выпадашка не вылезает */
@media (min-width: 1280px) {
    .header__container { flex-wrap: nowrap; }
    .header-logo { flex-shrink: 0; }
    .header-menu__list-item-header { white-space: normal; }
    .header-menu__list-link { display: inline-block; max-width: 200px; }
    .header-menu__list-item:last-child .header-menu__dropdown { left: auto; right: -20px; }
    [dir=rtl] .header-menu__list-item:last-child .header-menu__dropdown { right: auto; left: -20px; }
    .header-socials { flex-shrink: 0; }
}
@media (min-width: 1280px) and (max-width: 1439px) {
    .header-socials { margin-left: 20px; }
    .header-socials__item { width: 30px; height: 30px; }
    .header-socials__item + .header-socials__item { margin-left: 10px; }
    .header-menu__list { gap: 16px; }
}

/* H3. Текущий язык в переключателе */
.header-lang__item_active .header-lang__item-link { color: #9e4a33; }

/* H4. Футер: 4 колонки */
.footer-cols { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; padding: 40px 0; }
.footer-cols__title { color: #fff; opacity: .6; text-transform: uppercase; letter-spacing: .06em; font-size: 13px; font-weight: 600; margin: 0 0 18px; }
.footer-cols__list { list-style: none; margin: 0; padding: 0; }
.footer-cols__item { margin: 0 0 12px; }
.footer-cols__link { color: #fff; font-size: 16px; line-height: 1.4; text-decoration: none; transition: color .3s; }
.footer-cols__link:hover, .footer-cols__link:focus-visible { color: #e8ded3; text-decoration: underline; }
.footer-cols__link.current { opacity: .7; }
.footer-cols__link_accent { font-weight: 600; border-bottom: 1px solid currentColor; }
.footer-bottom { padding-bottom: 96px; }  /* место под чат-виджет */
@media (max-width: 767px) { .footer-cols { grid-template-columns: 1fr 1fr; gap: 24px; padding: 32px 0; } }
[dir=rtl] .footer-cols { direction: rtl; }

/* H5. Дубли из нижней строки футера (есть в колонке Legal): кнопка «Выбор недвижимости», Privacy, Certificates */
.footer-bottom__col:nth-child(3), .footer-bottom__col:nth-child(5), .footer-bottom__col:nth-child(6) { display: none; }

/* footer-cols-mobile-top: кнопка «наверх» не перекрывает колонки */
@media (max-width: 767px) { .footer-cols { padding-top: 72px; } }

/* I1. Пагинация News */
.news-pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 32px 0 0; }
.news-pagination__link, .news-pagination__gap { min-width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; padding: 0 10px; border-radius: 6px; color: #38535d; font-weight: 600; text-decoration: none; }
.news-pagination__link { border: 1px solid #e8ded3; transition: .3s; }
.news-pagination__link:hover { border-color: #9e4a33; color: #9e4a33; }
.news-pagination__link_current { background: #38535d; border-color: #38535d; color: #fff; }

/* I2. CTA «Get a Consultation» */
.header-cta { display: inline-flex; align-items: center; justify-content: center; margin-top: 30px; padding: 12px 20px; border-radius: 4px; background: #9e4a33; color: #fff; font-weight: 700; font-size: 13px; line-height: 18px; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; text-decoration: none; transition: .3s; }
.header-cta:hover, .header-cta:focus-visible { background: #38535d; color: #fff; }
@media (min-width: 1280px) {
    .header-cta { margin: 0 0 0 20px; padding: 10px 16px; }
    [dir=rtl] .header-cta { margin: 0 20px 0 0; }
}

/* I2 доработка: CTA не растягивается, строка влезает на 1280–1439 */
@media (min-width:1280px){
  .header-cta{align-self:center}
  .header-menu{margin-left:24px}
  .header-menu__list-item{flex-shrink:0}
}
@media (min-width:1280px) and (max-width:1439px){
  .header-menu__list{gap:14px}
  .header-menu__list-link{font-size:12px;letter-spacing:.02em;max-width:160px}
  .header-cta{margin-left:16px;padding:8px 12px;font-size:12px}
}

/* I9 страница новости */
.news-single__back{margin:0 0 16px;font-size:14px}
.news-single__back a{color:#9e4a33;text-decoration:none}
.news-single__date{margin:8px 0 24px;color:#888;font-size:14px}
.news-single__img{display:block;max-width:100%;height:auto;margin:0 0 24px}
.news-single{max-width:900px;margin:0 auto;padding:40px 16px 60px;box-sizing:border-box}
.news-single h1{font-size:32px;line-height:1.25;margin:0}
.news-single .entry-content{font-size:16px;line-height:1.6;overflow-wrap:anywhere}
.news-single .entry-content b,.news-single .entry-content strong{font-weight:inherit}
.news-single .entry-content p{margin:0 0 14px}
.news-single__img{width:100%;max-height:520px;object-fit:cover;border-radius:4px}
@media (max-width:767px){.news-single{padding:24px 16px 40px}.news-single h1{font-size:24px}}

/* I4 WCV (rci): прозрачная шапка над фото — белые пункты меню */
@media (min-width:1280px){
  .page-template-template-rci .header:not(.header_fixed) .header-menu__list>.header-menu__list-item>.header-menu__list-link,
  .page-template-template-rci .header:not(.header_fixed) .header-menu__list>.header-menu__list-item>.header-menu__list-item-header>.header-menu__list-link{color:#fff}
  .page-template-template-rci .header:not(.header_fixed) .header-menu__list>.header-menu__list-item>.header-menu__list-item-header>.header-menu__list-item-arrow{filter:brightness(0) invert(1)}
}

/* I4 Co-ownership: тёмная шапка, общее меню, своя кнопка «Связаться» вместо CTA */
.page-template-template-co-ownership .header-cta{display:none}
.page-template-template-co-ownership .header-menu__list>.header-menu__list-item>.header-menu__list-link,
.page-template-template-co-ownership .header-menu__list>.header-menu__list-item>.header-menu__list-item-header>.header-menu__list-link{color:#fff}
.page-template-template-co-ownership .header-menu__list-item-arrow,
.page-template-template-co-ownership .header-lang__icon{filter:brightness(0) invert(1)}
@media (min-width:1280px){
  .page-template-template-co-ownership .header-menu__open{display:none!important}
  .page-template-template-co-ownership .header__button_second{margin-left:20px;flex-shrink:0}
}
@media (max-width:1279px){
  .page-template-template-co-ownership .header__container>.header-menu{display:none!important}
  .page-template-template-co-ownership .header-menu__open{display:flex!important}
  .page-template-template-co-ownership .header__container>.header__button_second{display:none}
}
.wg-m-sub{list-style:none;margin:6px 0 10px 16px;padding:0}
.wg-m-sub a{display:block;padding:6px 0;color:inherit;opacity:.8;font-size:14px;text-decoration:none}
@media (min-width:1280px){
  .page-template-template-co-ownership .header__container .header-menu__list-item{margin:0!important}
  .page-template-template-co-ownership .header-logo img{width:180px}
  .page-template-template-co-ownership .header__container>.header-menu{margin-left:auto}
  .page-template-template-co-ownership .header__container>.header-lang{margin-left:20px}
  .page-template-template-co-ownership .header__container>.header__button_second{padding:12px 20px;font-size:14px;height:auto;white-space:nowrap}
}

/* I5 лендинги со своим <footer> с контактами (english, turkish, itc-booking): склеить с общим футером */
footer.footer{padding-bottom:24px!important}
footer.footer ~ div.footer{padding-top:0!important}
footer.footer ~ div.footer .footer-top{padding-top:0!important}
footer.footer ~ div.footer .footer-cols{padding-top:32px!important;border-top:1px solid rgba(255,255,255,.15)}

/* I5 Capitalinvestments */
.page-template-template-capitalinvestments .header-socials__title{display:none}
.page-template-template-capitalinvestments .header-menu__list>.header-menu__list-item>.header-menu__list-link,
.page-template-template-capitalinvestments .header-menu__list>.header-menu__list-item>.header-menu__list-item-header>.header-menu__list-link{color:#fff}
.page-template-template-capitalinvestments .header-menu__list-item-arrow,
.page-template-template-capitalinvestments .header-lang__icon{filter:brightness(0) invert(1)}

/* I5 бургер для лендингов (template-parts/header-burger.php) */
.wg-burger{display:flex;flex-direction:column;justify-content:center;width:44px;height:44px;margin-left:16px;padding:9px;box-sizing:border-box;border:2px solid rgba(232,222,211,.8);border-radius:4px;cursor:pointer;flex-shrink:0}
.wg-burger span{display:block;height:3px;margin:2px 0;border-radius:3px;background:#fff;transition:.3s}
.wg-burger.wg-burger_opened span:nth-child(1){transform:translateY(7px) rotate(45deg)}
.wg-burger.wg-burger_opened span:nth-child(2){opacity:0}
.wg-burger.wg-burger_opened span:nth-child(3){transform:translateY(-7px) rotate(-45deg)}
@media (min-width:1280px){.wg-burger{display:none!important}}
@media (max-width:1279px){
  body.wg-menu-open .header-menu .header-menu__list-link{color:#38535d!important}
  body.wg-menu-open .header-menu .header-menu__list-item-arrow{filter:none!important}
  .wg-sub-open>.header-menu__dropdown{display:block!important;position:static!important;visibility:visible!important;opacity:1!important}
}
.page-template-template-brandedhotel .header-menu__list>.header-menu__list-item>.header-menu__list-link,
.page-template-template-brandedhotel .header-menu__list>.header-menu__list-item>.header-menu__list-item-header>.header-menu__list-link{color:#fff}
.page-template-template-brandedhotel .header-menu__list-item-arrow,
.page-template-template-brandedhotel .header-lang__icon{filter:brightness(0) invert(1)}
@media (min-width:1280px) and (max-width:1439px){
  .page-template-template-brandedhotel .header-logo img{width:180px}
  .page-template-template-brandedhotel .header-menu{margin-left:16px}
  .page-template-template-brandedhotel .header-menu__list{gap:10px}
}

/* I5 Invest-package: своя кнопка с формой вместо общей CTA */
.page-template-template-invest-package .header-cta,
.page-template-template-invest-package-thanks .header-cta{display:none}
.page-template-template-invest-package .header__container>.header__button{flex-shrink:0;margin-left:20px}
@media (max-width:1279px){.page-template-template-invest-package .header__container>.header__button{display:none}}

/* I5 Arabian: меню в promo-header на тёмном фоне */
.page-template-template-arabian .promo-header{display:flex;align-items:center}
.page-template-template-arabian .header-menu__list>.header-menu__list-item>.header-menu__list-link,
.page-template-template-arabian .header-menu__list>.header-menu__list-item>.header-menu__list-item-header>.header-menu__list-link{color:#fff}
.page-template-template-arabian .header-menu__list-item-arrow,
.page-template-template-arabian .header-lang__icon{filter:brightness(0) invert(1)}
.page-template-template-arabian .header-lang{margin-left:20px}
@media (max-width:1279px){.page-template-template-arabian .wg-burger{margin-left:auto}}

/* I5 ITC (itc, itc-hotels, itc-map): гасим стили ITC для общего меню */
body[class*="page-template-template-itc"] .header__container .header-menu__list-item{margin:0!important}
body[class*="page-template-template-itc"] .header-menu__list-link{padding:0!important}
body[class*="page-template-template-itc"] .header-menu__list-item-header{display:flex;align-items:center;gap:6px}
body[class*="page-template-template-itc"] .header:not(.header_relative):not(.header_absolute) .header-menu__list>.header-menu__list-item>.header-menu__list-link,
body[class*="page-template-template-itc"] .header:not(.header_relative):not(.header_absolute) .header-menu__list>.header-menu__list-item>.header-menu__list-item-header>.header-menu__list-link{color:#fff}
body[class*="page-template-template-itc"] .header:not(.header_relative):not(.header_absolute) .header-menu__list-item-arrow,
body[class*="page-template-template-itc"] .header:not(.header_relative):not(.header_absolute) .header-lang__icon{filter:brightness(0) invert(1)}
body[class*="page-template-template-itc"] .header_relative .wg-burger span,body[class*="page-template-template-itc"] .header_absolute .wg-burger span{background:#38535d}
@media (min-width:1280px){
  body[class*="page-template-template-itc"] .header__container>.header-menu{margin-left:24px!important}
  body[class*="page-template-template-itc"] .header-lang{margin-left:20px}
}
@media (max-width:1279px){body.wg-menu-open .header-menu .header-menu__list-link{padding:10px 0!important}}

/* F2: итоговая проверка ширин — меню у логотипа, языки/соцсети к краю (и в RTL) */
@media (min-width:1280px){
  .header__container>.header-menu{margin-inline-start:24px!important;margin-inline-end:0!important}
  .header__container>.header-lang{margin-inline-start:auto!important;padding-inline-start:20px}
}
@media (min-width:1440px) and (max-width:1679px){
  .header-menu__list{gap:18px!important}
  .header-menu__list-link{font-size:13px!important;max-width:190px!important}
}
/* лендинги с узким контейнером: компактное меню на любой ширине */
@media (min-width:1440px){
  body[class*="page-template-template-co-ownership"] .header-menu__list,body[class*="page-template-template-rci"] .header-menu__list,body[class*="page-template-template-itc"] .header-menu__list,body[class*="page-template-template-invest-package"] .header-menu__list,body[class*="page-template-template-arabian"] .header-menu__list,body[class*="page-template-template-turkey"] .header-menu__list,body[class*="page-template-template-brandedhotel"] .header-menu__list,body[class*="page-template-template-capitalinvestments"] .header-menu__list,body[class*="page-template-template-proof"] .header-menu__list{gap:14px!important}
  body[class*="page-template-template-co-ownership"] .header-menu__list-link,body[class*="page-template-template-rci"] .header-menu__list-link,body[class*="page-template-template-itc"] .header-menu__list-link,body[class*="page-template-template-invest-package"] .header-menu__list-link,body[class*="page-template-template-arabian"] .header-menu__list-link,body[class*="page-template-template-turkey"] .header-menu__list-link,body[class*="page-template-template-brandedhotel"] .header-menu__list-link,body[class*="page-template-template-capitalinvestments"] .header-menu__list-link,body[class*="page-template-template-proof"] .header-menu__list-link{font-size:12px!important;letter-spacing:.02em;max-width:160px!important}
  .page-template-template-brandedhotel .header-logo img{width:180px}
}

/* I8 видео-интервью на главной */
.wg-video-interview__more{margin:32px 0 0;text-align:center}
.wg-video-interview__more .header-cta{display:inline-flex}
