/* =========================================
   1. VARIABLES & BASE STYLES
   ========================================= */
:root {
  --blue: #007bff;
  --indigo: #6610f2;
  --purple: #6f42c1;
  --pink: #e83e8c;
  --red: #A11E0A;
  --orange: #fd7e14;
  --yellow: #ffc107;
  --green: #28a745;
  --teal: #20c997;
  --cyan: #17a2b8;
  --white: #fff;
  --gray: #6c757d;
  --gray-dark: #343a40;
  --primary: #3366cc;
  --secondary: #46b549;
  --success: #BC2D19;
  --info: #dadada;
  --warning: #888887;
  --danger: #A52D19;
  --light: #f8f9fa;
  --dark: #343a40;
  --dark1: #8A480F;
  --breakpoint-xs: 0;
  --breakpoint-sm: 576px;
  --breakpoint-md: 768px;
  --breakpoint-lg: 992px;
  --breakpoint-xl: 1200px;
  --font-family-sans-serif: 'Open Sans', sans-serif;
  --font-family-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  --primary-op: #3366cc33;
  --secondary-op: #46b54957;
}

*, *::before, *::after {
  box-sizing: border-box;
}

body {
  font: 18px/130% 'Open Sans', sans-serif;
  margin: 0;
  padding: 0;
  outline: 0 none;
  vertical-align: baseline;
  background-color: #fff;
}

/* Utility Classes */
.bg-primary, .btn-primary { background-color: #3366cc !important; }
.bg-secondary { background-color: #46b549 !important; }
.bg-info { background-color: #dadada !important; }
.bg-light { background-color: white !important; }

img.float-left { margin-right: 1rem; }

.btn {
  white-space: normal !important;
  word-wrap: break-word;
}
.btn:hover a { color: white; }
.btn-primary { border: none !important; }
.btn-outline-dark:hover { color: #ffffff !important; }

/* Links & Typography */
a, li a.active { color: var(--dark); }
a:hover, li a:hover { color: var(--secondary); }

h1, h2, h3, h4, h5, h6 {
  margin-top: 25px;
  line-height: 120%;
  color: var(--primary);
  
}
h1 { font-size: 1.8em; margin: 0 0 20px 0; }
h2 { font-size: 1.6em; font-weight: normal !important; }
h2 a { font-weight: normal !important; color: var(--primary); }
h3 { font-size: 1.4em; text-transform: none !important; }
h3 a { text-transform: none !important; }
h4 { font-size: 1.2em; font-weight: normal; }
h6 {font-size: 1.2em; font-weight: normal; }

.nav-link { color: var(--primary); }
.nav-item > a {
  text-transform: uppercase;
  font-size: 1.3rem;
  color: black;
}

/* =========================================
   2. HEADER & BRANDING
   ========================================= */
#site-branding-top1, #site-branding-top2 { height: 1rem; border-bottom: thin solid white; }
#site-branding-top3, #site-branding-top4 { height: 2rem; }
#site-branding-top1, #site-branding-top3 { border-right: thin solid white; }

#site-branding-main {
  height: 160px;
  background: url(''); /* Внимание: липсва URL */
  background-size: cover;
}
#site-branding-logo { padding-right: 0; }
#site-branding-logo img { float: right; }

#site-branding-sitename {
  float: left;
  text-align: left;
  max-width: 31rem;
  font-size: 1.2rem;
  font-weight: 700;
  font-family: Georgia, Tahoma, serif;
  font-style: italic;
  text-decoration: none;
  color: #58585c;
  padding-left: 2rem;
}

/* Block Header (Logos & Title) */
#block-plan-b5-header {
  background-color: rgba(255, 255, 255, 0.9);
  border-radius: 10px;
  padding: 10px 20px;
}
#block-plan-b5-header img {
  height: auto;
  max-height: 80px;
  width: auto;
  object-fit: contain;
  display: inline-block;
  max-width: 100%;
  transition: transform 0.2s ease-in-out;
}
#block-plan-b5-header img:hover { transform: scale(1.04); }
#block-plan-b5-header .extra-logos {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: nowrap;
  gap: 14px;
}
#block-plan-b5-header .row > div {
  display: flex;
  align-items: center;
  justify-content: center;
}
#block-plan-b5-header h1 {
  font-size: 1.5rem;
  line-height: 1.3;
  margin: 0;
  color: #004b75;
  text-align: center;
}

/* Social Icons */
#block-social-icons { gap: 1rem; }
header #block-social-icons {
  background-color: var(--secondary);
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
}
#block-social-icons .social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-decoration: none;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
#block-social-icons .social-link svg { height: 2em; width: 2em; fill: currentColor; }
#block-social-icons .social-link:hover { transform: scale(1.15); opacity: 0.8; }
#block-social-icons .social-link:focus,
#block-social-icons .social-link:active { outline: none; color: #f8f9fa; }

