/* ╔════════════════════════════════════════════════════════════════╗
   ║  ORGANIZATION PAGE — REDESIGN 2026                              ║
   ║  Точное соответствие макету дизайнера                            ║
   ║  Scope: .org-detail-wrap (только страница компании)              ║
   ╚════════════════════════════════════════════════════════════════╝ */

.org-detail-wrap {
  --od-blue: #2563eb;
  --od-blue-light: #eff6ff;
  --od-green: #10b981;
  --od-green-light: #ecfdf5;
  --od-amber: #f59e0b;
  --od-amber-light: #fef3c7;
  --od-text: #0f172a;
  --od-text-2: #475569;
  --od-text-3: #94a3b8;
  --od-border: #e2e8f0;
  --od-bg: #f8fafc;
  --od-radius: 14px;
  --od-shadow: 0 1px 2px rgba(15,23,42,.04), 0 4px 12px rgba(15,23,42,.04);
}

/* ─── breadcrumbs ─────────────────────────────────────────────────── */
.org-detail-wrap .ofr-bc {
  display:flex; align-items:center; gap:8px;
  font-size:13px; color:var(--od-text-2);
  padding:14px 4px; margin-bottom:6px;
}
.org-detail-wrap .ofr-bc a { color:var(--od-text-2); text-decoration:none; transition:color .15s; }
.org-detail-wrap .ofr-bc a:hover { color:var(--od-blue); }
.org-detail-wrap .ofr-bc i.fa-chevron-right { font-size:9px; color:var(--od-text-3); }

/* ═══ HERO BLOCK ═════════════════════════════════════════════════════ */
.org-detail-wrap .company-hero {
  background:white;
  border-radius:18px;
  box-shadow:var(--od-shadow);
  padding:28px 32px;
  margin-bottom:14px;
  position:relative;
  overflow:hidden;
}
.org-detail-wrap .company-hero::after {
  content:'';
  position:absolute; right:0; top:0; bottom:0;
  width:42%; max-width:520px;
  background-image:url('/assets/img/org-hero-illustration.svg');
  background-position:right center;
  background-size:contain;
  background-repeat:no-repeat;
  pointer-events:none;
  opacity:.92;
}
.org-detail-wrap .company-hero__grid {
  display:grid;
  grid-template-columns:130px 1fr;
  gap:24px;
  align-items:flex-start;
  position:relative; z-index:1;
  max-width:62%;
}

