/* ===== Reset & helpers ===== */
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
body{font-family:system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;line-height:1.7;color:#333;background:#fafafa}
a{color:inherit;text-decoration:none}
img{max-width:100%;height:auto;display:block}
:root{--clr-primary:#c62828;--clr-dark:#1a1a1a;--clr-light:#fff;--container:1180px;--radius:6px;--shadow:0 1px 3px rgba(0,0,0,.1)}

/* ===== Layout ===== */
header{background:var(--clr-dark);color:var(--clr-light)}
.topbar{max-width:var(--container);margin:0 auto;display:flex;align-items:center;justify-content:space-between;padding:1rem;gap:2rem}
.brand{display:flex;align-items:center;font-size:1.4rem;font-weight:700;gap:.5rem}
.brand svg{width:28px;height:28px;fill:var(--clr-primary)}
nav ul{list-style:none;display:flex;gap:1.25rem}
nav a{font-size:.95rem;opacity:.9;transition:opacity .2s}
nav a:hover{opacity:1}
.social{margin-left:auto;display:flex;align-items:center;gap:1rem}
.social a{display:inline-flex}
.social svg{width:22px;height:22px;fill:var(--clr-light);opacity:.9;transition:opacity .2s}
.social a:hover svg{opacity:1}

/* Main */
.wrapper{max-width:var(--container);margin:2.5rem auto;display:grid;grid-template-columns:1fr 300px;gap:2rem}

/* Intro */
.intro{background:var(--clr-light);border-left:4px solid var(--clr-primary);box-shadow:var(--shadow);border-radius:var(--radius);padding:1.75rem;margin-bottom:2rem}
.intro h1 {
	line-height: 30px;
    font-size: 22px;
    margin: 0px 0px 45px 0px;
}
.intro a {
	text-decoration: underline;
}	
.intro p{margin-bottom:1.1rem;font-size:1.08rem}
.intro h2{margin-bottom:1rem;font-size:1.4rem;color:var(--clr-primary)}
.intro ol{
	margin: 20px 0px 20px 30px;
}
.intro ul {
	margin: 0px 0px 10px 30px;
}	
figure.scheme{margin:1rem 0 2rem}
figure.scheme figcaption{font-size:.9rem;color:#666;margin-top:.4rem;text-align:center}

/* Contact form */
.contact-form{background:var(--clr-light);box-shadow:var(--shadow);border-radius:var(--radius);padding:1.5rem;margin-top:2rem}
.contact-form .field{margin-bottom:1rem}
.contact-form label{font-size:.95rem;display:block;color:#555;margin-bottom:.25rem}
.contact-form input[type=text],
.contact-form input[type=email],
.contact-form input[type=file],
.contact-form textarea{width:100%;padding:.6rem .8rem;border:1px solid #ccc;border-radius:var(--radius);font:inherit}
.contact-form textarea{resize:vertical}
.btn{background:var(--clr-primary);color:#fff;border:none;padding:.7rem 1.4rem;border-radius:var(--radius);cursor:pointer;font-size:1rem}
.btn:hover{opacity:.9}
.form-msg{margin-top:.8rem;font-size:.95rem}
.form-msg.success{color:green}
.form-msg.error{color:var(--clr-primary)}

/* Sidebar */
aside{display:flex;flex-direction:column;gap:2rem}
.widget{background:var(--clr-light);border-radius:var(--radius);box-shadow:var(--shadow);padding:1.25rem}
.widget h3{font-size:1.05rem;margin-bottom:1rem;border-bottom:2px solid var(--clr-primary);padding-bottom:.4rem;display:inline-block}
.widget ul{list-style:none;display:flex;flex-direction:column;gap:.6rem}
.widget li a{color:var(--clr-primary)}

.reviews blockquote{
		margin:.25rem 0;
		padding-left:.75rem;
		border-left:3px solid var(--clr-primary);
		font-style:italic;
		font-weight: 500;
		font-size: 85%;
}
.review-meta{font-size:.8rem;color:#777;margin-top:.25rem}

footer{background:var(--clr-dark);color:#aaa;text-align:center;padding:2rem 1rem;font-size:.9rem}

@media(max-width:900px){.wrapper{grid-template-columns:1fr}aside{order:0}nav ul{flex-wrap:wrap}}

/* страница обменника */
.two-col{display:grid;grid-template-columns:1fr 1fr;gap:1rem}
@media(max-width:900px){.two-col{grid-template-columns:1fr}}
.review{background:#fff;border-radius:6px;box-shadow:0 1px 3px rgba(0,0,0,.1);padding:1rem;margin:1rem 0}
.review header{
	display:flex;
	flex-wrap:wrap;
	gap:.5rem;
	align-items:center;
	margin-bottom:.6rem;
	background: #ce282e;
}
.review .label{
	font-size:.8rem;
	padding: 0px 15px 0px 5px;
	color:#fff;
}
.badge{display:inline-block;background:#c62828;color:#fff;border-radius:999px;padding:.15rem .55rem;font-size:.8rem}
.btn-outline{border:1px solid #c62828;color:#c62828;background:transparent;border-radius:6px;padding:.45rem .75rem}
.status{font-size:.8rem;padding:.08rem .45rem;border-radius:4px;background:#eee}
.status.negative{background:#ffcdd2}.status.neutral{background:#e0e0e0}.status.positive{background:#c8e6c9}
pre{
	white-space:pre-wrap;
	word-wrap:break-word;
	line-height: 15px;
}
.topbar,.brand,nav ul{display:flex;gap:1rem;align-items:center}
nav ul{list-style:none;margin:0;padding:0}




/* список обменников */

.grid{
	display:grid;
	grid-template-columns:repeat(auto-fill,minmax(240px,1fr));
	gap:1rem;
	margin: 50px 0px;
}
.card{background:#fff;border-radius:6px;box-shadow:0 1px 3px rgba(0,0,0,.1);padding:1rem;display:flex;flex-direction:column;gap:.5rem}
.logo{height: 60px;width:100%;object-fit:contain}
.meta{font-size:.9rem;color:#555}
.pagination{display:flex;gap:.5rem;justify-content:center;margin:1.5rem 0}
.pagination a,.pagination span{display:inline-block;padding:.4rem .7rem;border-radius:4px;background:#fff;box-shadow:0 1px 2px rgba(0,0,0,.08)}
.pagination .active{background:#c62828;color:#fff}

/* поиск */
mark { background: #ffec99; padding: 0 .15em; border-radius: 3px; }
.search input {
	width:100%;
	padding:.5rem .75rem;
	border:1px solid #ccc;
	border-radius:var(--radius);
}	



:root{
    --callout-bg:#fff8e6;
    --callout-border:#ffb200;
    --callout-accent:#ff8c00;
    --callout-text:#3a2e00;
    --callout-shadow:0 6px 20px rgba(255, 140, 0, .15);
  }
  @media (prefers-color-scheme: dark){
    :root{
      --callout-bg:#1f1400;
      --callout-border:#ffb347;
      --callout-accent:#ffa94d;
      --callout-text:#ffe7c2;
      --callout-shadow:0 8px 28px rgba(255, 169, 77, .18);
    }
  }
  .callout{
    position: relative;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: .85rem .9rem;
    align-items: start;
    padding: 1rem 1rem 1rem 1.1rem;
    margin: 1.25rem 0;
    background: var(--callout-bg);
    border: 1px solid var(--callout-border);
    border-left: .5rem solid var(--callout-accent);
    border-radius: 12px;
    box-shadow: var(--callout-shadow);
    color: var(--callout-text);
  }
  .callout__icon{
    width: 26px; height: 26px; margin-top: .1rem; flex: 0 0 auto;
  }
  .callout__title{
    font: 700 1rem/1.2 system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji";
    letter-spacing:.2px; margin: 0;
  }
  .callout__body{
    grid-column: 1 / -1; margin: .2rem 0 0; font: 400 .975rem/1.55 system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Arial;
  }
  .callout a{ color: inherit; text-decoration: underline dotted; text-underline-offset: 2px; }
  .callout em{ font-style: italic; }
  /* Печать: оставляем рамку и читаемость */
  @media print{
    .callout{ box-shadow: none; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  }
  
  
  
  /* ==== Mobile header / burger ==== */
header { position: sticky; top: 0; z-index: 1000; } /* закрепляем сверху */
.topbar { position: relative; }

/* Кнопка-бургер */
.menu-toggle{
  display:none; /* по умолчанию скрыта — покажем на мобиле */
  width:42px;height:42px; border:1px solid rgba(255,255,255,.25);
  border-radius:10px; background:transparent; cursor:pointer;
  align-items:center; justify-content:center; gap:4px;
}
.menu-toggle__bar{
  display:block; width:20px; height:2px; background:#fff; border-radius:2px;
}
.menu-open .menu-toggle__bar:nth-child(2){ opacity:0; }
.menu-open .menu-toggle__bar:nth-child(1){ transform:translateY(6px) rotate(45deg); }
.menu-open .menu-toggle__bar:nth-child(3){ transform:translateY(-6px) rotate(-45deg); }
.menu-toggle__bar{ transition:transform .2s ease, opacity .2s ease; }

/* Мобильное меню */
.nav{
  display:flex; align-items:center; gap:1rem;
}
@media (max-width: 900px){
  /* убираем прежнее wrap-поведение и переводим в off-canvas/dropdown */
  .menu-toggle{ 
  display: inline-flex;
        margin-left: auto;
        align-content: stretch;
        align-items: center;
        flex-direction: column;
        flex-wrap: nowrap;
        justify-content: center;
  }
  .nav{
    position: absolute; inset: calc(100% + .5rem) 1rem auto 1rem; 
    display: none; flex-direction: column; gap:.75rem;
    background: var(--clr-dark); color: var(--clr-light);
    border-radius: 12px; box-shadow: 0 12px 30px rgba(0,0,0,.35);
    padding: .9rem;
  }
  .nav.open{ display:flex; }
  .nav ul{ 
    display:flex; flex-direction:column; gap:.25rem; 
    list-style:none; margin:0; padding:0;
  }
  .nav a{
    display:block; padding:.9rem 1rem; border-radius:10px;
    font-size:1rem; opacity:1; 
  }
  .nav a:active{ background: rgba(255,255,255,.08); }
  .social{ margin-left:0; gap:.5rem; }
  .social svg{ width:24px; height:24px; }
  .brand{ font-size:1.1rem; gap:.6rem; }
  .brand svg{ width:24px; height:24px; }
  .topbar{ padding:.75rem 1rem; }
  body.menu-open{ overflow:hidden; } /* блокируем скролл при открытом меню */
}

/* Улучшаем тач-зоны и контраст */
@media (max-width: 420px){
  .nav a{ padding:1rem 1.1rem; }
  .menu-toggle{ width:44px; height:44px; }
}

/* === Перенос длинных строк на мобилке === */
:where(main, section, article, .intro, .reviews, .review, .meta, .widget, .callout) :is(p, li, blockquote, a, span, .label){
  overflow-wrap: anywhere;   /* современный безопасный перенос */
  word-break: break-word;    /* подстраховка для старых браузеров */
}

/* Разрешаем флекс/грид-элементам сужаться, иначе они раздвигают вьюпорт */
.review, 
.review header,
.topbar,
.wrapper,
.two-col > * {
  min-width: 0;
}

/* На всякий случай, чтобы ничего не «проталкивало» за край */
img, video, svg { max-width: 100%; height: auto; }

/* Таблицы/пре/код, если вдруг появятся длинные куски */
pre, code { white-space: pre-wrap; word-break: break-word; }
.table-responsive { overflow-x: auto; }
.table-responsive table { width: 100%; }

/* Миниатюры в тексте */
.evidence, .lightbox {
  display: inline-block;
  margin: .5rem .5rem .75rem 0;
}
.evidence img, .lightbox img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(0,0,0,.12);
  transition: transform .2s ease, box-shadow .2s ease;
}
.evidence img:active, .lightbox img:active {
  transform: scale(.98);
}
.evidence figcaption {
  font-size: .875rem;
  opacity: .8;
  margin-top: .35rem;
}

/* Лайтбокс */
.lb[aria-hidden="false"] { display: block; }
.lb[hidden] { display: none !important; }
.lb {
  position: fixed; inset: 0; z-index: 9999;
}
.lb__backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.72);
  backdrop-filter: blur(2px);
  opacity: 0; transition: opacity .2s ease;
}
.lb__dialog {
  position: absolute; inset: 0;
  display: grid;
  grid-template-areas:
    "close close"
    "image image"
    "prev next";
  align-items: center; justify-items: center;
  padding: 4rem 1rem 2.5rem;
}
.lb__figure { grid-area: image; margin: 0; max-width: 96vw; max-height: 88vh; }
.lb__img {
  max-width: 96vw; max-height: 80vh; object-fit: contain;
  border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.45);
  transform: scale(.98); opacity: 0; transition: transform .2s ease, opacity .2s ease;
  background: #111; /* при прогрузке */
}
.lb__caption {
  margin-top: .6rem; text-align: center; font-size: .95rem; color: #eee; opacity: .9;
}

/* Кнопки управления */
.lb__close {
  grid-area: close;
  position: absolute; top: .75rem; right: .75rem;
  width: 44px; height: 44px; border-radius: 10px; border: 0;
  background: rgba(255,255,255,.1); color: #fff; font-size: 28px; line-height: 1;
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  transition: background .2s ease, transform .1s ease;
}
.lb__close:active { transform: scale(.95); }
.lb__nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 44px; height: 64px; border: 0; border-radius: 12px;
  background: rgba(255,255,255,.12); color: #fff; font-size: 26px;
  cursor: pointer; display: none; /* мобайл по умолчанию скрыт */
}
.lb__prev { left: .5rem; }
.lb__next { right: .5rem; }

/* Появление */
.lb--visible .lb__backdrop { opacity: 1; }
.lb--visible .lb__img { transform: scale(1); opacity: 1; }

/* Десктоп: показать стрелки */
@media (min-width: 900px){
  .lb__nav { display: inline-flex; align-items:center; justify-content:center; }
}

/* Блокируем прокрутку фона при открытом лайтбоксе */
body.lb-open { overflow: hidden; }
.evidence-img{
  display:block;
  max-width:100%;
  height:auto;
  width:min(100%, 100px);      /* визуально уменьшаем миниатюру */
  border-radius:10px;
  box-shadow:0 4px 16px rgba(0,0,0,.12);
}

.evidence-row{
  display:flex;
  flex-wrap:wrap;        /* перенос если не влазит */
  gap:.75rem;            /* расстояние между миниатюрами */
  align-items:flex-start;
}

/* единый размер превью (измените переменную при желании) */
.evidence-row .evidence-img{
  --thumb: 110px;
  width: var(--thumb);
  height: auto;
  border-radius:10px;
  box-shadow:0 4px 16px rgba(0,0,0,.12);
}

/* чтобы длинные ссылки/контент рядом не растягивали строку */
.evidence-row > *{ min-width:0; }

.lb__dialog{
  position:absolute;
  inset:0;
  display:grid;
  place-items:center;
  padding:0;                 /* без внутренних отступов */
}

.lb__figure{
  margin:0;
  max-width:100vw;
  max-height:100vh;
  display:flex;
  align-items:center;
  justify-content:center;
}

.lb__img{
  max-width:100vw;           /* во всю ширину вьюпорта */
  max-height:100vh;          /* во всю высоту вьюпорта */
  object-fit:contain;        /* без обрезки */
  border-radius:0;
  box-shadow:none;
  background:#111;           /* фон на время загрузки */
  transform:none; opacity:1; /* если были эффекты появления */
}

.lb__caption{
  margin:.5rem 1rem 1rem;
  max-width:min(90vw, 1200px);
  text-align:center;
  color:#eee;
}

/* кнопки поверх */
.lb__close{
  position:absolute;
  top:.75rem; right:.75rem;
}

/* (если есть) убираем стрелки на мобиле — опционально */
@media (max-width: 899px){
  .lb__nav{ display:none !important; }
}