/* ============================================================
   MEGA MENU — стил като старото меню (финална версия)
   ============================================================ */

/* ЛЕНТАТА ОТГОРЕ */
#navbar-main {
  background-color: var(--primary) !important;
  padding: 10px;
  z-index: 1030;
}

/* TB мегаменю да НЕ задава свой фон */
.tb-megamenu,
.tb-megamenu-main {
  background-color: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

.tb-megamenu .nav > li > a, .tb-megamenu .nav > li > span.tb-megamenu-no-link {
  border-right: none;
}

/* ============================================================
   НИВО 1 — Главни бутони (Начало, За проекта, Библиотека...)
   ============================================================ */

.tb-megamenu-main .tb-megamenu-nav > li > a {
  color: #ffffff !important;
  font-weight: 500;
  padding: 0.6rem 0.9rem !important;
  text-decoration: none !important;
  background: transparent !important;
  border-radius: 0.375rem;
}

/* Активен / разгънат основен елемент */
.tb-megamenu-main .tb-megamenu-nav > li.active > a,
.tb-megamenu-main .tb-megamenu-nav > li.open > a {
  background-color: var(--secondary) !important;
  color: #ffffff !important;
}

/* ============================================================
   ПОДМЕНЮТА — Общи правила
   ============================================================ */

.tb-megamenu-submenu,
.tb-megamenu .mega-dropdown-menu,
.tb-megamenu .nav-child {
  background-color: #ffffff !important;
  border: none !important;
  box-shadow: 0 4px 12px rgba(0,0,0,0.12) !important;
  padding: 8px 0 !important;
}

.mega-dropdown-inner .tb-megamenu-column-inner {
  padding: 8px 12px !important;
}

/* FIX: премахване на дефолтните hover на TB Megamenu */
.tb-megamenu-submenu li > a,
.tb-megamenu .mega-dropdown-menu li > a {
  background: transparent !important;
}

/* ============================================================
   НИВО 2 — Колоните вътре (като заглавия)
   ============================================================ */

.tb-megamenu-submenu .tb-megamenu-item.level-2 > a {
  display: block;
  font-weight: 600 !important;
  font-size: 1.05rem;
  color: #000000 !important;
  padding: 6px 10px !important;
  background: transparent !important;
}

/* Hover за 2-ро ниво — като старото меню */
.tb-megamenu-submenu .tb-megamenu-item.level-2 > a:hover {
  background-color: var(--primary) !important;
  color: #ffffff !important;
}


.tb-megamenu .nav li.dropdown.active > .dropdown-toggle, .tb-megamenu .nav li.dropdown.open.active > .dropdown-toggle, .tb-megamenu .nav > li.dropdown.open.active > a:hover, .tb-megamenu .nav > li.dropdown.open.active > span.tb-megamenu-no-link:hover{
    border-color: var(--primary);
	margin-left: 5px;
	margin-right: 5px;
}

/* ============================================================
   НИВО 3 — Конкретните линкове вътре
   ============================================================ */

.tb-megamenu-submenu .tb-megamenu-item.level-3 > a {
  padding: 5px 22px !important;
  font-size: 0.95rem;
  font-weight: 400;
  color: #000000 !important;
  background: transparent !important;
}

/* Hover за 3-то ниво */
.tb-megamenu-submenu .tb-megamenu-item.level-3 > a:hover {
  background-color: var(--primary) !important;
  color: #ffffff !important;
}

/* Активен елемент */
.tb-megamenu-submenu .tb-megamenu-item.active > a {
  background-color: var(--secondary) !important;
  color: #ffffff !important;
}

/* Разредка между елементите */
.tb-megamenu-submenu .tb-megamenu-item {
  margin: 2px 0;
}

/* ============================================================
   ПЪЛЕН FIX: Забраняваме на TB Megamenu да инжектира зелено
   ============================================================ */

/* Това премахва зеления hover източник */
.tb-megamenu .dropdown-submenu > a:hover,
.tb-megamenu .dropdown-submenu > a:focus,
.tb-megamenu .dropdown-submenu.open > a {
  background: transparent !important;
  color: inherit !important;
  box-shadow: none !important;
}

.tb-megamenu a {
text-decoration:none;	
}

/* =========================================
   4. SIDEBARS
   ========================================= */
#sidebar_second { border-left: thin solid #42B3E5; }

.sidebar h2 {
  margin: 0;
  border-bottom: 1px solid #42B3E5;
  font-size: 1.5rem;
  line-height: 1.2;
}
.sidebar .block-menu,
.sidebar .block-views-blockblog-archive-block-1 { border: none; }
.sidebar .block-menu .nav-link { padding: 0.25rem 0.5rem; }

.sidebar .block-menu ul.nav li.nav-item,
.sidebar .block-menu ul.nav li.nav-item.dropdown .dropdown-menu li.dropdown-item,
.sidebar .block-views-blockblog-archive-block-1 ul.views-summary > li {
  width: 100%;
  list-style: none;
  margin: 0.3em 0;
  padding: 5px;
  background: #ececec;
  color: #3d3d3d;
  border-left: thick solid #42B3E5;
  display: block;
}

.block-views-blockblog-archive-block-1 .content { max-height: 21rem; overflow: scroll; }

/* Sidebar Menu Expanding Logic */
.sidebar .block-menu ul.nav li.nav-item.menu-item--expanded ul.menu { display: none; }
.sidebar .block-menu ul.nav li.nav-item.menu-item--expanded.menu-item--active-trail ul.menu {
  display: block;
  padding-inline-start: 0.5rem;
}
.sidebar .block-menu ul.nav li.nav-item.menu-item--expanded.menu-item--active-trail > a { font-weight: bold; }

/* Sidebar Active States */
.sidebar .block-menu ul.nav li.nav-item.menu-item--active-trail,
.sidebar .block-menu ul.nav li.nav-item.active,
.sidebar .block-menu ul.nav li.nav-item.menu-item--expanded.menu-item--active-trail ul.menu li.menu-item--active-trail {
  background: #42B3E5;
}
.sidebar .block-menu ul.nav li.nav-item.menu-item--active-trail > a,
.sidebar .block-menu ul.nav li.nav-item.active > a,
.sidebar .block-menu ul.nav li.nav-item.menu-item--expanded.menu-item--active-trail ul.menu li.menu-item--active-trail > a {
  color: white;
}
.sidebar .block-menu ul.nav li.nav-item.active.dropdown,
.sidebar .block-menu ul.nav li.nav-item .dropdown-menu { border: none; }
.sidebar .block-menu ul.nav li.nav-item > a { text-transform: none; }

.sidebar .block-menu ul.nav li.nav-item.menu-item--expanded.menu-item--active-trail {
  background-color: #f5f5f5;
  border: none;
}
.sidebar .block-menu ul.nav li.nav-item.active > a,
.sidebar .block-menu ul.nav li.nav-item:active > a {
  color: #fff;
  text-decoration: none;
  font-weight: bold;
}
.sidebar .block-menu ul.nav li.nav-item.menu-item--expanded > a { color: #42B3E5; }

/* =========================================
   5. CONTENT BLOCKS
   ========================================= */
#main .contextual-region { margin-bottom: 1rem; }

/* Page Title Block */
#block-plan-b5-zaglavienastranica {
  text-align: center;
  margin: 2rem 0;
  padding-top: 1rem;
}
#block-plan-b5-zaglavienastranica .title {
  position: relative;
  display: inline-block;
  padding-bottom: 0.75rem;
  font-size: 2rem;
  font-weight: 700;
  color: var(--secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 0 auto;
}
#block-plan-b5-zaglavienastranica .title::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 400px;
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent 0%, var(--primary) 50%, transparent 100%);
  opacity: 0.9;
}