/* logo */
.org-detail-wrap .company-logo {
  width:130px; height:130px;
  border-radius:14px;
  overflow:hidden;
  background:linear-gradient(135deg,#1e3a8a 0%,#1e40af 100%);
  display:flex; align-items:center; justify-content:center;
  box-shadow:0 4px 12px rgba(30,64,175,.2);
}
.org-detail-wrap .company-logo img { width:100%; height:100%; object-fit:cover; }
.org-detail-wrap .company-logo__circle { font-size:36px; font-weight:800; color:white; letter-spacing:2px; }

/* content */
.org-detail-wrap .company-content { min-width:0; }

/* badges row */
.org-detail-wrap .company-badges {
  display:flex; flex-wrap:wrap; gap:8px;
  margin-bottom:14px;
}
.org-detail-wrap .cbadge {
  display:inline-flex; align-items:center; gap:6px;
  padding:6px 14px; border-radius:999px;
  font-size:13px; font-weight:600;
  background:white; color:var(--od-text-2);
  border:1.5px solid var(--od-border);
  white-space:nowrap;
}
.org-detail-wrap .cbadge i { font-size:12px; }
.org-detail-wrap .cbadge:has(i.fa-briefcase),
.org-detail-wrap .cbadge--commercial {
  background:var(--od-green-light); color:#047857; border-color:#a7f3d0;
}
.org-detail-wrap .cbadge:has(i.fa-check-circle) {
  background:var(--od-blue-light); color:#1d4ed8; border-color:#bfdbfe;
}
.org-detail-wrap .cbadge--premium {
  background:var(--od-blue); color:white; border-color:var(--od-blue);
}
.org-detail-wrap .cbadge:has(i.fa-landmark) {
  background:var(--od-amber-light); color:#b45309; border-color:#fde68a;
}
.org-detail-wrap .cbadge--demo {
  background:#fee2e2; color:#b91c1c; border-color:#fecaca;
}

/* h1 */
.org-detail-wrap .company-title {
  font-size:38px;
  font-weight:800;
  color:var(--od-text);
  line-height:1.15;
  margin:0 0 8px 0;
  letter-spacing:-.5px;
}

/* subtitle (ОПФ) */
.org-detail-wrap .company-subtitle {
  font-size:13px;
  font-weight:600;
  letter-spacing:.5px;
  text-transform:uppercase;
  color:var(--od-text-3);
  margin:0 0 18px 0;
  max-width:520px;
  line-height:1.5;
}

/* director card */
.org-detail-wrap .director-card {
  display:inline-flex; align-items:center; gap:12px;
  background:var(--od-bg);
  border:1px solid var(--od-border);
  border-radius:12px;
  padding:10px 16px 10px 10px;
  margin-top:4px;
}
.org-detail-wrap .director-card > i {
  width:36px; height:36px; border-radius:50%;
  background:white; color:var(--od-blue);
  display:flex; align-items:center; justify-content:center;
  font-size:15px;
  border:1px solid var(--od-border);
}
.org-detail-wrap .director-card > div {
  font-size:13px; color:var(--od-text-3);
  font-weight:500; line-height:1.4;
  display:flex; flex-direction:column;
}
.org-detail-wrap .director-card b {
  font-size:14px; font-weight:700; color:var(--od-text); display:block;
}

/* ═══ FACTS PILLS ═════════════════════════════════════════════════ */
.org-detail-wrap .company-facts {
  display:grid;
  grid-template-columns:repeat(4, 1fr);
  gap:10px;
  margin-top:24px;
  position:relative; z-index:1;
}
.org-detail-wrap .cfact {
  display:flex; align-items:center; gap:10px;
  background:white;
  border:1.5px solid var(--od-border);
  border-radius:12px;
  padding:13px 16px;
  font-size:14px;
  font-weight:500;
  color:var(--od-text);
  min-height:48px;
}
.org-detail-wrap .cfact i {
  width:24px; height:24px; border-radius:6px;
  display:flex; align-items:center; justify-content:center;
  background:var(--od-blue-light); color:var(--od-blue);
  font-size:12px; flex-shrink:0;
}

/* ═══ ACTION BAR ════════════════════════════════════════════════ */
.org-detail-wrap .company-actions {
  display:flex; align-items:center; gap:10px; flex-wrap:wrap;
  background:white;
  border-radius:14px;
  box-shadow:var(--od-shadow);
  padding:14px 18px;
  margin-bottom:14px;
}
.org-detail-wrap .company-actions .action-btn {
  display:inline-flex; align-items:center; gap:10px;
  padding:12px 18px;
  background:white;
  border:1.5px solid var(--od-border);
  border-radius:12px;
  font-size:14px; font-weight:600;
  color:var(--od-text);
  text-decoration:none;
  transition:all .15s;
  cursor:pointer;
}
.org-detail-wrap .company-actions .action-btn:hover {
  border-color:var(--od-blue); color:var(--od-blue);
}
.org-detail-wrap .company-actions .action-btn i {
  color:var(--od-blue); font-size:14px;
}
/* «Написать сообщение» — primary blue */
.org-detail-wrap .company-actions .action-btn--primary,
.org-detail-wrap .company-actions .detail-action-message {
  background:var(--od-blue) !important;
  color:white !important;
  border-color:var(--od-blue) !important;
}
.org-detail-wrap .company-actions .action-btn--primary i,
.org-detail-wrap .company-actions .detail-action-message i {
  color:white !important;
}
.org-detail-wrap .company-actions .action-btn--primary:hover,
.org-detail-wrap .company-actions .detail-action-message:hover {
  background:#1d4ed8 !important; border-color:#1d4ed8 !important;
}
/* «В избранное» — иконка-сердце красная */
.org-detail-wrap .company-actions .action-btn:has(i.fa-heart) i,
.org-detail-wrap .company-actions [class*="favorite"] i { color:#ef4444; }

/* socials */
.org-detail-wrap .socials {
  display:flex; gap:8px; margin-left:auto; align-items:center;
}
.org-detail-wrap .social-btn {
  width:44px; height:44px; border-radius:50%;
  display:inline-flex; align-items:center; justify-content:center;
  background:white;
  border:1.5px solid var(--od-border);
  font-size:18px;
  text-decoration:none;
  transition:all .15s;
}
.org-detail-wrap .social-btn--vk    { color:#0077FF; }
.org-detail-wrap .social-btn--ok    { color:#F7931E; }
.org-detail-wrap .social-btn--tg    { color:#0088CC; }
.org-detail-wrap .social-btn--other { color:#FF3358; }
.org-detail-wrap .social-btn--x     { color:#000000; }
.org-detail-wrap .social-btn:hover  { transform:translateY(-2px); border-color:currentColor; }

/* ═══ TABS ═══════════════════════════════════════════════════════ */
.org-detail-wrap .od-tabs {
  background:white;
  border-radius:14px;
  box-shadow:var(--od-shadow);
  padding:0 20px;
  margin-bottom:14px;
  display:flex; gap:4px; flex-wrap:wrap;
}
.org-detail-wrap .od-tab {
  display:inline-flex; align-items:center; gap:8px;
  padding:18px 8px;
  font-size:14px; font-weight:600;
  color:var(--od-text-2);
  text-decoration:none;
  border-bottom:3px solid transparent;
  margin-right:24px;
  transition:color .15s, border-color .15s;
}
.org-detail-wrap .od-tab i { font-size:13px; opacity:.85; }
.org-detail-wrap .od-tab b {
  background:var(--od-blue-light);
  color:var(--od-blue);
  font-size:11px;
  padding:2px 7px;
  border-radius:8px;
  font-weight:700;
}
.org-detail-wrap .od-tab.active {
  color:var(--od-blue);
  border-bottom-color:var(--od-blue);
}
.org-detail-wrap .od-tab:hover { color:var(--od-blue); }

/* ═══ SECTIONS ═══════════════════════════════════════════════════ */
.org-detail-wrap .od-section.panel {
  background:white;
  border-radius:14px;
  box-shadow:var(--od-shadow);
  padding:22px 24px;
  margin-bottom:14px;
}
.org-detail-wrap .od-section__hd {
  display:flex; align-items:center; gap:10px;
  font-size:15px; font-weight:700;
  color:var(--od-text);
  margin-bottom:16px;
}
.org-detail-wrap .od-section__hd i {
  width:28px; height:28px; border-radius:8px;
  background:var(--od-blue-light); color:var(--od-blue);
  display:flex; align-items:center; justify-content:center;
  font-size:13px;
}

/* About */
.org-detail-wrap .od-lead {
  background:transparent; border:0; padding:0;
  font-size:14px; line-height:1.7; color:var(--od-text);
  font-weight:500;
  margin-bottom:14px;
}
.org-detail-wrap .od-text {
  font-size:14px; line-height:1.75; color:var(--od-text-2);
}

/* Two-col layout */
.org-detail-wrap .od-two-col {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:14px;
}
.org-detail-wrap .od-two-col > .od-section { margin-bottom:0; }
@media(max-width:960px) {
  .org-detail-wrap .od-two-col { grid-template-columns:1fr; }
}

/* ═══ КОНТАКТЫ ОТДЕЛОВ ═══════════════════════════════════════════ */
.org-detail-wrap .od-dept {
  border:1px solid var(--od-border);
  border-radius:12px;
  overflow:hidden;
}
.org-detail-wrap .od-dept__name {
  background:linear-gradient(135deg,#3b82f6,#2563eb);
  color:white;
  text-align:center;
  padding:14px 16px;
  font-weight:700;
  font-size:15px;
}
.org-detail-wrap .od-dept__body {
  padding:18px 20px;
  display:flex; flex-direction:column; gap:8px;
}
.org-detail-wrap .od-dept__person {
  display:flex; align-items:center; gap:8px;
  font-size:15px; font-weight:700; color:var(--od-text);
}
.org-detail-wrap .od-dept__person i { color:var(--od-text-3); font-size:13px; }
.org-detail-wrap .od-dept__pos {
  font-size:13px; color:var(--od-text-3);
  margin-top:-6px; padding-left:22px;
}
.org-detail-wrap .od-dept__link {
  display:flex; align-items:center; gap:8px;
  font-size:14px; color:var(--od-blue);
  text-decoration:none;
  font-weight:600;
  margin-top:4px;
}
.org-detail-wrap .od-dept__link i { font-size:13px; }
.org-detail-wrap .od-dept-grid { display:grid; gap:14px; }

/* ═══ РЕКВИЗИТЫ КОМПАНИИ — 2×5 grid с зелёными галочками ═══════════ */
.org-detail-wrap .od-section#sec-requisites .od-req-grid {
  display:grid !important;
  grid-template-columns:1fr 1fr !important;
  gap:0 24px !important;
  margin-bottom:6px;
}
.org-detail-wrap .od-section#sec-requisites .od-req {
  display:block !important;
  position:relative;
  padding:14px 28px 14px 0 !important;
  border-bottom:1px dashed #e5e7eb;
  background:transparent !important;
  margin:0 !important;
}
.org-detail-wrap .od-section#sec-requisites .od-req:last-child,
.org-detail-wrap .od-section#sec-requisites .od-req:nth-last-child(2) {
  border-bottom:0;
}
.org-detail-wrap .od-section#sec-requisites .od-req::after {
  content:"\f00c";
  font-family:"Font Awesome 6 Free";
  font-weight:900;
  position:absolute; right:0; top:50%; transform:translateY(-50%);
  color:var(--od-green);
  font-size:14px;
}
/* «Дата рег.» — последний — без галочки */
.org-detail-wrap .od-section#sec-requisites .od-req:last-child::after { content:""; }
.org-detail-wrap .od-section#sec-requisites .od-req__k {
  font-size:10px !important;
  text-transform:uppercase;
  letter-spacing:.8px;
  font-weight:700;
  color:var(--od-text-3) !important;
  margin-bottom:4px !important;
}
.org-detail-wrap .od-section#sec-requisites .od-req__v {
  font-size:16px !important;
  font-weight:800 !important;
  color:var(--od-text) !important;
  word-break:break-all;
}

/* Address & tax authority lines */
.org-detail-wrap .od-section#sec-requisites .od-req-addr {
  display:flex !important; align-items:flex-start; gap:10px;
  padding:14px 0 0 0 !important;
  margin-top:14px !important;
  border-top:1px solid var(--od-border) !important;
  background:transparent !important;
  font-size:14px; color:var(--od-text-2);
  border-radius:0 !important;
}
.org-detail-wrap .od-section#sec-requisites .od-req-addr + .od-req-addr {
  border-top:0 !important; margin-top:4px !important; padding-top:0 !important;
}
.org-detail-wrap .od-section#sec-requisites .od-req-addr i {
  width:24px; height:24px; border-radius:6px;
  background:var(--od-blue-light); color:var(--od-blue);
  display:flex; align-items:center; justify-content:center;
  font-size:11px; flex-shrink:0;
  margin-top:0;
}

