/* RU detail pages; the site's existing theme and Additional CSS stay in place. */
a.team_card { display: block; color: inherit; text-decoration: none; }
a.team_card:hover, a.team_card:focus { color: inherit; }
a.firm-detail-link, a.firm-detail-link:hover { color: #000; text-decoration: none; }
a.plus { display: block; flex-shrink: 0; }
.firm-popup-page-link { display: inline-block; margin: 12px 0 18px; color: #333; font-size: 14px; text-decoration: underline; }
a.team_card:focus-visible, a.firm-detail-link:focus-visible, a.plus:focus-visible,
.firm-detail a:focus-visible, .firm-detail__close:focus-visible { outline: 2px solid #333; outline-offset: 4px; }

.firm-detail { max-width: 1440px; margin: 0 auto; padding: 44px 60px 100px; color: #222; font-size: 16px; line-height: 1.65; }
.firm-detail__breadcrumb { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 52px; font-size: 14px; }
.firm-detail__breadcrumb a, .firm-detail__back, .firm-detail__email { color: #444; text-decoration: underline; text-underline-offset: 4px; }
.firm-detail__layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 72px; align-items: start; }
.firm-detail h1 { width: auto; margin: 0 0 22px; font-family: "TT Hoves", Inter, sans-serif; font-size: clamp(30px, 3.4vw, 48px); font-weight: 400; line-height: 1.14; overflow-wrap: break-word; }
.firm-detail h2 { width: auto; margin: 32px 0 20px; font-size: 26px; line-height: 1.25; font-weight: 400; }
.firm-detail h3 { margin: 24px 0 12px; font-size: 21px; line-height: 1.3; }
.firm-detail p { margin: 0 0 18px; font-size: inherit; line-height: inherit; }
.firm-detail__prose ul, .firm-detail__prose ol { margin: 0 0 22px; padding-left: 24px; }
.firm-detail__prose li { margin-bottom: 10px; }
.firm-detail__prose a { text-decoration: underline; overflow-wrap: anywhere; }
.firm-detail__services { list-style: none; padding: 0; margin: 0; }
.firm-detail__services li { padding: 20px 0; border-top: 1px solid #d6d6d6; }
.firm-detail__services li:last-child { border-bottom: 1px solid #d6d6d6; }
.firm-detail__portrait { display: block; width: 100%; max-width: 340px; height: auto; margin: 0 0 30px; }
.firm-detail--team h1 { font-size: clamp(30px, 3vw, 40px); }
.firm-detail p.firm-detail__position { margin-bottom: 12px; color: #555; }
.firm-detail__email { overflow-wrap: anywhere; }
.firm-detail .firm-detail__related { width: auto; max-width: none; margin: 36px 0 0; padding: 0; }
/* Compact related links; titles wrap naturally even with long lists. */
.firm-detail__related h2 { margin: 0 0 12px; font-size: 22px; }
.firm-detail__related-list { list-style: none; margin: 0; padding: 0; font-size: 14px; line-height: 1.85; }
.firm-detail__related-list li { display: inline; padding: 0; margin: 0; border: 0; }
.firm-detail__related-list li + li::before { content: "/"; display: inline; margin: 0 7px; color: #999; }
.firm-detail__related-list a { color: #444; text-decoration: none; overflow-wrap: anywhere; }
.firm-detail__related-list a:hover, .firm-detail__related-list a:focus-visible { color: #000; text-decoration: none; background-color: #f2f2f2; }
.firm-detail__related-position { display: inline; color: #666; font-size: 13px; }
.firm-detail__related-position::before { content: "("; }
.firm-detail__related-position::after { content: ")"; }
.firm-detail__actions { display: flex; align-items: center; flex-wrap: wrap; gap: 24px; margin-top: 40px; }
.firm-detail a.firm-detail__contact { display: inline-flex; align-items: center; justify-content: space-between; gap: 48px; padding: 16px 24px; background: #595959; color: #fff; font-size: 15px; text-decoration: none; border-radius: 2px; }
.firm-detail a.firm-detail__contact:hover { background: #333; }
.firm-detail__back { font-size: 14px; }
.popup-content button.firm-detail__close { padding: 0; border: 0; background: transparent; color: #222; font-size: 32px; line-height: 1; cursor: pointer; }
.popup-content #firm-contact-title { margin: 0 32px 24px 0; font-size: 26px; }
@media (max-width: 900px) {
    .firm-detail { padding: 30px 32px 64px; }
    .firm-detail__layout { gap: 40px; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); }
}
@media (max-width: 640px) {
    .firm-detail { padding: 24px 20px 52px; }
    .firm-detail__breadcrumb { margin-bottom: 30px; gap: 8px; font-size: 13px; }
    .firm-detail__layout { display: block; }
    .firm-detail__intro { margin-bottom: 32px; }
    .firm-detail__portrait { max-width: 300px; }
    .firm-detail__actions { gap: 20px; }
}

/* RU homepage: semantic H3 headings, preserving the previous card/modal styles. */
h3.firm-practice-heading, h3.team_name { margin: 0; }
.firm-practice-heading > a { display: block; font: inherit; }
.popup-content .firm-popup-heading {
    margin: 0;
    font-family: "Golos Text";
    font-weight: 400;
    font-size: 40px;
    line-height: 100%;
    text-align: left;
    color: #092332;
    width: auto;
}
@media screen and (max-width: 1919px) {
    .popup-content .firm-popup-heading { font-size: 28px; }
}
.team-modal-title .firm-popup-heading {
    font-size: 22px;
    font-weight: 600;
    text-align: left;
}
@media (max-width: 767px) {
    .team-modal-title .firm-popup-heading { text-align: center; }
}

.cell h1 {
    margin-top: 80px;
    font-family: Golos Text;
    font-weight: 400;
    font-size: 56px;
    line-height: 100%;
    color: #1E1E1E;
}
@media screen and (max-width: 1919px) {
.cell h1 {
        font-size: 42px;
    }
}
@media screen and (max-width: 1100px) {
.cell h1 {
        margin-top: unset;
    }
}
@media screen and (max-width: 767px) {
.cell h1 {
        font-size: 24px;
    }
}
@media (min-width: 1440px) {
.cell h1 {
    font-size: 32px;
  }
}
@media (max-width: 1919px) {
.cell h1 {
    font-size: 36px;
		white-space: nowrap;
  }
}
@media (max-width: 300px) {
.cell h1 {
    font-size: 28px;
		white-space: normal;
  }
}
@media (max-width: 769px) {
.cell h1 {
    font-size: 32px;
		white-space: nowrap;
  }
}
.company-section .cell h1 {
  margin-top: 0;
  font-family: Golos Text;
  font-weight: 400;
  font-size: 30px;
  line-height: 100%;
  color: #1E1E1E;
}
@media screen and (min-width: 768px) and (max-width: 1100px) {
.company-section .cell h1 {
    font-size: 42px;
    margin-top: 0;
  }
}
@media screen and (min-width: 1101px) {
.company-section .cell h1 {
    font-size: 56px;
    margin-top: 80px;
  }
}

.firm-more-hidden, .show_more-container[hidden] { display: none !important; }
.show_more-container:focus-visible, .tab:focus-visible { outline: 2px solid #333; outline-offset: 3px; }
.firm-news-gate { max-width: 560px; margin: 80px auto; padding: 30px; text-align: center; }
.firm-news-gate h1 { font-size: 30px; font-weight: 400; }
.firm-news-gate form { display: grid; gap: 18px; margin-top: 30px; }
.firm-news-gate button { background: #595959; color: #fff; border: 0; padding: 14px; cursor: pointer; }
.firm-news-people { margin: 20px 0 32px; font-size: 15px; line-height: 1.7; }
.firm-news-people p { margin: 8px 0; }
.firm-news-people a { color: inherit; text-underline-offset: 3px; }
/*
 * Firm.One — сообщение об успешной отправке формы, AE и CY.
 * Добавить весь блок в конец «Внешний вид → Настроить → Дополнительные CSS».
 * Существующие стили сохранить. Теги <style> не нужны.
 */

#popup-form .popup-content.success-state {
    box-sizing: border-box;
    height: auto;
    min-height: 300px;
    padding: 64px 24px;
    align-items: center;
    justify-content: center;
    gap: 0;
}

#popup-form .success-state #firm-contact-title {
    display: none;
}

#popup-form .success-state .popup-form-wrapper,
#popup-form .success-state .form-container {
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 100%;
    height: auto;
    min-height: 0;
    margin: 0;
    padding: 0;
    background: transparent;
}

#popup-form .success-state .form-message_success {
    box-sizing: border-box;
    width: 100%;
    max-width: 460px;
    margin: 0;
    padding: 24px;
    border: 1px solid #dedede;
    border-radius: 4px;
    background: #f2f2f2;
    color: #303030;
    font-family: inherit;
    font-size: 18px;
    font-weight: 500;
    line-height: 1.5;
    text-align: center;
}

@media (max-width: 480px) {
    #popup-form .success-state .form-message_success {
        padding: 20px 16px;
        font-size: 16px;
    }
}

/* ACF descriptions can contain plain text, <br>, or paragraphs.
 * Preserve the original paragraph typography on their semantic div wrappers. */
.company-section .mobile-description > div,
.company-section .mobile-description > div p {
    font-family: Inter, sans-serif;
    font-weight: 400;
    font-size: 12px;
    line-height: 110%;
    color: #1e1e1e;
}
@media (min-width: 768px) {
    .company-section .mobile-description > div,
    .company-section .mobile-description > div p { font-size: 14px; }
}
@media (max-width: 1100px) {
    .company-section .mobile-description > div { margin: 5px 0 15px; }
}

.popup-content .firm-popup-description {
    font-family: Inter, sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 100%;
    color: #092332;
}
.popup-content > .firm-popup-description:not(:empty) { margin-top: 51px; }
.popup-content .firm-popup-description p,
.popup-content .firm-popup-description li {
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
}
@media (max-width: 1919px) {
    .popup-content .firm-popup-description { font-size: 14px; }
}