/* "About Project" Block */
#block-plan-b5-zaproekta {
  position: relative;
  background-image: url('/sites/default/files/2025-10/back1.webp');
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(0, 0, 0, 0.2);
  border-radius: 10px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}
#block-plan-b5-zaproekta .block-background {
  position: relative;
  z-index: 1;
  padding: 2rem 3rem;
  color: #000;
}
#block-plan-b5-zaproekta .col-md-10.col-xl-8 {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}
#block-plan-b5-zaproekta h1 {
  margin-bottom: 1.5rem;
  color: var(--secondary);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}
#block-plan-b5-zaproekta h1 span { color: #01497C; }
#block-plan-b5-zaproekta p {
  margin-bottom: 1.5rem;
  color: #000;
  line-height: 1.7;
  font-size: 20px;
}
#block-plan-b5-zaproekta .btn {
  font-size: 1.1rem;
  padding: 0.6rem 1.5rem;
  border-radius: 50px;
  background-color: var(--primary);
  border: none;
  color: #fff;
  transition: all 0.3s ease;
}
#block-plan-b5-zaproekta .btn:hover {
  background-color: var(--secondary);
  transform: translateY(-3px);
  color: #fff;
}

/* News Block */
#views-bootstrap-news-block-1 .views-row { padding: 5px; box-sizing: border-box; }
#views-bootstrap-news-block-1 .col-12.col-md-4:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}
#views-bootstrap-news-block-1 .views-field-field-image {
  width: 100%;
  height: auto;
  object-fit: cover;
}
#views-bootstrap-news-block-1 .views-field-title a {
  text-decoration: none !important;
  line-height: 1.2;
  display: inline-block;
  color: var(--primary);
  font-weight: 700;
}
#views-bootstrap-news-block-1 .views-field-title a:hover {
  color: var(--secondary);
}
#views-bootstrap-news-block-1 .views-field-title {
  padding-top: 10px;
  padding-bottom: 15px;
  font-size: x-large;
}
#views-bootstrap-news-block-1 .views-field-body {
  padding-top: 10px;
  padding-bottom: 15px;
}
#views-bootstrap-news-block-1 .field-content { margin-top: 10px; }
#block-plan-b5-views-block-news-block-1 img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 8px;
}

