/* bgconsulting.eu – 30.11.2026: оригиналният дизайн (крушки, 4 плочки, бяла кутия + дясна колона, сив футър),
   с по-голям шрифт, повече въздух и мобилна версия. */
:root {
  --red: #d53200;
  --text: #323232;
  --muted: #6b6b6b;
  --line: #e3ddd4;
  --paper: #f6f3ee;
  --dark: #4a4a4a;
  --font: 'Open Sans', Verdana, Arial, Helvetica, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: url(../img/bgr.jpg) repeat-x top left var(--paper);
  border-top: 7px solid var(--dark);
}
img { max-width: 100%; height: auto; }
a { color: var(--red); text-decoration: none; }
a:hover { color: var(--red); text-decoration: underline; }
:focus-visible { outline: 3px solid #ffc01a; outline-offset: 2px; }
.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.skip-link { position: absolute; left: -999px; top: 8px; z-index: 100; background: #ffc01a; color: #000; padding: 8px 14px; }
.skip-link:focus { left: 8px; }

/* ---------- шапка ---------- */
.site-header { background: linear-gradient(#fff 0, #fff 70%, rgba(255, 255, 255, 0) 100%); border-bottom: 1px dotted #b8b8b8; }
.header-inner { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; min-height: 104px; padding-bottom: 14px; }
.logo { line-height: 0; flex: 0 0 auto; padding-top: 22px; }
.logo img { width: 333px; }
.header-right { display: flex; flex-direction: column; align-items: flex-end; gap: 18px; }
.language { align-self: flex-end; margin-top: -7px; }
.language a { display: inline-block; background: var(--dark); color: #fff; font-size: 13px; font-weight: 700; padding: 3px 18px 5px; border-radius: 0 0 6px 6px; }
.language a:hover { background: var(--red); color: #fff; text-decoration: none; }
.menu ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: flex-end; }
.menu li { display: flex; align-items: center; }
.menu li + li::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--red); margin: 0 18px; }
.menu a { color: var(--text); text-transform: uppercase; font-size: 13.5px; font-weight: 600; letter-spacing: .02em; padding: 6px 0; }
.menu a:hover, .menu a.is-active { color: var(--red); text-decoration: none; }
.nav-toggle { display: none; }

/* ---------- банер + плочки ---------- */
.banner .wrap { position: relative; }
.tulip { line-height: 0; margin-top: 14px; }
.tulip img { width: 100%; max-width: 1000px; display: block; }
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 3px; margin-top: -146px; position: relative; z-index: 2; }
.tile {
  position: relative; min-height: 140px; padding: 12px 34px 30px 82px;
  border: 1px solid rgba(160, 60, 0, .45); border-radius: 3px;
  color: #3a2a12; font-size: 13.5px; line-height: 1.45;
  background-repeat: no-repeat; background-position: 0 0, 0 0;
}
.tile-yellow { background-image: url(../img/tile_icon_yellow.png), linear-gradient(#fde276 0, #ffd022 7px, #ffc81f 23px, #ffc11a 40px, #ffc01a calc(100% - 22px), #ffdc71 100%); }
.tile-orange { background-image: url(../img/tile_icon_orange.png), linear-gradient(#f8d06c 0, #f5b311 7px, #f4a609 23px, #f29e05 40px, #f09805 calc(100% - 22px), #f8cb65 100%); }
.tile-orange-dark { background-image: url(../img/tile_icon_orange-dark.png), linear-gradient(#f6b26d 0, #ef8315 7px, #ed7b0f 23px, #ea760c 40px, #e27006 calc(100% - 22px), #eda055 100%); color: #2b1a08; }
.tile-red { background-image: url(../img/tile_icon_red.png), linear-gradient(#ec9864 0, #df5206 7px, #d93c02 23px, #d32d01 40px, #d02a01 calc(100% - 22px), #ec9463 100%); color: #fff; }
.tile h2 { margin: 0 0 8px; font-size: 19px; line-height: 1.2; font-weight: 700; color: #fff; text-shadow: 0 1px 1px rgba(120, 50, 0, .35); }
.tile h2 a { color: #fff; }
.tile p { margin: 0; }
.tile-red p { color: #fff3ea; }
.tile-more {
  position: absolute; right: 6px; bottom: 6px; width: 23px; height: 22px; padding: 0; border: 0; cursor: pointer;
  background: url(../img/arrow.png) no-repeat center; opacity: .9;
}
.tile-more:hover { opacity: 1; }
.has-sub { cursor: pointer; }
.tile-sub {
  display: none; position: absolute; left: -1px; right: -1px; top: calc(100% + 2px); z-index: 20;
  list-style: none; margin: 0; padding: 6px 0; background: #fff; border: 1px solid var(--line);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .15); cursor: default;
}
.tile.is-open .tile-sub { display: block; }
.tile-sub a { display: block; padding: 8px 16px; color: var(--text); font-size: 14px; line-height: 1.4; }
.tile-sub a:hover { background: var(--paper); color: var(--red); text-decoration: none; }
@media (hover: hover) and (min-width: 801px) {
  .has-sub:hover .tile-sub { display: block; }
}

/* вътрешни страници: само тънка лента с имената на 4-те направления */
.banner.is-compact .tulip { margin-top: 8px; }
.banner.is-compact .tulip img { width: auto; max-width: 100%; height: 190px; }
.banner.is-compact .tiles { margin-top: -28px; }
.banner.is-compact .tile {
  min-height: 0; padding: 9px 34px 9px 54px; display: flex; align-items: center;
  background-size: 40px 36px, 100% 100%; background-position: 7px 50%, 0 0;
}
.banner.is-compact .tile h2 { margin: 0; font-size: 16px; line-height: 1.25; }
.banner.is-compact .tile p { display: none; }
.banner.is-compact .tile > a.tile-more { display: none; }
.banner.is-compact .tile-more { bottom: 50%; transform: translateY(50%); }
.banner.is-compact + .layout { margin-top: 16px; }

/* ---------- съдържание ---------- */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 24px; align-items: start; margin-top: 22px; margin-bottom: 26px; }
.main-box, .side-box { background: #fff; border-top: 6px solid var(--dark); border-radius: 0 0 3px 3px; box-shadow: 0 1px 3px rgba(0, 0, 0, .06); }
.main-box { padding: 26px 36px 40px; min-width: 0; }
.side-box { padding: 20px 22px 24px; }

.welcome, .box-title { margin: 0 0 6px; padding-bottom: 8px; border-bottom: 1px dotted #b8b8b8; font-size: 15px; font-weight: 600; text-transform: uppercase; letter-spacing: .02em; color: var(--text); }
.box-title { margin-bottom: 4px; }
.title { margin: 18px 0 18px; font-size: 30px; line-height: 1.25; font-weight: 400; color: var(--red); }

.path { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 0; font-size: 13.5px; color: var(--muted); padding-bottom: 10px; border-bottom: 1px dotted #b8b8b8; }
.path > * + *::before { content: '›'; margin: 0 9px; color: #b0a89c; }
.path a { color: var(--muted); }
.path a:hover { color: var(--red); }
.path [aria-current] { color: var(--text); }
.title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.icons { display: flex; gap: 6px; margin-top: 22px; flex: 0 0 auto; }
.icon-btn { display: inline-flex; padding: 4px; border: 1px solid var(--line); border-radius: 4px; background: #fff; cursor: pointer; line-height: 0; }
.icon-btn:hover { border-color: var(--red); }

.image { margin: 0 0 18px; line-height: 0; }
.image img { max-height: 420px; width: auto; border: 4px solid #f4efe6; }
.data { display: block; font-size: 13px; font-style: italic; color: #8a8a8a; margin-bottom: 10px; }

/* текстът от админа – стари шрифтове/размери → четими */
.prose { overflow-wrap: anywhere; }
.prose span, .prose font, .prose p, .prose li, .prose div, .prose td { font-family: inherit !important; font-size: inherit !important; line-height: inherit !important; }
.prose p, .prose li { text-align: left !important; }
.prose p, .prose ul, .prose ol { margin: 0 0 1em; }
.prose ul { padding-left: 1.3em; }
.prose li { margin-bottom: .45em; }
.prose li::marker { color: var(--red); }
.prose h1, .prose h2, .prose h3, .prose h4 { line-height: 1.3; margin: 1.3em 0 .5em; color: var(--text); }
.prose img { height: auto !important; }
.prose table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; margin: 0 0 1.2em; }
.prose td, .prose th { border: 1px solid var(--line); padding: 7px 9px; vertical-align: top; }
.prose iframe { max-width: 100%; }
.list-intro { padding-bottom: 18px; margin-bottom: 8px; }

.btn, .send {
  display: inline-block; padding: 10px 26px; border: 0; border-radius: 3px; cursor: pointer;
  background: linear-gradient(#e2531c, var(--red)); color: #fff; font: 700 15px var(--font);
}
.btn:hover, .send:hover { background: #b62b00; color: #fff; text-decoration: none; }
.more { font-size: 14px; text-decoration: underline; }

/* списъци (финансиране / проекти / обучение) */
.kare { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 20px; padding: 22px 0; border-top: 1px dotted #b8b8b8; }
.kare:not(:has(.kare-img)) { grid-template-columns: minmax(0, 1fr); }
.kare-img { line-height: 0; }
.kare-img img { width: 150px; height: 112px; object-fit: cover; border: 4px solid #f4efe6; background: #fff; }
.news_title { margin: 0 0 4px; font-size: 19px; line-height: 1.35; font-weight: 600; }
.news_title a { color: var(--red); }
.meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin-bottom: 6px; }
.meta .data { margin: 0; }
.status { font-size: 13px; font-weight: 600; color: var(--muted); }
.status-1 { color: #2f7d32; }
.status-2 { color: #9a2a0a; }
.kare p { margin: 0 0 6px; font-size: 15px; }

.pager { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; padding-top: 18px; border-top: 1px dotted #b8b8b8; }
.pager a, .pager span.inactive { min-width: 36px; height: 36px; padding: 0 10px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 3px; color: var(--text); font-weight: 600; font-size: 15px; }
.pager a:hover { border-color: var(--red); color: var(--red); text-decoration: none; }
.pager a.active { background: var(--red); border-color: var(--red); color: #fff; }
.pager span.inactive { opacity: .35; }
.pager a.all { margin-left: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* дясна колона */
.side-news { position: relative; padding: 14px 0 14px 18px; border-bottom: 1px dotted #d0ccc5; }
.side-news:last-child { border-bottom: 0; padding-bottom: 0; }
.side-news::before { content: ''; position: absolute; left: 0; top: 19px; border: 6px solid transparent; border-left: 7px solid var(--dark); }
.side-news h3 { margin: 0 0 2px; font-size: 15px; line-height: 1.4; font-weight: 700; }
.side-news h3 a { color: var(--red); }
.side-news time { display: block; font-size: 12.5px; font-style: italic; color: #8a8a8a; margin-bottom: 4px; }
.side-news p { margin: 0 0 4px; font-size: 14px; line-height: 1.55; }

/* партньори */
.partner-grid { list-style: none; margin: 10px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.partner { height: 100%; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; padding: 16px 10px; border: 1px solid var(--line); border-radius: 3px; color: var(--text); font-size: 14px; line-height: 1.35; }
a.partner:hover { border-color: var(--red); text-decoration: none; color: var(--red); }
.partner-logo { height: 80px; display: flex; align-items: center; justify-content: center; }
.partner-logo img { max-height: 80px; max-width: 140px; object-fit: contain; }

/* контакти */
.contact-grid { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 34px; align-items: start; margin-top: 6px; }
.contact-form-box { scroll-margin-top: 20px; }
.contact-form-box h2 { margin: 0 0 14px; font-size: 18px; font-weight: 600; }
.contact-form { display: grid; gap: 14px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: grid; gap: 5px; font-size: 14px; font-weight: 600; }
.field input, .field textarea { width: 100%; padding: 9px 11px; border: 1px solid #d2ccc0; border-radius: 3px; font: 400 15px var(--font); color: var(--text); background: #fff; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 2px rgba(213, 50, 0, .15); }
.captcha-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.captcha-row img { border: 1px solid #d2ccc0; }
.field-code { flex: 1 1 140px; }
.tool { padding: 6px 12px; border: 1px solid #d2ccc0; border-radius: 3px; background: #fff; font: 600 13px var(--font); color: var(--text); cursor: pointer; }
.tool:hover { border-color: var(--red); color: var(--red); }
.contact-form .btn { justify-self: end; }
.form-msg { padding: 10px 14px; margin-bottom: 14px; border-radius: 3px; font-weight: 600; }
.form-err { background: #fbe6e1; color: #9a2a0a; }
.form-ok { background: #e6f3e6; color: #2f7d32; }

/* карта на сайта */
.sitemap, .sitemap ul { list-style: none; margin: 0; padding: 0; }
.sitemap > li { padding: 10px 0; border-bottom: 1px dotted #b8b8b8; font-weight: 600; }
.sitemap > li > a, .sitemap > li > span { color: var(--text); }
.sitemap ul { margin: 6px 0 0 16px; }
.sitemap ul a { display: block; padding: 3px 0; font-weight: 400; color: var(--red); }

/* ---------- футър ---------- */
.site-footer { margin-bottom: 30px; }
.menu-bottom { background: #aaa8a4; }
.menu-bottom ul { list-style: none; margin: 0; padding: 0 10px; display: flex; flex-wrap: wrap; }
.menu-bottom a { display: block; padding: 5px 16px; color: #fff; font-size: 13.5px; border-right: 1px solid rgba(255, 255, 255, .45); }
.menu-bottom a:hover { background: rgba(0, 0, 0, .12); text-decoration: none; }
.footer-body { background: #d6d3cf; display: grid; grid-template-columns: 1fr auto; grid-template-areas: "social social" "copy link"; gap: 10px 20px; padding: 16px 20px 12px; font-size: 13px; color: #6b6762; }
.footer-body .social { grid-area: social; justify-self: end; line-height: 0; }
.footer-body .copy { grid-area: copy; }
.footer-body .link { grid-area: link; }
.footer-body a { color: #5a5651; }

/* ---------- таблет / телефон ---------- */
@media (max-width: 1000px) {
  .tiles { margin-top: -90px; }
  .tile { padding-left: 76px; }
}
@media (max-width: 900px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .contact-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 800px) {
  .site-header .header-inner { position: relative; align-items: center; min-height: 0; padding-bottom: 12px; }
  .logo { padding-top: 12px; }
  .logo img { width: 230px; }
  .header-right { flex-direction: row; align-items: center; gap: 10px; }
  .language { margin-top: 12px; }
  .language a { border-radius: 4px; padding: 6px 12px; }
  .nav-toggle {
    display: inline-flex; align-items: center; gap: 8px; margin-top: 12px; padding: 8px 14px; border: 0; border-radius: 4px;
    background: var(--red); color: #fff; font: 700 14px var(--font); cursor: pointer;
  }
  .nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after { display: block; width: 18px; height: 2px; background: currentColor; position: relative; transition: transform .2s, background .2s; }
  .nav-toggle-bars::before, .nav-toggle-bars::after { content: ''; position: absolute; left: 0; }
  .nav-toggle-bars::before { top: -6px; }
  .nav-toggle-bars::after { top: 6px; }
  .nav-open .nav-toggle-bars { background: transparent; }
  .nav-open .nav-toggle-bars::before { transform: translateY(6px) rotate(45deg); }
  .nav-open .nav-toggle-bars::after { transform: translateY(-6px) rotate(-45deg); }
  .menu { display: none; position: absolute; left: 0; right: 0; top: 100%; z-index: 30; background: #fff; border-bottom: 3px solid var(--red); box-shadow: 0 12px 24px rgba(0, 0, 0, .12); }
  .nav-open .menu { display: block; }
  .menu ul { flex-direction: column; padding: 6px 20px 12px; }
  .menu li + li::before { display: none; }
  .menu a { display: block; width: 100%; padding: 11px 0; font-size: 15px; border-bottom: 1px dotted #d0ccc5; }
  .tiles { grid-template-columns: repeat(2, 1fr); margin-top: -40px; }
  .banner.is-compact .tiles { margin-top: 0; }
  .banner.is-compact .tulip img { height: 150px; }
  .banner.is-compact .tile-sub { margin: 10px -34px -9px -54px; }
  .tile-sub { position: static; margin: 12px -34px -30px -82px; border-left: 0; border-right: 0; box-shadow: none; }
}
@media (max-width: 560px) {
  .banner.is-compact .tiles { grid-template-columns: repeat(2, 1fr); margin-top: 6px; }
  .banner.is-compact .tulip img { height: auto; }
  .banner.is-compact .tile { padding: 8px 28px 8px 46px; background-size: 32px 29px, 100% 100%; background-position: 5px 50%, 0 0; }
  .banner.is-compact .tile h2 { font-size: 14.5px; }
  body { font-size: 15.5px; }
  .wrap { padding: 0 12px; }
  .logo img { width: 180px; }
  .nav-toggle-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .tulip { margin-top: 8px; }
  .tiles { grid-template-columns: 1fr; margin-top: 8px; }
  .tile { min-height: 0; padding-bottom: 34px; }
  .main-box { padding: 18px 16px 28px; }
  .title { font-size: 25px; }
  .title-row { flex-direction: column; gap: 0; }
  .icons { margin-top: 0; margin-bottom: 12px; }
  .kare { grid-template-columns: 1fr; gap: 12px; }
  .kare-img img { width: 100%; height: 170px; }
  .field-row { grid-template-columns: 1fr; }
  .partner-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .footer-body { grid-template-columns: 1fr; grid-template-areas: "social" "copy" "link"; }
  .footer-body .social { justify-self: start; }
}
@media print {
  .site-header, .banner, .side-box, .site-footer, .icons, .skip-link { display: none !important; }
  body { background: none; border: 0; font-size: 12pt; }
  .layout { display: block; margin: 0; }
  .main-box { border: 0; box-shadow: none; padding: 0; }
}
.prose [style*="justify"] { text-align: left !important; }
