/* Ръководство за начинаещи брокери — прост светъл дизайн като оригиналния сайт */
:root {
  --bg: #eae8eb;        /* фон на сайта (като оригинала) */
  --box: #ffffff;       /* фон на съдържанието */
  --text: #515151;
  --title: #3b3e50;
  --brown: #5e391a;     /* основен цвят (бутони, меню) */
  --orange: #c86a35;    /* връзки */
  --line: #e4e4e4;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Roboto", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.8;
}
img { max-width: 100%; height: auto; }
a { color: var(--orange); }
a:hover { color: var(--brown); }
h1, h2, h3 { color: var(--title); line-height: 1.3; font-weight: 500; margin: 0 0 .6em; }
h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1.1em; }

.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 16px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 10px; top: 10px; background: #fff; padding: 6px 10px; z-index: 50; }
.clear { clear: both; }

/* Горна лента */
.topbar { background: var(--bg); color: #5d5e5d; font-size: 15px; }
.topbar .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 24px; padding-top: 14px; padding-bottom: 14px; }
.topbar a { color: var(--brown); text-decoration: none; }

/* Хедър */
.header { background: var(--bg); }
.header .wrap { background: var(--box); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 14px; padding-bottom: 14px; flex-wrap: wrap; }
.logo { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.logo img { width: 80px; }
.logo strong { display: block; color: var(--title); font-size: 1.35rem; font-weight: 500; line-height: 1.2; }
.logo small { color: var(--text); font-size: .9rem; }
.nav { display: flex; flex-wrap: wrap; gap: 4px 26px; }
.nav a { color: var(--title); text-decoration: none; font-size: 15px; padding: 6px 0; border-bottom: 2px solid transparent; }
.nav a:hover, .nav a.active { color: var(--brown); border-bottom-color: var(--brown); }
.header-right { display: flex; align-items: center; gap: 22px; }
.cart-link { position: relative; color: var(--title); display: inline-flex; padding: 4px; }
.cart-link:hover { color: var(--brown); }
.cart-count { position: absolute; top: -6px; right: -10px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--brown); color: #fff; font-size: 12px; font-weight: 700; line-height: 20px; text-align: center; }
.menu-btn { display: none; background: var(--brown); color: #fff; border: 0; border-radius: 3px; padding: 8px 14px; font: inherit; font-size: 15px; cursor: pointer; }

/* Заглавие на страницата – като оригинала: сива лента, центрирано заглавие, „Начало“ отдолу */
.page-title { padding-top: 0; }
.page-title .wrap { background: var(--bg); padding: 44px 30px 40px; text-align: center; }
.page-title h1 { margin: 0 0 14px; font-size: 2.1rem; }
.breadcrumbs { font-size: 16px; color: var(--title); }
.breadcrumbs a { color: var(--title); text-decoration: none; }
.breadcrumbs a:hover { color: var(--brown); }

/* Една бяла страница: текст (70%) + странична колона (30%) */
.layout { display: flex; align-items: stretch; background: var(--box); padding: 0; margin-top: 0; margin-bottom: 40px; }
.main { flex: 1 1 70%; min-width: 0; padding: 30px; }
.sidebar { flex: 0 0 30%; max-width: 330px; padding: 30px 30px 10px 0; }
.widget { border: 1px solid #e6e4e7; border-radius: 3px; padding: 18px 20px; margin-bottom: 22px; font-size: 14px; }
.widget-title { font-size: 1.25rem; margin: 0 0 12px; padding-bottom: 10px; border-bottom: 1px solid var(--line); position: relative; }
.widget-title::after { content: ""; position: absolute; left: 0; bottom: -1px; width: 50px; height: 2px; background: var(--brown); }
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget li { border-bottom: 1px solid var(--line); padding: 7px 0; line-height: 1.5; }
.widget li:last-child { border-bottom: 0; padding-bottom: 0; }
.widget li a { color: var(--brown); text-decoration: none; }
.widget li a:hover { color: var(--orange); }
.widget p { margin: 0; }
.widget-logos { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; word-break: break-word; }
.widget-logos img { max-width: 130px; max-height: 50px; width: auto; display: block; margin-top: 12px; }
.widget-logos img[alt="ЕППИ"] { max-height: 60px; }
.widget-logos a:first-child img { margin-top: 0; }
.widget-logos a { font-size: 13px; line-height: 1.4; }

/* Съдържание */
.align-right { float: right; margin: 0 0 20px 26px; }
.photo { width: 300px; }
.book { width: 240px; }
.main ul { padding-left: 22px; }
.main li { margin-bottom: 4px; }
.video { position: relative; width: 100%; max-width: 560px; aspect-ratio: 16 / 9; margin: 10px 0 20px; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.post-main-img { display: block; margin: 0 0 22px; }

.button, button[type="submit"] {
  display: inline-block; background: var(--brown); color: #fff; border: 1px solid var(--brown);
  border-radius: 3px; padding: 10px 22px; font: inherit; font-size: 15px; text-decoration: none; cursor: pointer;
}
.button:hover, button[type="submit"]:hover { background: var(--orange); border-color: var(--orange); color: #fff; }

/* етикет „Видео“ */
.tag-video { display: inline-block; vertical-align: middle; margin-left: 6px; padding: 1px 7px; border-radius: 3px; background: var(--brown); color: #fff; font-size: 11px; font-weight: 500; line-height: 1.6; white-space: nowrap; }
.post h2 .tag-video { font-size: 12px; }

/* Блог – списък */
.post { display: flex; gap: 24px; padding-bottom: 26px; margin-bottom: 26px; border-bottom: 1px solid var(--line); }
.post:last-child { border-bottom: 0; margin-bottom: 0; }
.post-img { flex: 0 0 260px; }
.post-img img { display: block; width: 100%; height: 175px; object-fit: cover; }
.post h2 { font-size: 1.3rem; margin-bottom: .4em; }
.post h2 a { color: var(--title); text-decoration: none; }
.post h2 a:hover { color: var(--brown); }
.post p { font-size: 15px; }

/* Поръчка */
.product { display: flex; gap: 26px; align-items: center; margin-bottom: 30px; padding-bottom: 26px; border-bottom: 1px solid var(--line); }
.product img { width: 180px; }
.price { font-size: 1.6rem; color: var(--brown); font-weight: 700; margin-bottom: .5em; }

.order-form { display: grid; gap: 14px; max-width: 620px; }
.order-form h2 { font-size: 1.3rem; margin: 0; }
.order-form label { display: grid; gap: 4px; font-size: 14px; font-weight: 500; color: var(--title); }
.order-form input, .order-form select, .order-form textarea {
  width: 100%; font: inherit; font-size: 16px; color: var(--text); background: #fff;
  border: 1px solid #ccc; border-radius: 3px; padding: 9px 11px;
}
.order-form input:focus, .order-form select:focus, .order-form textarea:focus { outline: 2px solid var(--orange); outline-offset: 0; border-color: var(--orange); }
.order-form select:disabled { background: #f4f4f4; color: #999; }
.order-form .is-invalid { border-color: #c0392b; background: #fff6f5; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: end; }
.qty { display: flex; }
.qty button { width: 40px; background: #f2f0f3; border: 1px solid #ccc; font-size: 18px; cursor: pointer; color: var(--title); }
.qty button:first-child { border-right: 0; border-radius: 3px 0 0 3px; }
.qty button:last-child { border-left: 0; border-radius: 0 3px 3px 0; }
.qty input { border-radius: 0; text-align: center; -moz-appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.total span { font-size: 14px; }
.total strong { display: block; font-size: 1.4rem; color: var(--brown); }
.form-msg { margin: 0; font-size: 15px; min-height: 1.5em; color: #2e7d32; }
.form-msg.is-error { color: #c0392b; }

/* Доставка до офис на Спиди */
.delivery { display: grid; gap: 6px; border: 1px solid var(--line); background: #faf9fa; border-radius: 3px; padding: 16px; }
.delivery > label { font-size: 14px; font-weight: 500; color: var(--title); margin-top: 6px; }
.delivery__head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.delivery__title { font-weight: 700; color: var(--title); }
.delivery__map { display: inline-flex; align-items: center; gap: 5px; background: #fff; border: 1px solid #ccc; border-radius: 3px; color: var(--brown); font: inherit; font-size: 14px; padding: 5px 10px; cursor: pointer; }
.delivery__map:hover { border-color: var(--brown); }
.delivery__map svg { width: 14px; fill: currentColor; }
.combo { position: relative; }
.combo input { padding-right: 36px; }
.combo__clear { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 26px; height: 26px; border: 0; background: none; font-size: 20px; color: #888; cursor: pointer; }
.combo__list { position: absolute; z-index: 20; left: 0; right: 0; top: 100%; max-height: 250px; overflow-y: auto; margin: 2px 0 0; padding: 0; list-style: none; background: #fff; border: 1px solid #ccc; box-shadow: 0 6px 16px rgba(0,0,0,.12); }
.combo__list li { padding: 8px 11px; cursor: pointer; display: flex; justify-content: space-between; gap: 10px; font-size: 15px; }
.combo__list li small { color: #999; }
.combo__list li.is-active, .combo__list li:hover { background: #f2ece6; }
.combo__list li mark { background: none; color: var(--brown); font-weight: 700; }
.combo__list .combo__group { font-size: 12px; text-transform: uppercase; color: #999; cursor: default; }
.combo__list .combo__group:hover, .combo__list .combo__empty:hover { background: none; }
.combo__list .combo__empty { color: #999; cursor: default; }
.office-info { font-size: 14px; line-height: 1.5; background: #fff; border-left: 3px solid var(--brown); padding: 10px 12px; margin-top: 4px; }
.office-info strong { display: block; color: var(--title); }
.office-info .tag { display: inline-block; font-size: 12px; color: var(--brown); margin-top: 4px; }

.map-modal { position: fixed; inset: 0; z-index: 100; background: rgba(255,255,255,.85); display: flex; align-items: center; justify-content: center; padding: 16px; }
.map-modal[hidden] { display: none; }
.map-modal__box { background: #fff; border: 1px solid #ccc; box-shadow: 0 10px 40px rgba(0,0,0,.2); width: 100%; max-width: 1000px; height: 100%; max-height: 720px; display: flex; flex-direction: column; }
.map-modal__head { display: flex; justify-content: space-between; align-items: center; padding: 10px 16px; border-bottom: 1px solid var(--line); }
.map-modal__head h3 { margin: 0; }
.map-modal__close { background: none; border: 0; font-size: 28px; line-height: 1; cursor: pointer; color: var(--title); }
.map-modal__hint { margin: 0; padding: 8px 16px; font-size: 14px; }
.map-modal__frame { flex: 1; }
.map-modal__frame iframe { width: 100%; height: 100%; border: 0; display: block; }

/* Футър */
.footer { background: var(--bg); color: var(--title); border-top: 1px solid #d9d6da; font-size: 14px; }
.footer .wrap { padding-top: 18px; padding-bottom: 18px; }

/* хедър и футър подравнени с текста в белите полета */
@media (min-width: 641px) { .topbar .wrap, .header .wrap, .footer .wrap { padding-left: 30px; padding-right: 30px; } }

/* Телефон и таблет */
@media (max-width: 900px) {
  .layout { flex-direction: column; margin-top: 0; }
  .sidebar { max-width: none; width: 100%; padding: 10px 30px 10px; border-top: 1px solid var(--line); }
  .menu-btn { display: block; }
  .header-right { display: contents; }
  .logo { flex: 1 1 auto; min-width: 0; }
  .cart-link { margin-left: auto; margin-right: 10px; }
  .nav { display: none; order: 10; width: 100%; flex-direction: column; gap: 0; }
  .nav.open { display: flex; }
  .nav a { padding: 10px 0; border-bottom: 1px solid var(--line); }
  .nav a.active, .nav a:hover { border-bottom-color: var(--line); }
}
@media (max-width: 640px) {
  h1 { font-size: 1.6rem; }
  .main { padding: 20px 16px; }
  .sidebar { padding: 10px 16px; }
  .page-title { padding-top: 0; }
  .layout { margin-top: 0; padding-left: 0; padding-right: 0; }
  .page-title .wrap { padding: 28px 16px 24px; }
  .page-title h1 { font-size: 1.6rem; margin-bottom: 8px; }
  .header-right { gap: 18px; }
  .align-right { float: none; display: block; margin: 0 auto 20px; }
  .logo img { width: 60px; }
  .logo strong { font-size: 1.1rem; }
  .post, .product { flex-direction: column; }
  .post-img { flex-basis: auto; }
  .post-img img { height: auto; }
  .product { align-items: flex-start; }
  .field-row { grid-template-columns: 1fr; }
}

/* Съдържание от редактора */
.content img { max-width: 100%; height: auto; }
.content blockquote { margin: 0 0 1.1em; padding: 6px 0 6px 18px; border-left: 3px solid var(--brown); color: var(--title); }
.content .ql-align-center { text-align: center; }
.content .ql-align-right { text-align: right; }
.content .ql-align-justify { text-align: justify; }
.content iframe.ql-video { display: block; width: 100%; max-width: 560px; aspect-ratio: 16 / 9; height: auto; border: 0; margin: 10px 0 20px; }
.content h2 { margin-top: 1.2em; }
.content h3 { margin-top: 1em; }
.back { margin-top: 26px; }
.back a { text-decoration: none; }

/* Поръчка */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.order-form label small { font-weight: 400; color: #888; }
.order-form button[type="submit"]:disabled { opacity: .6; cursor: wait; }
.order-done { background: #f1f8f1; border: 1px solid #b9dcbc; border-left: 4px solid #2e7d32; padding: 18px 20px; margin-bottom: 20px; }
.order-done h2 { color: #2e7d32; margin-bottom: .3em; }
.order-done p { margin: 0; }