/* "Read More" Buttons in News */
#views-bootstrap-news-block-1 .more a,
#block-plan-b5-views-block-news-block-1 .view-footer a {
  display: inline-block;
  background-color: var(--primary);
  color: #fff !important;
  border-radius: 50px;
  text-decoration: none;
  text-transform: uppercase;
  transition: all 0.3s ease;
}
#views-bootstrap-news-block-1 .more a {
  padding: 0.4rem 1.2rem;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-top: 0.5rem;
}
#block-plan-b5-views-block-news-block-1 .view-footer a {
  padding: 0.6rem 1.5rem;
  font-weight: 500;
  letter-spacing: 0.5px;
  margin-top: 1rem;
}
#views-bootstrap-news-block-1 .more a:hover,
#block-plan-b5-views-block-news-block-1 .view-footer a:hover {
  background-color: var(--secondary);
  transform: translateY(-2px);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
}
.view-footer {
  text-align: center;
  margin-top: 2rem;
  padding: 2rem;
  border-radius: 12px;
}


/* Newsletter & Alarm Blocks */
#block-block-plan-b5-alarm { text-align: center; padding: 20px; }
#block-block-plan-b5-alarm .buttons-wrap .btn {
  display: inline-block;
  padding: 1rem 1.5rem;
  font-size: 1.2rem;
  font-weight: 600;
  border-radius: 8px;
  text-align: center;
  background-color: crimson!important;
  transition: transform 0.2s, box-shadow 0.2s;
}
#block-block-plan-b5-alarm .buttons-wrap .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  text-decoration: none;
}

#block-plan-b5-ezhednevenbyuletin {
  text-align: center;
  padding: 20px;
  background-color: var(--primary-op);
}
#block-plan-b5-ezhednevenbyuletin .buttons-wrap {
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 12px !important;
  margin-top: 20px;
  width: 100%;
  flex-direction: row !important;
}
#block-plan-b5-ezhednevenbyuletin .buttons-wrap .button {
  display: inline-block !important;
  background-color: var(--primary);
  color: #fff !important;
  padding: 10px 22px;
  border-radius: 6px;
  text-decoration: none !important;
  font-weight: 600;
  text-align: center;
  transition: background-color 0.3s ease, transform 0.2s ease;
  flex: 0 1 auto;
  white-space: nowrap;
  cursor: pointer;
}
#block-plan-b5-ezhednevenbyuletin .buttons-wrap .button:hover {
  background-color: var(--primary);
  transform: translateY(-2px);
}

/* Municipality Info Block */
#block-plan-b5-views-block-muni-main-info-block-1 {
  background: rgba(255, 255, 255, 0.85);
  border-radius: 12px;
  padding: 20px 30px;
  margin-top: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
#block-plan-b5-views-block-muni-main-info-block-1 .views-field-field-phone .row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  text-align: left;
}
#block-plan-b5-views-block-muni-main-info-block-1 .col-4 {
  flex: 1 1 30%;
  min-width: 250px;
  background: rgba(1, 96, 144, 0.05);
  padding: 10px 15px;
  border-radius: 8px;
  font-size: 1.3rem;
  color: #003b5c;
}
#block-plan-b5-views-block-muni-main-info-block-1 a { text-decoration: none; word-break: break-all; }
#block-plan-b5-views-block-muni-main-info-block-1 a:hover { text-decoration: underline; color: #004b75; }

/* Navigation for Municipality */
#block-plan-b5-navigaciyazaobschina-2 #block-dafest h2.sr-only {
  position: relative !important;
  clip: auto !important;
  clip-path: none !important;
  width: auto !important;
  height: auto !important;
  overflow: visible !important;
  white-space: normal !important;
  display: block !important;
  visibility: visible !important;
  margin: 0 0 1rem 0;
  padding: 0.8rem 1rem;
  color: var(--secondary) !important;
  font-size: 1.8rem;
  font-weight: 700;
  text-transform: uppercase;
  border-left: 5px solid var(--secondary);
  border-radius: 6px;
}
#block-plan-b5-navigaciyazaobschina-2 #block-dafest ul.nav { margin-top: 0.5rem; }
#block-dafest .nav-item .active {
  background-color: var(--secondary-op);
  border-radius: 12px;
}

