/* ═══════════════════════════════════════════════════════════════════
   CardAff — общий каркас внутренних страниц.
   Один файл на все разделы (партнёры, блог, статья, мероприятия,
   контакты): тёмный сайдбар слева, контент по центру, правый сайдбар
   с островом навигации и популярными сервисами — как на калькуляторе.
   Страничные стили лежат в самих html рядом с разметкой.
   ═══════════════════════════════════════════════════════════════════ */

/* Inter — self-hosted, без запросов к Google */
@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:100 900;src:url('/fonts/inter/cyrillic.woff2') format('woff2');unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;}
@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:100 900;src:url('/fonts/inter/cyrillic-ext.woff2') format('woff2');unicode-range:U+0460-052F,U+1C80-1C88,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F;}
@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:100 900;src:url('/fonts/inter/latin.woff2') format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;}
@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:100 900;src:url('/fonts/inter/latin-ext.woff2') format('woff2');unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;}

:root{
  --bg:#F8F9F7; --surface:#ffffff; --surface2:#F2F3EF; --sidebar:#ffffff;
  --border:#EBECE7; --border2:#E0E2DB;
  --accent:#FDCB46; --accent-dark:#E0A61E; --accent-light:#FCF1D6; --on-accent:#2E2308;
  --green:#128F87; --green-light:#E2EFEC; --green-dark:#0C5450; --teal-deep:#106965;
  --red:#C0392B; --red-light:#FBEAE7;
  --text:#33383A; --text-secondary:#7C8277; --text-muted:#A6AB9E;
  --promo-active:#F09167; --promo-active-dark:#DD7A50; --site-yellow:#F5CD60;
  --shadow-sm:0 1px 2px rgba(28,38,36,0.03);
  --shadow-md:0 4px 16px rgba(28,38,36,0.05);
  --shadow-lg:0 12px 32px rgba(28,38,36,0.10);
  --radius:18px; --radius-sm:12px; --radius-lg:20px;
  --sans:'Inter',-apple-system,sans-serif;
}
:root[data-theme="dark"]{
  --bg:#172320; --surface:#202E2B; --surface2:#2A3833; --sidebar:#202E2B;
  --border:#31413B; --border2:#3D4D47;
  --accent:#F6C445; --accent-dark:#E6AE2E; --accent-light:#38311A; --on-accent:#23190A;
  --green:#2AAEA4; --green-light:#22403A; --green-dark:#63D6CA; --teal-deep:#17857C;
  --red:#E36A5B; --red-light:#3A2320;
  --text:#E9EEEB; --text-secondary:#A7B3AD; --text-muted:#7D8984;
  --shadow-sm:0 1px 2px rgba(0,0,0,0.30);
  --shadow-md:0 6px 18px rgba(0,0,0,0.38);
  --shadow-lg:0 14px 34px rgba(0,0,0,0.50);
}
[data-theme="dark"] ::selection{background:rgba(246,196,69,0.28);}

*{box-sizing:border-box;margin:0;padding:0;}
body{background:var(--bg);color:var(--text);font-family:var(--sans);min-height:100vh;font-size:14px;-webkit-font-smoothing:antialiased;}
::selection{background:var(--accent-light);}
@keyframes fadeInUp{from{opacity:0;transform:translateY(8px);}to{opacity:1;transform:translateY(0);}}
@keyframes fadeIn{from{opacity:0;}to{opacity:1;}}

/* ── КОЛОНКИ ───────────────────────────────────────────────────── */
.app{display:flex;min-height:100vh;align-items:stretch;max-width:1920px;margin:0 auto;}
.app-cols{flex:1;display:flex;min-width:0;align-items:flex-start;}
.main-content{flex:1;min-width:0;padding:30px 26px 60px;}