/* ═══ БАНКОВСКИЕ РЕКВИЗИТЫ — table style ═══════════════════════════ */
.org-detail-wrap .od-bank {
  padding:0 !important;
  border-radius:10px;
  overflow:hidden;
  border:1px solid var(--od-border);
}
.org-detail-wrap .od-bank--sep { margin-top:14px; }
.org-detail-wrap .od-bank__rows { display:flex; flex-direction:column; }
.org-detail-wrap .od-bank__row {
  display:grid !important;
  grid-template-columns:110px 1fr !important;
  align-items:center;
  border-bottom:1px solid var(--od-border);
}
.org-detail-wrap .od-bank__row:last-child { border-bottom:0; }
.org-detail-wrap .od-bank__k {
  background:var(--od-bg);
  padding:14px 18px;
  font-size:13px; font-weight:600;
  color:var(--od-text-2);
  text-transform:uppercase;
  letter-spacing:.4px;
  border-right:1px solid var(--od-border);
}
.org-detail-wrap .od-bank__k i { display:none; }
.org-detail-wrap .od-bank__v {
  padding:14px 18px;
  font-size:14px; font-weight:700;
  color:var(--od-text);
  word-break:break-all;
}

/* ═══ ОКВЭД ════════════════════════════════════════════════════════ */
.org-detail-wrap .od-okved-main {
  background:#fef3c7;
  border:1px solid #fcd34d;
  border-radius:10px;
  padding:12px 16px;
  margin-bottom:14px;
  font-size:14px;
  color:#78350f;
  display:flex; align-items:center; gap:10px;
}
.org-detail-wrap .od-okved-main i { color:#d97706; }
.org-detail-wrap .od-okved-list { display:flex; flex-direction:column; }
.org-detail-wrap .od-okved {
  display:grid;
  grid-template-columns:60px 1fr;
  gap:14px;
  padding:11px 0;
  border-top:1px solid #f1f5f9;
  font-size:13px;
  line-height:1.5;
}
.org-detail-wrap .od-okved:first-child { border-top:0; }
.org-detail-wrap .od-okved__code {
  font-weight:700; color:var(--od-text);
  font-size:13px;
}
.org-detail-wrap .od-okved__desc { color:var(--od-text-2); }

/* ═══ FOOTER ═══════════════════════════════════════════════════════ */
.org-detail-wrap .od-data-footer {
  text-align:center;
  padding:24px 0 8px;
  font-size:13px;
  color:var(--od-text-3);
  display:flex; align-items:center; justify-content:center; gap:8px;
}
.org-detail-wrap .od-data-footer i { font-size:12px; }

/* ═══ RESPONSIVE ═══════════════════════════════════════════════════ */
@media(max-width:1024px) {
  .org-detail-wrap .company-hero::after { display:none; }
  .org-detail-wrap .company-hero__grid { max-width:100%; }
}
@media(max-width:768px) {
  .org-detail-wrap .company-hero { padding:20px; }
  .org-detail-wrap .company-hero__grid { grid-template-columns:90px 1fr; gap:16px; }
  .org-detail-wrap .company-logo { width:90px; height:90px; }
  .org-detail-wrap .company-title { font-size:24px; }
  .org-detail-wrap .company-subtitle { font-size:11px; }
  .org-detail-wrap .company-facts { grid-template-columns:1fr 1fr; }
  .org-detail-wrap .company-actions { padding:12px; gap:8px; }
  .org-detail-wrap .company-actions .action-btn { padding:10px 14px; font-size:13px; }
  .org-detail-wrap .socials { margin-left:0; width:100%; justify-content:flex-start; }
  .org-detail-wrap .social-btn { width:38px; height:38px; font-size:16px; }
  .org-detail-wrap .od-bank__row { grid-template-columns:90px 1fr !important; }
  .org-detail-wrap .od-bank__k { padding:12px 14px; font-size:12px; }
  .org-detail-wrap .od-bank__v { padding:12px 14px; font-size:13px; }
}
@media(max-width:480px) {
  .org-detail-wrap .company-facts { grid-template-columns:1fr; }
  .org-detail-wrap .od-section#sec-requisites .od-req-grid { grid-template-columns:1fr !important; }
}

/* ═══ DETAIL ACTIONS (избранное + написать сообщение) ═════════════════ */
.org-detail-wrap .company-actions .detail-actions {
  display:inline-flex; gap:10px; align-items:center;
}
.org-detail-wrap .company-actions .detail-act-btn {
  display:inline-flex; align-items:center; gap:10px;
  padding:12px 18px;
  background:white;
  border:1.5px solid var(--od-border);
  border-radius:12px;
  font-size:14px; font-weight:600;
  color:var(--od-text);
  text-decoration:none;
  cursor:pointer;
  transition:all .15s;
  font-family:inherit;
}
.org-detail-wrap .company-actions .detail-act-btn:hover {
  border-color:var(--od-blue); color:var(--od-blue);
}
.org-detail-wrap .company-actions .detail-act-btn i { font-size:14px; color:var(--od-blue); }
/* «В избранное» — сердечко красное */
.org-detail-wrap .company-actions .detail-fav-btn i { color:#ef4444 !important; }
.org-detail-wrap .company-actions .detail-fav-btn.is-fav i,
.org-detail-wrap .company-actions .detail-fav-btn .fas.fa-heart { color:#ef4444 !important; }
/* «Написать сообщение» — primary blue */
.org-detail-wrap .company-actions .msg-btn,
.org-detail-wrap .company-actions a.msg-btn {
  background:var(--od-blue) !important;
  color:white !important;
  border-color:var(--od-blue) !important;
}
.org-detail-wrap .company-actions .msg-btn i { color:white !important; }
.org-detail-wrap .company-actions .msg-btn:hover {
  background:#1d4ed8 !important; border-color:#1d4ed8 !important;
  color:white !important;
}

/* ═══ MASONRY: 2 независимые колонки ═══════════════════════════════ */
.org-detail-wrap .od-masonry {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:14px;
  align-items:start;
  margin-bottom:14px;
}
.org-detail-wrap .od-mcol {
  display:flex;
  flex-direction:column;
  gap:14px;
  min-width:0;
}
.org-detail-wrap .od-mcol > .od-section,
.org-detail-wrap .od-mcol > .od-cta-org {
  margin-bottom:0 !important;
}
@media(max-width:960px) {
  .org-detail-wrap .od-masonry { grid-template-columns:1fr; }
}

/* ═══ АКТИВНЫЙ ТАБ — синяя заливка ═══════════════════════════════════ */
.org-detail-wrap .od-tabs {
  padding:8px;
  gap:4px;
}
.org-detail-wrap .od-tab {
  padding:10px 16px !important;
  margin-right:0 !important;
  border-bottom:0 !important;
  border-radius:10px;
  transition:background .15s, color .15s;
}
.org-detail-wrap .od-tab.active {
  background:var(--od-blue) !important;
  color:white !important;
  border-bottom:0 !important;
}
.org-detail-wrap .od-tab.active i,
.org-detail-wrap .od-tab.active b { color:white !important; }
.org-detail-wrap .od-tab.active b {
  background:rgba(255,255,255,.22) !important;
  color:white !important;
}
.org-detail-wrap .od-tab:not(.active):hover {
  background:var(--od-blue-light);
  color:var(--od-blue);
}

/* ═══ FIX: иконка короны на синем фоне «Премиум» ════════════════════ */
.org-detail-wrap .cbadge--premium i,
.org-detail-wrap .cbadge--premium .fa-crown {
  color:#fff !important;
}