/* Tables in Content */
#block-plan-b5-content {
  background: rgba(255, 255, 255, 0.85);
  padding: 10px;
  border-radius: 12px;
}
#block-plan-b5-content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 2rem;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
#block-plan-b5-content table caption {
  caption-side: top;
  font-weight: 600;
  font-size: 1.25rem;
  color: var(--primary);
  background: rgba(1, 96, 144, 0.1);
  padding: 10px 15px;
  text-align: left;
}
#block-plan-b5-content thead th {
  background-color: var(--primary) !important;
  color: white;
  font-weight: 500;
  padding: 10px;
  text-align: left;
}
#block-plan-b5-content td {
  padding: 10px;
  border-top: 1px solid rgba(0,0,0,0.1);
  vertical-align: middle;
}
#block-plan-b5-content tbody tr:nth-child(even) { background: rgba(240, 247, 255, 0.8); }
#block-plan-b5-content a { color: var(--primary); }
#block-plan-b5-content a:hover { color: var(--secondary); text-decoration: none; }

/* KAV Org Table */
.kav-org-table-wrapper { margin: 1.5rem 0; }
table.kav-org-table {
  width: 100% !important;
  border-collapse: collapse !important;
  table-layout: fixed !important;
  background: #ffffff;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.05);
}
.kav-org-table th, .kav-org-table td {
  border: 1px solid #cccccc;
  padding: 10px;
  text-align: left;
  vertical-align: top;
  word-wrap: break-word !important;
  overflow-wrap: break-word !important;
  white-space: normal !important;
}
.kav-org-table th { background-color: #f1f3f5; font-weight: 700; }
.kav-org-table a { color: #004085; text-decoration: none; }
.kav-org-table a:hover { text-decoration: underline; }
.kav-org-table .accordion-btn {
  background-color: #0069d9;
  color: #ffffff;
  border: none;
  padding: 5px 10px;
  cursor: pointer;
  border-radius: 4px;
  font-size: 0.9rem;
}
.kav-org-table .accordion-btn:hover { background-color: #0056b3; }
.kav-org-table .accordion-content {
  display: none;
  padding: 10px;
  background-color: #f8f9fa;
  border: 1px solid #dddddd;
  margin-top: 5px;
  border-radius: 4px;
  white-space: pre-line;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  overflow: hidden;
}
.kav-org-table .child-row { display: none; background-color: #f8f9fb; }
.kav-org-table .child-row td { border-top: none; }
.kav-org-table .child-label { display: block; padding-left: 2rem; font-size: 0.95rem; }

/* Fixed Column Widths for KAV Table */
table.kav-org-table th:nth-child(1), table.kav-org-table td:nth-child(1) { width: 12% !important; }
table.kav-org-table th:nth-child(2), table.kav-org-table td:nth-child(2) { width: 28% !important; }
table.kav-org-table th:nth-child(3), table.kav-org-table td:nth-child(3) { width: 60% !important; }

/* Library Section */
.library-section { margin-top: 2rem; }
.library-card {
  background-color: #f8f9fa;
  border-radius: 12px;
  border: 1px solid #dee2e6;
  transition: transform 0.3s, box-shadow 0.3s;
}
.library-card:hover { transform: translateY(-5px); box-shadow: 0 10px 25px rgba(0,0,0,0.1); }
.library-link h3 {
  font-size: 1rem;
  color: #0d6efd;
  margin: 0;
  text-decoration: none;
  transition: color 0.3s;
}
.library-link:hover h3 { color: #0a58ca; text-decoration: underline; }

/* Views Fields Generic */
.views-field-title, .views-field-field-proj-type, .views-field-field-proj-status,
.views-field-field-fin, .views-field-field-act-type, .views-field-field-valid-until,
.views-field-field-data-na-priemane, .views-field-field-last-change, .views-field-field-indicator,
.views-field-field-value-d, .views-field-field-datapoint, .views-field-field-iztochnik-na-dannite, .views-field-field-source-fin, .views-field-field-vid-na-akta, .views-field-field-link-news, .views-field-field-valid-from, .views-field-field-value-b, .views-field-field-trans-nation-law, .views-field-field-tema, .views-field-field-teritorialen-obhvat, .views-field-field-municipality, .views-field-name, .views-field-edit-node, .views-field-field-value-n, .views-field-field-tip-na-iniciativata, .views-field-field-tip-na-dobrata-praktika, .views-field-field-tip-prilozheni-merki {
  font-size: 1.2rem;
}

.views-field-title {
   text-align: left !important;
}

/* Отстояние между редовете (всички field wrapper-и) */
.node--type-obshchini-dokument-v-oblastta-na .node__content .field {
    margin-bottom: 1.2em !important;
}

.datetime { color: black; }
.views-field-field-data-na-priemane .datetime,
.views-field-field-last-change .datetime { color: black; font-weight: normal; }
.views-row { width: 100%; }

.view-taxonomy-term > .view-content > .views-row:nth-child(2n+1),
.view-linked-content > .view-content > h3 {
  padding-left: 15px;
  padding-right: 15px;
  margin-top: 0;
}

/* Node Links (Source/Read More) Wrapper Fix */
.node--type-news .field--name-field-link-news,
.node--type-news .inline__links {
  display: inline-flex;
  align-items: center;
  background: #f5f9f5;
  border: 1px solid #d6e9c6;
  padding: 12px 14px;
  box-sizing: border-box;
  height: 100%;
  line-height: 1.2;
}
.node--type-news .field--name-field-link-news {
  border-right: none;
  border-radius: 6px 0 0 6px;
  width: 65%;
  gap: 8px;
}
.node--type-news .inline__links {
  justify-content: flex-end;
  border-left: none;
  border-radius: 0 6px 6px 0;
  width: 35%;
}
.node--type-news .field--name-field-link-news + .inline__links { margin-left: -4px; }
.node--type-news .field--name-field-link-news .field__label {
  font-weight: 600;
  color: #2e7d32;
  margin-right: 0.5rem;
  white-space: nowrap;
}
.node--type-news .field--name-field-link-news a,
.node--type-news .inline__links a {
  color: #1b5e20;
  text-decoration: none;
  font-weight: 500;
}
.node--type-news .inline__links .nav-link a,
.node--type-news .node-readmore a {
  white-space: nowrap;
  padding: 0.35rem 1rem;
  border-radius: 50px;
  border: 1px solid #198754;
  background: white;
  color: #198754;
  display: inline-block;
}

/* Node Readmore Generic */
.node-readmore a,
.node-readmore a:hover,
.node-readmore a:active,
.node-readmore a:visited { color: #000000; }

/* Labels */
.node__content .field__label {
  /*color: #2e7d32;*/
  text-transform: none;
  border-left: 4px solid #81c784;
  padding-left: 8px;
}
.field--label-inline .field__label {
  display: inline;
  margin-right: 0.5rem;
  vertical-align: middle;
}
.node__content .field:hover .field__label { color: #1b5e20; }
.muni-info .label {
  font-weight: bold;
  color: var(--secondary);
  margin-bottom: 0.25rem;
  display: block;
}
.muni-info .value a { color: #000; text-decoration: none; }
.muni-info .value a:hover { text-decoration: underline; }
.muni-info .col-md-4 {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

/* Misc Views */
.view-technical-info-kav .views-field-field-indicator,
.view-technical-info-kav .views-field-field-iztochnik-na-dannite,
.view-id-indicator_index.view-display-id-page_2 .views-field-name,
.view-id-indicator_index.view-display-id-page_2 .views-field-field-iztochnik-na-dannite { width: 40%; }
.view-technical-info-kav .views-field-field-datapoint,
.view-id-indicator_index.view-display-id-page_2 .views-field-field-datapoint { width: 15%; }
.view-id-indicator_index.view-display-id-page_2 .views-field-field-datapoint time,
.view-technical-info-kav .views-field-field-datapoint time { font-weight: 400; }
.view-indicator-index .view-content.row { display: block; }
.view-indicator-index th.views-field-title { width: 20%; text-align: center; }


#block-plan-b5-views-block-infomaps-block-1 table#infomap { display: none; visibility: hidden; }
.views-exposed-form .js-form-item { margin-right: 1rem; }

/* Tabs */
.nav-tabs .nav-link.active { background: var(--secondary); color: #fff; }
.tab-content {
  padding: 1rem;
  border: thin solid var(--primary);
  border-radius: 0.375rem;
}
.tab-content>.active>.views-field-name { display: inline-block; margin-right: 1rem; }

.accordion-button { font-size: 1.5rem; }
.accordion-content, .subrow { display: none; }

/* ============================================================
   FOOTER — Основен стил
   ============================================================ */

.site-footer {
    background: var(--secondary);
    color: #ffffff;
    padding-top: 40px;
    padding-bottom: 20px;
    font-size: 1.2rem;
}

.site-footer .content {
    font-size: 1em;
}

/* Текст в първите два блока*/
#block-plan-b5-zakontakt, #block-plan-b5-zakontakti {
    border: none;
}

.site-footer strong {
    color: #ffffff;
    font-weight: 600;
}

/* Линкове */
.site-footer a {
    color: #FFD700;
    text-decoration: none;
}

.site-footer a:hover {
    color: #ffffff;
    text-decoration: underline;
}

/* Отстояния на блоковете */
.site-footer__top .block {
    margin-bottom: 10px;
}

/* ============================================================
   FOOTER — Bottom bar
   ============================================================ */

.site-footer__bottom {
    border-top: 1px solid rgba(255,255,255,0.2);
    margin-top: 25px;
    padding-top: 15px;
}

/* Login Menu */
.site-footer__bottom .menu--account .nav-link {
    color: #ffffff;
    padding: 6px 12px;
    border-radius: 4px;
    transition: background 0.2s ease, color 0.2s ease;
}

.site-footer__bottom .menu--account .nav-link:hover {
    background: var(--secondary);
    color: #ffffff;
}

/* ============================================================
   FOOTER — Search Form
   ============================================================ */

#search-block-form {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 10px;
}

#search-block-form input.form-search {
    background: #ffffff;
    border: 1px solid #ccc;
    color: #000;
}

#search-block-form input.form-submit {
    background: var(--secondary) !important;
    border: none;
    color: #ffffff !important;
    padding: 6px 14px;
    cursor: pointer;
    transition: background 0.2s ease;
}

#search-block-form input.form-submit:hover {
    background: #0160A0 !important;
}


/* =========================================
   7. MEDIA QUERIES (Responsive)
   ========================================= */

@media (min-width: 1400px) {
  #views-bootstrap-news-block-1 .col-xxl-4 {
    flex: 0 0 auto !important;
    width: 32% !important;
    background-color: #add8e62b;
    border-radius: 1em;
    padding: 1rem;
  }
}

@media (max-width: 992px) {
  #block-plan-b5-header h1 {
    font-size: 1.2rem;
    margin-top: 10px;
    text-align: center;
  }
  #block-plan-b5-header .extra-logos {
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 10px;
  }
  #block-plan-b5-header img { max-height: 70px; }
}

/* ===== HEADER FIX — CORRECT RESPONSIVE ALIGNMENT ===== */

/* Правим целия хедър истински flex контейнер */
#block-plan-b5-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
}

/* Колоната със заглавието да не се свива прекалено */
#block-plan-b5-header h1 {
  white-space: normal;       /* Да се пренася, но контролирано */
  word-break: break-word;
  line-height: 1.2;
}

