/*
Theme Name: Petrod
Theme URI: https://petrod.ru/
Description: Тема для сайта РОД «Петербургские родители», максимально близкая к оригинальному petrod.ru (Joomla ja_medicare/otkazniki).
Author: Local migration
Version: 0.1.0
Text Domain: petrod
*/

/* Petrod theme — matches petrod.ru (ja_medicare/otkazniki) */
:root { --orange:#f07c00; --orange-hover:#d56d00; --text:#696969; --title:#424242; --muted:#a5a5a5; --body-bg:#f2f2f2; --footer-bg:#333; }

body.petrod-wp { font-family: "Roboto", Arial, sans-serif; font-size:15px; font-weight:300; color:var(--text); background:var(--body-bg); margin:0; line-height:1.6; }
.itemFullText, .entry-content, .onas-content { font-size:16px; line-height:1.7; }
a { color:var(--orange); text-decoration:none; }
a:hover { color:var(--orange-hover); }

/* Containers: 1200 content-width как на оригинале */
.main-container { max-width: 1360px; margin: 0 auto; padding: 0 20px; }
@media (max-width: 1399px) { .main-container { max-width: 1200px; padding: 0 20px; } }
@media (max-width: 1199px) { .main-container { max-width: 970px;  padding: 0 20px; } }
@media (max-width: 991px)  { .main-container { max-width: 750px;  padding: 0 15px; } }
@media (max-width: 767px)  { .main-container { max-width: 100%;   padding: 0 15px; } }

/* Topbar: сливаемся с хедером (единый белый блок), 50px */
.t3-topbar { background:#fff; border:none; border-bottom:1px solid #e5e5e5; padding:0; font-size:13px; color:var(--text); line-height:25px; }
.t3-topbar > .main-container > .row { min-height:50px; align-items:center; }
.t3-topbar .top-contact { list-style:none; padding:0; margin:0; display:flex; align-items:center; gap:10px; }
.t3-topbar .top-contact li:first-child { color:var(--text); font-weight:300; margin-right:8px; }
.t3-topbar .head-right { text-align:right; position:relative; }
.t3-topbar .search-toggle { background:transparent; border:none; cursor:pointer; color:var(--muted); padding:4px 8px; }
.t3-topbar .search-toggle:hover { color:var(--orange); }
.t3-topbar .search-popup { display:none; position:absolute; right:0; top:100%; background:#fff; border:1px solid #ddd; box-shadow:0 4px 12px rgba(0,0,0,.08); padding:8px; z-index:50; width:300px; align-items:center; gap:6px; }
.t3-topbar .search-popup.open { display:flex; }
.t3-topbar .search-popup input { border:1px solid #eee; padding:6px 10px; flex:1; outline:none; font-size:13px; }
.t3-topbar .search-popup input:focus { border-color:var(--orange); }
.t3-topbar .search-popup button { background:var(--orange); color:#fff; border:none; padding:6px 12px; cursor:pointer; font-weight:700; }

/* Header: 106px (25 + 56 + 25), единый белый блок с topbar */
.t3-header { padding:25px 0; background:#fff; border-bottom:none; }
.t3-header .row { display:flex; align-items:center; flex-wrap:nowrap; gap:30px; margin:0; }
.t3-header .logo { flex:0 0 auto; max-width:none !important; padding:0 !important; width:auto !important; }
.t3-header .logo a { display:inline-grid; grid-template-columns:auto 1fr; grid-template-rows:auto auto; column-gap:14px; align-items:center; text-decoration:none; white-space:nowrap; }
.t3-header .logo img.logo-img { grid-row:1 / span 2; max-height:50px; width:auto; }
.t3-header .logo .logo-name { font-family:Georgia,"Roboto Slab",serif; font-size:17px; font-weight:400; color:var(--title); line-height:1.1; text-transform:uppercase; letter-spacing:.5px; align-self:end; }
.t3-header .logo .logo-line { display:block; white-space:nowrap; }
.t3-header .logo .site-slogan { color:var(--muted); font-size:10px; font-weight:300; letter-spacing:1.5px; text-transform:uppercase; margin-top:2px; align-self:start; white-space:nowrap; }

#t3-mainnav { flex:1 1 auto; max-width:none !important; display:flex; align-items:center; justify-content:flex-end; gap:20px; margin-left:auto; }
.appointment-content { order:2; flex:0 0 auto; }
.appointment-content .custom { margin:0; }
nav.t3-mainnav.pull-right { order:1; flex:0 1 auto; min-width:0; margin-left:auto; }

.btn-donate { display:inline-block; background:transparent; color:var(--orange); border:2px solid var(--orange); border-radius:30px; padding:7px 25px; font-weight:700; font-size:14px; text-decoration:none; transition:all .2s; }
.btn-donate:hover { background:var(--orange); color:#fff; }

/* Main nav */
nav.t3-mainnav { background:transparent; border:none; margin:0; min-height:0; padding:0; }
.t3-navbar-collapse, .navbar-collapse { display:block !important; max-height:none !important; height:auto !important; overflow:visible !important; padding:0 !important; border:none !important; box-shadow:none !important; }
.t3-mainnav.pull-right .t3-navbar-collapse { display:flex !important; }
.t3-mainnav .navbar-nav { list-style:none; padding:0; margin:0; display:flex; flex-wrap:wrap; align-items:center; }
.t3-mainnav .navbar-nav > li { position:relative; }
.t3-mainnav .navbar-nav > li { position:relative; }
.t3-mainnav .navbar-nav > li > a { display:block; padding:15px 10px; color:var(--title); font-weight:700; font-size:15px; text-transform:none; text-decoration:none; transition:color .2s; white-space:nowrap; }
.t3-mainnav .navbar-nav > li:hover > a, .t3-mainnav .navbar-nav > li.current-menu-item > a, .t3-mainnav .navbar-nav > li.current-menu-parent > a { color:var(--orange); }
.t3-mainnav .caret { display:inline-block; width:0; height:0; margin-left:4px; vertical-align:middle; border-left:4px solid transparent; border-right:4px solid transparent; border-top:5px solid currentColor; opacity:.8; }

/* (треугольники-индикаторы убраны по запросу) */

.t3-mainnav .dropdown-menu { display:none; position:absolute; top:100%; left:0; min-width:260px; background:#fff; border:none; box-shadow:0 4px 12px rgba(0,0,0,.08); padding:10px 0; list-style:none; margin:0; z-index:100; }
.t3-mainnav .navbar-nav > li:hover > .dropdown-menu,
.t3-mainnav .navbar-nav > li.open > .dropdown-menu { display:block; }
.t3-mainnav .dropdown-menu li a { display:block; padding:10px 20px; color:var(--title); font-weight:400; text-decoration:none; font-size:15px; }
.t3-mainnav .dropdown-menu li a:hover { background:#f7f7f7; color:var(--orange); }

/* Main body */
#t3-mainbody { padding:40px 15px; min-height:300px; background:var(--body-bg); }
#t3-mainbody h1, #t3-mainbody h2, #t3-mainbody h3 { color:var(--orange); font-weight:300; }

/* Frontpage hero */
.frontpage .hero { background:var(--hero-bg,#555) center/cover no-repeat; color:#fff; padding:90px 0; text-align:center; position:relative; }
.frontpage .hero::before { content:""; position:absolute; inset:0; background:rgba(0,0,0,.45); pointer-events:none; }
.frontpage .hero > .main-container { position:relative; }
.frontpage .hero h1 { font-family:"Roboto Slab",Georgia,serif; font-weight:300; font-size:44px; margin:0 0 10px; color:#fff !important; text-shadow:0 2px 14px rgba(0,0,0,.45); }
.frontpage .hero p { font-size:20px; font-weight:300; margin:0 0 25px; }
.frontpage .hero .btn-donate { border-color:#fff; color:#fff; font-size:16px; padding:10px 32px; }
.frontpage .hero .btn-donate:hover { background:#fff; color:var(--orange); }

/* Home blocks */
.home-blocks h3 { color:var(--orange); font-weight:300; font-size:26px; margin:0 0 10px; }
.home-blocks p { margin:0 0 15px; min-height:48px; }
.home-blocks .btn { display:inline-block; padding:6px 20px; background:transparent; border:2px solid var(--orange); color:var(--orange); border-radius:30px; text-decoration:none; font-weight:700; font-size:13px; }
.home-blocks .btn:hover { background:var(--orange); color:#fff; }

.home-latest .col-md-4 article { background:#fff; padding:18px; border-radius:2px; margin-bottom:20px; }
.home-latest h4 a { color:var(--title); font-family:"Roboto Slab",serif; font-weight:400; }
.home-latest h4 a:hover { color:var(--orange); }

/* Breadcrumbs */
.t3-breadcrumbs { color:#888; font-size:12px; }
.t3-breadcrumbs a { color:var(--orange); text-decoration:none; }
.t3-breadcrumbs a:hover { color:#fff; }
.t3-breadcrumbs span { color:#bbb; }

/* Footer */
.t3-footer { background:var(--footer-bg); color:#9ea3a8; padding:50px 0 0; font-size:14px; line-height:1.6; }
.t3-footer .row { gap:0; }
.t3-footer .t3-module .module-inner { padding-right:20px; }
/* 4 колонки в футере выровнены по верху, убираем легаси-отступы */
.t3-footer .footer-main-row { align-items:flex-start; }
.t3-footer .footer-main-row > [class*="col-"] { padding-top:0; padding-bottom:0; }
.t3-footer .footer-main-row .footer-info,
.t3-footer .footer-main-row .t3-module { padding-top:0 !important; padding-bottom:0 !important; margin-top:0; }
.t3-footer .footer-main-row .footer-logo-link { margin-top:0 !important; margin-bottom:0; }
.t3-footer .footer-col-badge .badge-18plus-wrap { margin:0; text-align:center; }
.t3-footer .footer-col-badge { display:flex; justify-content:center; }
.t3-footer h3.module-title { color:#fff; font-size:13px; font-weight:700; text-transform:uppercase; letter-spacing:1.2px; padding:0 0 10px; margin:0 0 18px; border-bottom:1px solid #4a4a4a; background:none; font-family:"Droid Serif","Roboto Slab",Georgia,serif; }
.t3-footer h3.module-title span { color:#fff; }
.t3-footer p { margin:0 0 12px; font-size:14px; line-height:1.55; color:#9ea3a8; }
.t3-footer a { color:#cfcfcf; text-decoration:none; transition:color .15s; }
.t3-footer a:hover { color:var(--orange); }

/* Меню в футере — линии разделители */
.t3-footer .footer-info { text-align:center; }
.t3-footer .footer-info .footer-logo-link { display:inline-block; margin-bottom:20px; }
.t3-footer .footer-info .footer-logo-link img { display:block; max-width:150px; width:100%; height:auto; }
.t3-footer .menufmenu { list-style:none; padding:0; margin:20px 0 0; }
.t3-footer .menufmenu li { border-bottom:1px solid #4a4a4a; }
.t3-footer .menufmenu li:first-child { border-top:1px solid #4a4a4a; }
.t3-footer .menufmenu li a { display:block; padding:10px 0; color:#9ea3a8; text-decoration:none; font-size:14px; }
.t3-footer .menufmenu li a:hover, .t3-footer .menufmenu li.current-menu-item a { color:var(--orange); }
.t3-footer .flastnews ul { list-style:none; padding:0; margin:0; }
.t3-footer .flastnews li { margin:0 0 10px; padding:0; border:none; }
.t3-footer .flastnews .moduleItemTitle { display:block; color:#9ea3a8; font-family:"Roboto Slab",Georgia,serif; font-weight:400; font-size:13px !important; line-height:1.4; text-decoration:none; }
.t3-footer .flastnews .moduleItemTitle:hover { color:var(--orange); }
.t3-footer .btn-primary { background:var(--orange); color:#fff; border:2px solid var(--orange); padding:10px 26px; border-radius:30px; font-weight:700; text-decoration:none; display:inline-block; font-size:14px; margin-top:5px; }
.t3-footer .btn-primary:hover { background:transparent; color:var(--orange); }
.t3-footer .copyright { border-top:1px solid #4a4a4a; margin-top:30px; padding:18px 0; font-size:13px; color:#888; text-align:center; }
.t3-footer .copyright p { color:#888; font-size:13px; margin:0 0 3px; }
.t3-footer .copyright a { color:#aaa; }

/* Bootstrap 3 grid helpers used in templates */
.row { display:flex; flex-wrap:wrap; margin:0 -15px; }
.row > [class*="col-"] { padding:0 15px; box-sizing:border-box; }
.col-xs-6 { flex:0 0 50%; max-width:50%; }
.col-xs-10 { flex:0 0 83.3333%; max-width:83.3333%; }
.col-xs-12 { flex:0 0 100%; max-width:100%; }
@media (min-width:768px){ .col-sm-4{flex:0 0 33.3333%;max-width:33.3333%} .col-sm-6{flex:0 0 50%;max-width:50%} .col-sm-8{flex:0 0 66.6666%;max-width:66.6666%} .col-sm-10{flex:0 0 83.3333%;max-width:83.3333%} .col-sm-12{flex:0 0 100%;max-width:100%} .hidden-xs{display:block} }
@media (min-width:992px){ .col-md-2{flex:0 0 16.6666%;max-width:16.6666%} .col-md-3{flex:0 0 25%;max-width:25%} .col-md-4{flex:0 0 33.3333%;max-width:33.3333%} .col-md-6{flex:0 0 50%;max-width:50%} .col-md-8{flex:0 0 66.6666%;max-width:66.6666%} .col-md-9{flex:0 0 75%;max-width:75%} .col-md-12{flex:0 0 100%;max-width:100%} }
@media (min-width:1200px){ .col-lg-3{flex:0 0 25%;max-width:25%} .col-lg-4{flex:0 0 33.3333%;max-width:33.3333%} .col-lg-9{flex:0 0 75%;max-width:75%} }
@media (max-width:767px){ .hidden-xs{display:none!important} }

.text-center{text-align:center}
.pull-right{margin-left:auto}
.clearfix::after{content:"";display:table;clear:both}

.screen-reader-text{position:absolute;left:-10000px;width:1px;height:1px;overflow:hidden}

/* ========== Мобильная адаптация ========== */
.navbar-toggle { display:none; background:transparent; border:1px solid #ddd; border-radius:3px; padding:8px 10px; cursor:pointer; color:var(--title); width:40px; height:40px; align-items:center; justify-content:center; flex-direction:column; gap:4px; }
.navbar-toggle .hamburger-icon { display:block; width:20px; height:2px; background:var(--title); border-radius:1px; }
.navbar-toggle.open .hamburger-icon:nth-child(1) { transform:translateY(6px) rotate(45deg); }
.navbar-toggle.open .hamburger-icon:nth-child(2) { opacity:0; }
.navbar-toggle.open .hamburger-icon:nth-child(3) { transform:translateY(-6px) rotate(-45deg); }
.navbar-toggle .hamburger-icon { transition:transform .2s, opacity .2s; }

@media (max-width: 991px) {
    .t3-header .row { flex-wrap:wrap !important; align-items:center; gap:10px; }
    .t3-header .logo { flex:1 1 auto; order:1; }
    #t3-mainnav { flex:0 0 auto !important; order:2; margin-left:0 !important; gap:10px; }
    .appointment-content { display:none; }
    .navbar-toggle { display:inline-flex !important; border:2px solid var(--orange) !important; background:var(--orange) !important; border-radius:50% !important; width:44px; height:44px; padding:0 !important; transition:background .2s; }
    .navbar-toggle .hamburger-icon { background:#fff !important; width:18px; height:2px; }
    .navbar-toggle.open { background:#fff !important; }
    .navbar-toggle.open .hamburger-icon { background:var(--orange) !important; }
    .t3-topbar .search-toggle { border:2px solid #e0e0e0 !important; border-radius:50% !important; width:40px; height:40px; display:inline-flex; align-items:center; justify-content:center; color:var(--muted); }
    .t3-topbar .search-toggle:hover { border-color:var(--orange) !important; color:var(--orange); }
    nav.t3-mainnav.pull-right { order:3; flex:1 1 100% !important; display:none !important; }
    nav.t3-mainnav.pull-right.mobile-open { display:block !important; }
    .t3-mainnav .navbar-nav { flex-direction:column; width:100%; border-top:1px solid #eee; }
    .t3-mainnav .navbar-nav > li { border-bottom:1px solid #eee; width:100%; }
    .t3-mainnav .navbar-nav > li > a { padding:12px 10px; }
    .t3-mainnav .dropdown-menu { display:none; position:static !important; box-shadow:none; padding-left:15px; background:#fafafa; }
    .t3-mainnav .navbar-nav > li.open > .dropdown-menu { display:block; }
    /* Топбар на мобиле: скрыть соц.соц-иконки, hamburger+search прижать к правому краю */
    .t3-topbar .hidden-xs { display:none !important; }
    .t3-topbar > .main-container { padding-left:0; padding-right:0; }
    .t3-topbar > .main-container > .row { margin:0; min-height:44px; display:flex; justify-content:flex-end; align-items:center; flex-wrap:nowrap; }
    /* Правая колонка — flex-контейнер с двумя кнопками у правого края */
    .t3-topbar > .main-container > .row > div.col-xs-12:not(.hidden-xs) {
        flex:1 1 100% !important; max-width:100% !important; padding:0 8px 0 0 !important;
        display:flex !important; justify-content:flex-end; align-items:center; gap:8px;
    }
    .t3-topbar .navbar-header { float:none !important; display:inline-flex !important; align-items:center; margin:0 !important; padding:0 !important; order:2; width:auto !important; min-width:0 !important; }
    .t3-topbar .navbar-header.pull-right { float:none !important; }
    .t3-topbar .navbar-header::before, .t3-topbar .navbar-header::after { display:none !important; }
    .t3-topbar .navbar-toggle { margin:0 !important; }
    .t3-topbar .head-right { display:inline-flex !important; align-items:center; margin:0 !important; padding:0 !important; order:1; position:static; text-align:left !important; }
    .t3-topbar .head-search { position:static; margin:0; padding:0; }
    /* Popup позиционируется относительно viewport: справа 8px, не вылезает влево */
    .t3-topbar .head-search .search-popup { position:fixed; top:50px; left:8px; right:8px; width:auto; max-width:none; z-index:1000; }
    .hero-mini { min-height:120px; padding:30px 20px; }
    .hero-mini h1 { font-size:24px; }
}
@media (max-width: 767px) {
    .t3-topbar .top-contact { gap:4px; font-size:11px; }
    .t3-topbar .top-contact li:first-child { display:none; }
    .t3-header .logo .logo-name { font-size:16px; }
    .t3-header .logo .site-slogan { font-size:10px; }
    .t3-header .logo img.logo-img { max-height:44px; }
    .hero-mini { min-height:110px; padding:25px 15px; }
    .hero-mini h1 { font-size:22px; }

    /* Футер компактный центрированный */
    .t3-footer { text-align:center; padding:20px 15px 0; font-size:13px; }
    .t3-footer .row { flex-direction:column; gap:12px; }
    .t3-footer .footer-col,
    .t3-footer [class*="col-"] { flex:1 1 100% !important; max-width:100% !important; margin:0; padding:0; }
    /* Убираем легаси-вертикальные паддинги/высоты на мобиле */
    .t3-footer .t3-footnav,
    .t3-footer .footer-info { padding:0 !important; }
    .t3-footer .t3-module { margin:0; }
    .t3-footer .t3-footnav .t3-module ul { min-height:0 !important; }
    .t3-footer h3.module-title { text-align:center; border-bottom:1px solid #4a4a4a; padding:0 0 8px; margin:0 0 10px; font-size:12px; }
    .t3-footer .t3-module .module-inner { padding:0; }
    .t3-footer p { font-size:13px; line-height:1.5; margin:0 0 8px; }
    .t3-footer .footer-info .footer-logo-link img { max-width:110px; }
    .t3-footer .footer-info .menufmenu { margin-top:15px; }
    .t3-footer .menufmenu li a { text-align:center; padding:8px 0; font-size:13px; }
    .t3-footer .flastnews li { margin-bottom:6px; }
    .t3-footer .flastnews .moduleItemTitle { font-size:13px !important; text-align:center; line-height:1.35; }
    /* Скрываем лишнее на мобиле: «Последние новости» оставляем максимум 3 элемента */
    .t3-footer .flastnews li:nth-child(n+4) { display:none; }
    .t3-footer .rekvizity-block { max-width:300px; margin:0 auto; text-align:center; padding:0 10px; box-sizing:border-box; overflow-wrap:break-word; word-wrap:break-word; }
    .t3-footer .rekvizity-block p { font-size:13px; margin:0 0 4px; text-align:center; }
    .t3-footer .rekvizity-block p span { display:inline-block; min-width:42px; margin-right:4px; }
    .t3-footer .rekvizity-block .org-name, .t3-footer .rekvizity-block .rek-link { text-align:center; }
    .footer-col-rekvizity { text-align:center; }
    .t3-footer .btn-primary { padding:8px 20px; font-size:13px; }
    .badge-18plus-wrap { display:flex; justify-content:center; margin:8px 0 0; text-align:center; }
    .badge-18plus { width:52px; height:52px; font-size:20px; }
    .badge-18plus sup { font-size:14px; }
    .t3-footer .footer-info .footer-logo-link { margin:0; }
    .t3-footer .copyright { margin-top:15px; padding:12px 0; font-size:11px; }
    .t3-footer .copyright p { font-size:11px; }
}

/* ========== UI компоненты ========== */

/* Раскладка 2 колонки (контент + сайдбар) */
.page-with-sidebar { display:grid; grid-template-columns:3fr 1fr; gap:30px; align-items:start; }
@media (max-width:991px) { .page-with-sidebar { grid-template-columns:1fr; } }

.page-with-sidebar > main { background:#fff; padding:30px 35px; }
@media (max-width:767px) { .page-with-sidebar > main { padding:20px; } }

.page-with-sidebar main h1,
.page-title { color:var(--orange); font-family:"Roboto Slab",Georgia,serif; font-weight:300; font-size:32px; margin:0 0 20px; line-height:1.2; }

/* Sidebar */
.petrod-sidebar { display:flex; flex-direction:column; gap:25px; }
.petrod-sidebar .module-title,
.petrod-sidebar h3.module-title { color:#fff !important; background:var(--orange); padding:8px 14px; margin:0 0 12px; font-family:"Droid Serif","Roboto Slab",Georgia,serif; font-size:14px; font-weight:700; letter-spacing:.5px; text-transform:uppercase; }
.petrod-sidebar .module-ct { padding:0 5px; font-size:13px; line-height:1.5; }
.petrod-sidebar .team-mini { list-style:none; padding:0; margin:0; }
.petrod-sidebar .team-mini li { display:flex; gap:10px; align-items:flex-start; margin-bottom:12px; padding:6px 8px 12px; border-bottom:1px dotted #e0e0e0; border-left:1px solid transparent; border-right:1px solid transparent; border-top:1px solid transparent; border-radius:4px; transition:border-color .2s, background .2s; cursor:pointer; }
.petrod-sidebar .team-mini li:hover { border-top-color:var(--orange); border-left-color:var(--orange); border-right-color:var(--orange); border-bottom-color:var(--orange); border-bottom-style:solid; background:#fff8f1; }
.petrod-sidebar .team-mini img { width:50px; height:50px; object-fit:cover; border-radius:50%; flex-shrink:0; }
.petrod-sidebar .team-mini-text { min-width:0; }
.petrod-sidebar .team-mini-text a { color:var(--title); font-family:"Roboto Slab",serif; font-weight:400; font-size:13px; text-decoration:none; display:block; line-height:1.2; }
.petrod-sidebar .team-mini-text small { color:var(--muted); font-size:11px; line-height:1.3; display:block; margin-top:3px; }
.petrod-sidebar .team-mini-more { text-align:center; margin:10px 0 0; }
.btn-sm { font-size:12px !important; padding:5px 15px !important; }

/* Hero-mini: ограничена шириной контента, размер как на оригинале (~177px). */
.hero-wrap { padding:0 20px; }
.hero-mini { position:relative; padding:50px 20px; text-align:center; color:#fff; background-size:cover; background-position:right 25%; background-repeat:no-repeat; margin:0; min-height:177px; display:flex; align-items:center; justify-content:center; }
.hero-mini::before { content:""; position:absolute; inset:0; background:linear-gradient(90deg, rgba(0,0,0,.55) 0%, rgba(0,0,0,.35) 50%, rgba(0,0,0,.15) 100%); pointer-events:none; }
.hero-mini h1 { position:relative; z-index:1; font-family:"Roboto Slab",Georgia,serif; font-weight:300; font-size:34px; margin:0; color:#fff; letter-spacing:.3px; text-shadow:0 2px 8px rgba(0,0,0,.5); text-align:left; flex:1 1 auto; padding-left:20px; }

/* Team grid */
.team-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:20px; margin-bottom:10px; }
@media (max-width:767px) { .team-grid { grid-template-columns:repeat(2,1fr); } }
.team-card { text-align:center; padding:8px; border:1px solid transparent; border-radius:6px; transition:border-color .2s, box-shadow .2s; }
.team-card:hover { border-color:var(--orange); box-shadow:0 2px 10px rgba(240,124,0,.12); }
.team-card img { width:100%; aspect-ratio:1; object-fit:cover; }
.team-card h4 { margin:8px 0 4px; font-family:"Roboto Slab",serif; font-weight:400; font-size:14px; }
.team-card h4 a { color:var(--orange); text-decoration:none; }
.team-card p { font-size:12px; color:var(--muted); margin:0; line-height:1.4; }

/* Team single */
.team-single { display:grid; grid-template-columns:300px 1fr; gap:40px; align-items:start; }
@media (max-width:767px) { .team-single { grid-template-columns:1fr; } }
.team-photo img { width:100%; aspect-ratio:3/4; object-fit:cover; }
.team-bio .team-group-label { color:var(--muted); text-transform:uppercase; letter-spacing:1.5px; font-size:11px; margin:0 0 6px; }
.team-bio h1 { color:var(--orange); font-family:"Roboto Slab",Georgia,serif; font-weight:300; font-size:32px; margin:0 0 20px; line-height:1.2; }
.team-bio .team-content { font-size:15px; line-height:1.7; }
.team-content img { max-width:100%; height:auto; }

/* OnAs content (главная) */
.onas-content img { max-width:100%; height:auto; }
.onas-content ul { padding-left:20px; }
.onas-content h3 { color:var(--orange); font-family:"Roboto Slab",Georgia,serif; font-weight:400; font-size:20px; margin:25px 0 12px; }
.team-section-title { color:var(--orange); font-weight:300; font-size:22px; margin:40px 0 20px; font-family:"Roboto Slab",Georgia,serif; }

/* Projects grid */
.projects-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:30px; }
@media (max-width:767px) { .projects-grid { grid-template-columns:1fr; } }
.project-card { display:flex; gap:15px; background:transparent; padding:0; }
.project-card .project-thumb { flex:0 0 80px; }
.project-card .project-thumb img { width:80px; height:80px; object-fit:cover; }
.project-card .project-body { flex:1; min-width:0; }
.project-card h3 { color:var(--orange); font-family:"Roboto Slab",Georgia,serif; font-weight:400; font-size:18px; margin:0 0 8px; line-height:1.2; }
.project-card h3 a { color:var(--orange); text-decoration:none; }
.project-card p.excerpt { font-size:13px; line-height:1.5; margin:0 0 10px; color:var(--text); }

/* Projects intro */
.projects-intro { margin-bottom:25px; }

/* Post/article (single news) */
.itemTitle, .entry-title.post-title { color:var(--orange); font-family:"Roboto Slab",Georgia,serif; font-weight:300; font-size:30px; margin:0 0 10px; line-height:1.2; }
.itemDateCreated { color:var(--muted); font-size:12px; margin:0 0 20px; }
.itemImageBlock { margin:0 0 20px; }
.itemFullText { font-size:15px; line-height:1.7; }
.itemFullText img { max-width:100%; height:auto; }
.itemFullText p { margin:0 0 15px; }

/* Related posts */
.related-posts { margin-top:50px; padding-top:30px; border-top:2px solid #eee; }
.related-posts h3 { color:var(--orange); font-family:"Roboto Slab",Georgia,serif; font-weight:300; font-size:22px; margin:0 0 20px; }
.related-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:20px; }
@media (max-width:767px) { .related-grid { grid-template-columns:1fr; } }
.related-grid article { background:#fff; padding:15px; }
.related-grid h4 { margin:10px 0 6px; }
.related-grid h4 a { color:var(--title); font-family:"Roboto Slab",serif; font-weight:400; font-size:15px; text-decoration:none; }
.related-grid time { color:var(--muted); font-size:11px; }

/* Novosti list */
.novosti-list .novosti-item { margin-bottom:30px; padding-bottom:20px; border-bottom:1px solid #ddd; }
.novosti-list .novosti-item h2 { margin:0 0 8px; }
.novosti-list .novosti-item h2 a { color:var(--title); font-family:"Roboto Slab",serif; font-weight:400; font-size:22px; text-decoration:none; }
.novosti-list .novosti-item .novosti-date { color:var(--muted); font-size:12px; margin:0 0 10px; }

/* Search */
.search-form-inline { display:flex; gap:8px; margin-bottom:30px; }
.search-form-inline input[type=search] { flex:1; padding:10px 14px; border:1px solid #ddd; font-size:14px; outline:none; }
.search-form-inline input[type=search]:focus { border-color:var(--orange); }
.search-form-inline button { background:var(--orange); color:#fff; border:none; padding:10px 20px; font-weight:700; cursor:pointer; }
.search-count { color:var(--muted); font-size:13px; margin:0 0 20px; }
.search-result-card { background:#fff; padding:18px 20px; margin-bottom:15px; }
.search-result-card .result-meta { color:var(--muted); font-size:11px; text-transform:uppercase; letter-spacing:1px; margin:0 0 5px; }
.search-result-card h3 { margin:0 0 8px; }
.search-result-card h3 a { color:var(--title); font-family:"Roboto Slab",serif; font-weight:400; font-size:18px; text-decoration:none; }

/* Sidebar contact block (frontpage) */
.sidebar-block { background:#fff; border-radius:2px; }
.sidebar-block > .module-ct { padding:15px; }

/* Section-heading for home partners */
.home-partners { margin-top:30px; }

/* Реквизиты в футере */
.rekvizity-block p { margin:0 0 7px; font-size:13px; line-height:1.5; color:#9ea3a8; }
.rekvizity-block p span { display:inline-block; width:42px; color:#666; text-transform:uppercase; font-size:11px; letter-spacing:.5px; font-weight:700; }
.rekvizity-block .org-name { font-family:"Roboto Slab",Georgia,serif; color:#d0d3d6; font-size:14px; margin-bottom:12px; line-height:1.4; font-weight:400; }
.rekvizity-block .rek-link { margin-top:14px; }
.rekvizity-block .rek-link a { color:var(--orange); font-size:13px; text-decoration:none; font-weight:700; }
.rekvizity-block .rek-link a:hover { color:#fff; }

/* 18+ бадж — круглый, крупный, с рамкой */
.badge-18plus-wrap { margin-top:20px; text-align:center; }
.footer-col-rekvizity { text-align:center; }
.footer-col-rekvizity .rekvizity-block { text-align:center; }
.badge-18plus {
    display:inline-flex; align-items:center; justify-content:center;
    width:72px; height:72px; border-radius:50%;
    background:transparent; border:2px solid var(--orange);
    color:var(--orange); font-family:"Roboto Slab",Georgia,serif;
    font-weight:700; font-size:28px; line-height:1;
    box-shadow:inset 0 0 0 3px #333, 0 2px 10px rgba(0,0,0,.3);
    transition:transform .2s, background .2s, color .2s, box-shadow .2s;
    cursor:default;
}
.badge-18plus sup { font-size:18px; margin-left:2px; top:-6px; }
.badge-18plus:hover { background:var(--orange); color:#fff; transform:scale(1.08); box-shadow:inset 0 0 0 3px var(--orange), 0 4px 14px rgba(240,124,0,.4); }

/* Main body container */
.page-wrapper { padding:30px 20px; }

/* Контент статей: фикс миграционных проблем с картинками */
.page-with-sidebar .post-content img,
.page-with-sidebar .entry-content img,
.page-with-sidebar article img { max-width:100%; height:auto; box-sizing:border-box; vertical-align:top; }
.page-with-sidebar .post-content p,
.page-with-sidebar .entry-content p { margin:0 0 14px; line-height:1.6; }
/* Группа картинок подряд в одном <p> — flex-ряд с отступами */
.page-with-sidebar .post-content p:has(img + img),
.page-with-sidebar .entry-content p:has(img + img) {
    display:flex; flex-wrap:wrap; gap:8px; align-items:flex-start;
}
.page-with-sidebar .post-content p:has(img + img) img,
.page-with-sidebar .entry-content p:has(img + img) img {
    flex:0 1 auto; max-width:calc(50% - 4px); height:auto;
}
/* Фиксируем emoji из vk.com — маленькая иконка в тексте */
.page-with-sidebar .post-content img.emoji,
.page-with-sidebar .entry-content img.emoji { display:inline-block; width:16px; height:16px; max-width:16px; margin:0 2px; vertical-align:text-bottom; }

/* WP-специфичные правки */
.wp-caption, .wp-caption-text, .gallery-caption, .bypostauthor, .sticky, .screen-reader-text, .alignleft, .alignright, .aligncenter {
    /* required for theme review */
}
.screen-reader-text { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