/* ── ЛЕВЫЙ САЙДБАР (тёмно-бирюзовый «остров») ──────────────────── */
.sidebar{
  width:266px;flex-shrink:0;background:#004445;border-radius:var(--radius);box-shadow:var(--shadow-sm);
  display:flex;flex-direction:column;position:sticky;top:20px;height:calc(100vh - 40px);overflow-y:auto;
  padding:26px 20px;margin:20px 0 20px 20px;
}
.logo{font-size:21px;font-weight:800;color:#fff;margin-bottom:22px;display:flex;align-items:center;justify-content:center;gap:10px;letter-spacing:-0.02em;text-decoration:none;cursor:pointer;}
.logo-icon{height:30px;display:flex;align-items:center;justify-content:center;overflow:hidden;flex-shrink:0;}
.logo-icon img{height:100%;width:auto;object-fit:contain;display:block;}
.menu-title{font-size:11px;font-weight:700;color:rgba(255,255,255,0.5);text-transform:uppercase;letter-spacing:.05em;margin:4px 4px 10px;}
.p-menu{display:flex;flex-direction:column;gap:5px;}
.p-cat{
  display:flex;align-items:center;justify-content:space-between;gap:8px;
  padding:9px 13px;border:none;background:transparent;border-radius:var(--radius-sm);
  font-family:var(--sans);font-size:13.5px;font-weight:600;color:rgba(255,255,255,0.82);
  cursor:pointer;text-align:left;transition:background .15s,color .15s;
}
.p-cat:hover{background:rgba(255,255,255,0.10);color:#fff;}
.p-cat.active{background:rgba(255,255,255,0.14);color:#fff;}
.p-cat-count{font-size:11.5px;font-weight:700;background:rgba(255,255,255,0.16);color:rgba(255,255,255,0.85);border-radius:20px;padding:1px 8px;flex-shrink:0;}
.p-cat.active .p-cat-count{background:rgba(255,255,255,0.26);color:#fff;}
.side-note{font-size:12px;line-height:1.55;color:rgba(255,255,255,0.62);padding:0 4px;}

.sidebar-foot{margin-top:auto;padding-top:16px;display:flex;flex-direction:column;gap:8px;}
.lang-switch{display:flex;gap:3px;background:rgba(255,255,255,0.10);border:1px solid rgba(255,255,255,0.16);border-radius:12px;padding:3px;}
.lang-switch a{flex:1;text-align:center;padding:7px 4px;border-radius:9px;text-decoration:none;font-size:12px;font-weight:700;color:rgba(255,255,255,0.72);transition:background .15s,color .15s;}
.lang-switch a:hover{color:#fff;background:rgba(255,255,255,0.10);}
.lang-switch a.active{background:rgba(255,255,255,0.22);color:#fff;}
.theme-switch{display:flex;gap:3px;background:rgba(255,255,255,0.10);border:1px solid rgba(255,255,255,0.16);border-radius:12px;padding:3px;}
.theme-switch-opt{flex:1;display:flex;align-items:center;justify-content:center;gap:6px;padding:8px 6px;border:none;border-radius:9px;background:transparent;color:rgba(255,255,255,0.72);font-size:12px;font-weight:600;font-family:var(--sans);cursor:pointer;transition:background .15s,color .15s;}
.theme-switch-opt svg{width:14px;height:14px;}
.theme-switch-opt:hover{color:#fff;}
:root[data-theme="light"] .theme-switch-opt[data-opt="light"]{background:rgba(255,255,255,0.22);color:#fff;font-weight:700;}
:root[data-theme="dark"] .theme-switch-opt[data-opt="dark"]{background:rgba(255,255,255,0.22);color:#fff;font-weight:700;}

/* ── ПРАВЫЙ САЙДБАР (как на калькуляторе) ──────────────────────── */
.rside{
  width:340px;flex-shrink:0;
  position:sticky;top:0;height:100vh;overflow-y:auto;padding:22px 20px 22px 0;display:flex;flex-direction:column;gap:16px;
}
.rs-nav-island{
  display:flex;align-items:center;gap:8px;
  background:var(--surface);border-radius:var(--radius);box-shadow:var(--shadow-sm);padding:10px;
}
.rs-nav-add{
  flex:0 1 auto;display:flex;align-items:center;justify-content:center;gap:7px;
  padding:11px 14px;border-radius:11px;border:1px solid var(--border2);cursor:pointer;font-family:var(--sans);
  background:var(--surface);color:var(--green-dark);font-size:13px;font-weight:700;white-space:nowrap;
  text-decoration:none;transition:all .15s;
}
.rs-nav-add:hover{background:var(--green-light);border-color:var(--green-light);}
.rs-nav-add svg{width:15px;height:15px;}
.rs-menu-wrap{position:relative;flex:1;}
.rs-menu-btn{
  width:100%;display:flex;align-items:center;justify-content:center;gap:8px;
  padding:11px 14px;border-radius:11px;cursor:pointer;font-family:var(--sans);
  background:var(--teal-deep);color:#fff;border:1px solid var(--teal-deep);
  font-size:13px;font-weight:700;white-space:nowrap;transition:all .15s;
}
.rs-menu-btn .ham{width:15px;height:15px;}
.rs-menu-btn:hover{background:var(--green-dark);border-color:var(--green-dark);}
.rs-menu-btn .chev{width:12px;height:12px;opacity:.7;transition:transform .18s;}
.rs-menu-wrap.open .rs-menu-btn{background:var(--green-dark);border-color:var(--green-dark);color:#fff;}
.rs-menu-wrap.open .rs-menu-btn .chev{transform:rotate(180deg);}
.rs-menu-dropdown{
  position:absolute;top:calc(100% + 8px);left:0;right:0;z-index:60;
  background:var(--surface);border-radius:14px;box-shadow:var(--shadow-lg);border:1px solid var(--border);
  padding:6px;display:none;flex-direction:column;gap:2px;
}
.rs-menu-wrap.open .rs-menu-dropdown{display:flex;animation:fadeInUp .16s ease;}
.rs-menu-link{
  display:flex;align-items:center;gap:11px;padding:11px 12px;border-radius:11px;
  text-decoration:none;color:var(--text);background:transparent;border:none;width:100%;text-align:left;
  font-size:13px;font-weight:600;cursor:pointer;font-family:var(--sans);transition:background .12s;
}
.rs-menu-link:hover{background:var(--surface2);}
.rs-menu-link.active{background:var(--green-light);color:var(--green-dark);font-weight:700;}
.rs-menu-link svg{width:16px;height:16px;flex-shrink:0;color:var(--text-muted);}
.rs-menu-link.active svg{color:var(--green-dark);}

.rs-panel{background:var(--surface);border-radius:var(--radius);padding:22px 20px;box-shadow:var(--shadow-sm);}
.rs-panel-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px;gap:10px;}
.rs-panel-title{font-size:15px;font-weight:800;color:var(--text);}
.rs-viewall{font-size:12px;font-weight:700;color:var(--green);text-decoration:none;white-space:nowrap;}
.rs-viewall:hover{text-decoration:underline;}
.rs-rowlist{display:flex;flex-direction:column;}
.rs-row{
  display:flex;align-items:center;gap:10px;padding:8px 10px;border-radius:10px;
  text-decoration:none;color:inherit;animation:fadeIn .35s ease both;
}
.rs-row:nth-child(odd){background:rgba(16,105,101,0.05);}
.rs-row:hover .rs-logo{transform:scale(1.08);}
.rs-row:hover .rs-name{transform:scale(1.06);}
.rs-logo{
  width:36px;height:36px;border-radius:50%;background:var(--teal-deep);color:var(--accent);
  display:flex;align-items:center;justify-content:center;font-size:14px;font-weight:800;flex-shrink:0;transition:transform .2s ease;
}
.rs-logo img{width:100%;height:100%;object-fit:cover;border-radius:50%;}
.rs-info{flex:1;min-width:0;}
.rs-name{
  font-size:13.5px;font-weight:700;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
  display:flex;align-items:center;gap:5px;transition:transform .2s ease;transform-origin:left center;
}
.rs-name .verified-dot{width:7px;height:7px;border-radius:50%;background:var(--green);flex-shrink:0;}
.rs-rating{font-size:11.5px;font-weight:600;color:var(--text-muted);margin-top:1px;}
.rs-icon{
  width:26px;height:26px;border-radius:8px;border:1px solid var(--border2);background:var(--site-yellow);
  display:flex;align-items:center;justify-content:center;color:#2C230D;flex-shrink:0;transition:all .15s;
}
.rs-icon svg{width:13px;height:13px;}
.rs-row:hover .rs-icon{background:var(--accent-dark);border-color:var(--accent-dark);}

/* ── ФОРМА ПОДПИСКИ НА БОНУСЫ (одна на всех страницах) ─────────── */
.sub-box{
  margin-top:34px;display:flex;gap:26px;align-items:center;flex-wrap:wrap;
  background:var(--green-light);border:1px solid rgba(16,105,101,0.18);border-radius:var(--radius);padding:22px 26px;
}
[data-theme="dark"] .sub-box{border-color:rgba(255,255,255,0.08);}
.sub-left{flex:1 1 260px;min-width:240px;}
.sub-title{font-size:17px;font-weight:800;color:var(--text);letter-spacing:-0.01em;}
.sub-text{font-size:13px;color:var(--text-secondary);line-height:1.55;margin-top:6px;}
.sub-form{flex:1 1 300px;min-width:270px;}
.sub-row{display:flex;gap:8px;}
.sub-input{
  flex:1;min-width:0;font-family:var(--sans);font-size:14px;color:var(--text);background:var(--surface);
  border:1px solid var(--border);border-radius:var(--radius-sm);padding:11px 13px;outline:none;
  transition:border-color .15s;
}
.sub-input:focus{border-color:var(--green);}
.sub-input::placeholder{color:var(--text-muted);}
.sub-btn{
  background:var(--green);color:#fff;border:none;border-radius:var(--radius-sm);white-space:nowrap;
  font-family:var(--sans);font-size:14px;font-weight:700;padding:12px 22px;cursor:pointer;transition:background .15s,opacity .15s;
}
.sub-btn:hover{background:var(--green-dark);}
[data-theme="dark"] .sub-btn:hover{color:#0C1614;}
.sub-btn:disabled{opacity:.6;cursor:default;}
.sub-note{margin-top:10px;font-size:12px;color:var(--text-secondary);line-height:1.45;}
.sub-msg{margin-top:10px;font-size:13px;font-weight:600;display:none;}
.sub-msg.show{display:block;animation:fadeInUp .25s ease both;}
.sub-msg.ok{color:var(--green-dark);}
.sub-msg.err{color:var(--red);}
@media(max-width:560px){ .sub-row{flex-direction:column;} }

/* ── ОБЩИЕ ЭЛЕМЕНТЫ КОНТЕНТА ───────────────────────────────────── */
.p-title{font-size:26px;font-weight:800;color:var(--text);letter-spacing:-0.02em;}
.p-sub{font-size:14px;color:var(--text-secondary);margin:4px 0 24px;line-height:1.55;max-width:820px;}
.p-empty{padding:40px;text-align:center;color:var(--text-secondary);font-size:14px;}

/* ── АДАПТИВ ───────────────────────────────────────────────────── */
@media(max-width:1220px){
  /* Правый сайдбар сворачивается в строку сверху: остаётся только остров навигации */
  .app-cols{flex-wrap:wrap;}
  .rside{
    order:-1;flex:0 0 100%;max-width:100%;height:auto;position:static;overflow:visible;
    padding:16px 20px 0;flex-direction:row;justify-content:flex-end;gap:0;
  }
  .rside .rs-panel{display:none;}
  .main-content{flex:0 0 100%;max-width:100%;min-width:0;}
  .rs-nav-island{width:auto;min-width:280px;}
  .rs-menu-dropdown{left:auto;right:0;min-width:220px;}
}
@media(max-width:820px){
  /* Разворачиваем .app-cols в общий поток, чтобы порядок блоков был как на
     калькуляторе: сначала меню-остров, затем фильтры раздела, затем контент. */
  .app{flex-direction:column;}
  .app-cols{display:contents;}
  .rside{order:1;padding:16px 16px 0;}
  .sidebar{order:2;width:auto;position:static;height:auto;margin:12px 16px 0;}
  .main-content{order:3;padding:20px 16px 40px;}
  .p-menu{flex-direction:row;flex-wrap:wrap;}
  .p-cat{flex:0 0 auto;}
  .rs-nav-island{width:100%;min-width:0;}
}