/* === BREAKPOINT: MD (768–991px) === */
/* Тук беше най-големият проблем */
@media (max-width: 991px) {
  #block-plan-b5-header {
    text-align: center;
    justify-content: center;
  }

  #block-plan-b5-header .col-md-5 {
    order: 2;                 /* Заглавието винаги да е в средата */
    flex: 0 0 100%;
    max-width: 100%;
    margin: 10px 0;
  }

  #block-plan-b5-header .col-md-3 {
    order: 1;                 /* Логото остава първо */
  }

  #block-plan-b5-header .extra-logos {
    order: 3;                 /* Малките логота остават най-отдолу */
    flex: 0 0 100%;
    max-width: 100%;
    margin-top: 10px;
  }
}

/* === BREAKPOINT: SM (до 576px) === */
@media (max-width: 576px) {
  #block-plan-b5-header h1 {
    font-size: 1.1rem;
  }

  .extra-logos img {
    max-width: 90px;
    margin: 5px;
  }
}


@media (max-width: 768px) {
  /* About Project Block */
  #block-plan-b5-zaproekta { text-align: center; padding: 1.5rem; }
  #block-plan-b5-zaproekta .col-md-10.col-xl-8 { align-items: center; }
  #block-plan-b5-zaproekta h1 { font-size: 1.6rem; }
  #block-plan-b5-zaproekta p { font-size: 20px; }
  
  /* Content alignment fix */
  #block-plan-b5-content .col-md-10.col-xl-8 {
     padding-left: 20px;
     text-align: left;
  }

  /* Social Icons */
  #block-social-icons { justify-content: center; gap: 0.75rem; }
  #block-social-icons .social-link svg { height: 1.7em; width: 1.7em; }

  /* Buttons Wrap */
  #block-plan-b5-ezhednevenbyuletin .buttons-wrap .button {
    flex: 1 1 calc(50% - 12px);
    white-space: normal;
  }

  /* Node Links Stack */
  .node--type-news .field--name-field-link-news,
  .node--type-news .inline__links {
    display: block;
    width: 100%;
    border-radius: 6px;
    margin-bottom: 6px;
    min-height: auto;
    height: auto;
    line-height: 1.4;
  }
  .node--type-news .inline__links .links-inline { justify-content: flex-start; }

  /* Footer */
  .site-footer__top { flex-direction: column; align-items: flex-start; }
  .region-footer-first, .region-footer-second { flex: 1 1 100%; }
  .site-footer__bottom { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
}

@media (max-width: 576px) {
  #block-plan-b5-header h1 { font-size: 1rem; }
  #block-plan-b5-header img { max-height: 60px; }
}

@media (max-width: 480px) {
  #block-plan-b5-ezhednevenbyuletin .buttons-wrap .button {
    flex: 1 1 100%;
  }
}
#block-plan-b5-views-block-muni-proj-kav-partner-block1 table thead tr {
    background-color: var(--primary) !important;
}

#block-plan-b5-views-block-muni-proj-kav-partner-block1 table thead th {
    color: #fff !important;
}
 /*Tables*/
.views-view-table thead th {
    background: var(--primary) !important;
    color: #fff !important;
}

.views-view-table thead th a {
    color: #fff !important;
}

.table.views-view-table thead th {
    background-color: var(--primary) !important;
    color: #fff !important;
    text-align: center !important;
    vertical-align: middle !important;
    padding: 12px 8px;
}

.table.views-view-table tbody td {
    text-align: left; 
}

#block-plan-b5-views-block-muni-proj-kav-partner-block1 table thead th {
    text-align: center !important;
}

/* Контейнерът на долните елементи */
.node__content .field--name-field-link-news,
.node__content .inline__links {
  display: inline-flex;
  align-items: center;
  margin-right: 2rem; /* разстояние между двете групи */
  vertical-align: middle;
}

/* Label + value да са в един ред */
.node__content .field--name-field-link-news .field__label,
.node__content .field--name-field-link-news .field__item {
  display: inline;
  margin-right: 1em;
}

/* Подравняване на двете групи в общ ред */
.node__content .field--name-field-link-news {
  margin-top: 1rem;
}
.node__content .inline__links {
  margin-top: 1rem;
}

/* Линковете вътре да не скачат */
.node__content .inline__links nav.links.inline {
  display: flex;
  gap: 1rem; /* разстояние между “Виж повече“ и “Коментар“ */
}

/* Да стоят точно един до друг */
.node__content .field--name-field-link-news,
.node__content .inline__links {
  white-space: nowrap;
}

/* Основен вид на таблицата */
table.kav-org-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
  font-size: 1.2rem;
}

/* Клетки – да се виждат ясно */
table.kav-org-table th,
table.kav-org-table td {
  border: 1px solid #ddd;
  padding: 0.5rem 0.75rem;
  vertical-align: top;
}

/* Хедърът – да не е бял на сиво */
table.kav-org-table th {
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  text-align: left;
}

/* Зебра редове за по-лесно четене */
table.kav-org-table tr:nth-child(even) td {
  background: #f9f9f9;
}

/* Бутоните "Покажи функции" да изглеждат нормално */
table.kav-org-table button {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  border-radius: 3px;
  border: 1px solid var(--secondary);
  background: #fff;
  color: var(--secondary);
  font-size: 1.2rem;
  cursor: pointer;
}

table.kav-org-table button:hover {
  background: var(--secondary);
  color: #fff;
}

/* Съдържанието под бутоните */
table.kav-org-table .accordion-content {
  display: none;                /* по начало скрито; JS го отваря */
  margin-top: 0.4rem;
  padding: 0.5rem 0.75rem;
  background: #f5f5f5;
  border-left: 3px solid var(--secondary);
  color: #222;
}

/* Подредките (subrow) – да изглеждат като подредове */
table.kav-org-table tr.subrow td {
  font-size: 1.2rem;
  padding-left: 2rem;
  background: #fafafa;
}

/* ============================================================
   ГЛОБАЛНИ ЛИНКОВЕ – без подчертаване навсякъде
   ============================================================ */
a {
  text-decoration: none !important;
}

/* При hover и focus – появява се подчертаване */
a:hover,
a:focus {
  text-decoration: underline !important;
}

/* При active/click – също подчертаване */
a:active {
  text-decoration: underline !important;
}

/* При visited – нормално поведение, без подчерт. */
a:visited {
  text-decoration: none !important;
}

.field--name-field-main-goal.field--label-inline .field__item {
  padding-left: 12px;
  padding-top: 1em;
  padding-bottom: 1em;
}

/* Разстояние между всички field блокове */
.node__content .field {
    margin-bottom: 14px !important;
}

/* Допълнителен въздух за дълги текстове */
.node__content .field.text-formatted {
    margin-bottom: 20px !important;
}

/* Разстояние между label и стойност */
.node__content .field__label {
    margin-right: 6px;
    min-width: 180px; /* прави лейбълите в една колонка */
    font-weight: 600;
}

/* Леко навътре за field__item */
.node__content .field__item {
    padding-left: 5px;
}

.field--name-field-main-activities .field__label,
.field--name-field-main-activities .field__item {
  vertical-align: top !important;
}

.comment__author .username {
    white-space: wrap;
}
.comment__author {
    font-size: 1rem;
}
.tb-megamenu-nav.level-0 {
	justify-content: center;
}