:root {
  --bsp-ink: #20272b;
  --bsp-muted: #66727a;
  --bsp-line: #dfe5e8;
  --bsp-soft: #f5f7f7;
  --bsp-green: #07945d;
  --bsp-blue: #367db7;
  --bsp-red: #d43842;
  --bsp-purple: #79539b;
  --bsp-gold: #9d7a09;
  --bsp-teal: #338b83;
  --bsp-gray: #5d6b74;
}

.bulgaristika-section-header,
.bulgaristika-listing-content,
.bulgaristika-empty-state {
  box-sizing: border-box;
  width: 90%;
  max-width: 1440px;
  margin-right: auto;
  margin-left: auto;
}

.bulgaristika-section-header {
  padding: 44px 0 26px;
}

.bulgaristika-section-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 24px;
  color: var(--bsp-muted);
  font-size: 14px;
  line-height: 1.45;
}

.bulgaristika-section-breadcrumbs a {
  color: #47708d;
  text-decoration: none;
}

.bulgaristika-section-breadcrumbs a:hover,
.bulgaristika-section-breadcrumbs a:focus-visible {
  color: var(--bsp-green);
  text-decoration: underline;
}

.bulgaristika-crumb-separator {
  color: #a8b1b6;
}

.bulgaristika-section-title-row {
  display: flex;
  gap: 20px;
  align-items: stretch;
}

.bulgaristika-section-accent {
  flex: 0 0 6px;
  width: 6px;
  min-height: 78px;
  background: var(--bsp-green);
}

.bulgaristika-section-kicker {
  margin: 0 0 7px;
  color: var(--bsp-green);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.3;
  text-transform: uppercase;
}

.bulgaristika-section-header h1 {
  margin: 0;
  color: var(--bsp-ink);
  font-family: "Roboto Slab", Georgia, serif;
  font-size: 42px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0;
}

.bulgaristika-listing-content {
  padding-bottom: 64px;
}

.bulgaristika-listing-content .rt-container-fluid.rt-tpg-container {
  width: 100%;
  padding: 0;
}

.bulgaristika-listing-content .rt-tpg-container .rt-row {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 20px;
  margin: 0 !important;
}

.bulgaristika-listing-content .rt-tpg-container .rt-grid-item {
  width: auto !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.bulgaristika-listing-content .rt-tpg-container .rt-holder {
  display: flex;
  height: 430px;
  min-height: 430px;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--bsp-line);
  border-top: 4px solid var(--bsp-green);
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(22, 42, 52, 0.08);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.bulgaristika-listing-content .rt-tpg-container .rt-grid-item:nth-child(6n + 2) .rt-holder {
  border-top-color: var(--bsp-blue);
}

.bulgaristika-listing-content .rt-tpg-container .rt-grid-item:nth-child(6n + 3) .rt-holder {
  border-top-color: var(--bsp-red);
}

.bulgaristika-listing-content .rt-tpg-container .rt-grid-item:nth-child(6n + 4) .rt-holder {
  border-top-color: var(--bsp-purple);
}

.bulgaristika-listing-content .rt-tpg-container .rt-grid-item:nth-child(6n + 5) .rt-holder {
  border-top-color: var(--bsp-gold);
}

.bulgaristika-listing-content .rt-tpg-container .rt-grid-item:nth-child(6n + 6) .rt-holder {
  border-top-color: var(--bsp-teal);
}

.bulgaristika-listing-content .rt-tpg-container .rt-holder:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 28px rgba(22, 42, 52, 0.13);
}

.bulgaristika-listing-content .rt-tpg-container .rt-img-holder {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--bsp-soft);
}

.bulgaristika-listing-content .rt-tpg-container .rt-img-holder > a {
  display: block;
  width: 100%;
  height: 100%;
  padding: 12px;
}

.bulgaristika-listing-content .rt-tpg-container .rt-img-holder img {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain;
  transition: transform 200ms ease;
}

.bulgaristika-listing-content .rt-tpg-container .rt-holder:hover .rt-img-holder img {
  transform: scale(1.025);
}

.bulgaristika-listing-content .rt-tpg-container .rt-detail {
  display: flex;
  flex: 1;
  align-items: flex-start;
  padding: 20px 20px 22px !important;
}

.bulgaristika-listing-content .rt-tpg-container .entry-title {
  margin: 0 !important;
  font-size: 20px !important;
  font-weight: 700;
  line-height: 1.35 !important;
  letter-spacing: 0;
}

.bulgaristika-listing-content .rt-tpg-container .entry-title a {
  display: -webkit-box;
  overflow: hidden;
  color: var(--bsp-ink) !important;
  text-decoration: none;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 6;
}

.bulgaristika-listing-content .rt-tpg-container .entry-title a:hover,
.bulgaristika-listing-content .rt-tpg-container .entry-title a:focus-visible {
  color: var(--bsp-green) !important;
}

.bulgaristika-empty-state {
  min-height: 300px;
  margin-bottom: 64px;
  padding: 54px 48px;
  border: 1px solid var(--bsp-line);
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(22, 42, 52, 0.06);
}

.bulgaristika-empty-state-line {
  width: 64px;
  height: 5px;
  margin-bottom: 26px;
  background: var(--bsp-green);
}

.bulgaristika-empty-state p {
  max-width: 620px;
  margin: 0;
  color: var(--bsp-muted);
  font-size: 20px;
  line-height: 1.6;
}

body.single-post .hero-section {
  border-bottom: 1px solid var(--bsp-line);
  background: var(--bsp-soft);
}

body.single-post .hero-section .entry-header {
  display: flex;
  width: 90%;
  max-width: 1440px;
  min-height: 0;
  flex-direction: column;
  align-items: flex-start;
  padding-top: 44px;
  padding-bottom: 40px;
  text-align: left;
}

body.single-post .hero-section .ct-breadcrumbs {
  order: 1;
  margin-bottom: 24px;
}

body.single-post .hero-section .page-title {
  position: relative;
  order: 2;
  max-width: 1120px;
  margin: 0;
  padding-left: 25px;
  color: var(--bsp-ink);
  font-family: "Roboto Slab", Georgia, serif;
  font-size: 44px;
  line-height: 1.18;
  letter-spacing: 0;
}

body.single-post .hero-section .page-title::before {
  position: absolute;
  top: 2px;
  bottom: 2px;
  left: 0;
  width: 6px;
  background: var(--bsp-green);
  content: "";
}

body.single-post .hero-section .page-description {
  order: 3;
  max-width: 980px;
  margin-top: 18px;
  padding-left: 25px;
  color: var(--bsp-muted);
  font-size: 17px;
  line-height: 1.65;
}

body.single-post article img {
  max-width: 100%;
  height: auto;
}

body.single-post article iframe,
body.single-post article video {
  display: block;
  max-width: 100%;
  margin-right: auto;
  margin-left: auto;
}

body.single-post article iframe[src*="youtube.com"],
body.single-post article iframe[src*="youtu.be"],
body.single-post article iframe[src*="vimeo.com"] {
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  border: 0;
}

body.single-post article table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
}

/* Chat Style: the real single-post content area is 80% of the viewport. */
body.single-post article .entry-content {
  box-sizing: border-box;
  width: 80% !important;
  max-width: none !important;
  margin-right: auto !important;
  margin-left: auto !important;
}

/* Existing post builders should fill the 80% outer area, not narrow it again. */
body.single-post article .entry-content > .bulgaristika-draft-content,
body.single-post article .entry-content > .elementor,
body.single-post article .entry-content > .elementor > .e-con,
body.single-post article .entry-content > .elementor > .elementor-section,
body.single-post article .entry-content > .elementor > .elementor-section-wrap,
body.single-post article .entry-content > .elementor > .elementor-section-wrap > .elementor-section {
  width: 100% !important;
  max-width: none !important;
  margin-right: auto !important;
  margin-left: auto !important;
}

/* A single lead image belongs in the text flow, matching the portal's established posts. */
body.single-post article .bulgaristika-inline-flow {
  display: flow-root;
  width: 100%;
  max-width: none;
}

body.single-post article .bulgaristika-inline-flow .bulgaristika-inline-image {
  float: left;
  display: block;
  width: min(32%, 360px) !important;
  max-width: 360px !important;
  height: auto;
  margin: 4px 28px 18px 0 !important;
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14);
  object-fit: contain;
}

body.single-post article .bulgaristika-inline-flow .bulgaristika-inline-image.alignright {
  float: right;
  margin-right: 0 !important;
  margin-left: 28px !important;
}

#footer .elementor-element-d5fb4f9 img {
  width: min(360px, 80%) !important;
}

#footer .elementor-element-f3c8af1 {
  width: 90%;
  max-width: 1180px;
  margin-right: auto;
  margin-left: auto;
}

#footer .elementor-element-f3c8af1 img {
  width: auto !important;
  max-width: 220px;
  max-height: 70px;
  object-fit: contain;
}

#footer .elementor-element-82c8369 {
  width: 90%;
  max-width: 1180px;
  margin-right: auto;
  margin-left: auto;
  padding-right: 0 !important;
  padding-left: 0 !important;
}

#footer .elementor-element-280cdf2 {
  padding-right: 5% !important;
  padding-left: 5% !important;
}

@media (max-width: 767px) {
  body.single-post article .bulgaristika-inline-flow .bulgaristika-inline-image,
  body.single-post article .bulgaristika-inline-flow .bulgaristika-inline-image.alignright {
    float: none !important;
    width: min(100%, 360px) !important;
    max-width: 100% !important;
    margin: 0 auto 24px !important;
  }

  .bulgaristika-section-header {
    padding-top: 30px;
  }

  .bulgaristika-section-title-row {
    gap: 14px;
  }

  .bulgaristika-section-accent {
    flex-basis: 5px;
    width: 5px;
    min-height: 64px;
  }

  .bulgaristika-section-header h1,
  body.single-post .hero-section .page-title {
    font-size: 30px;
  }

  .bulgaristika-listing-content .rt-tpg-container .rt-row {
    grid-template-columns: 1fr;
  }

  .bulgaristika-empty-state {
    min-height: 240px;
    padding: 38px 28px;
  }

  .bulgaristika-empty-state p {
    font-size: 18px;
  }

  body.single-post .hero-section .entry-header {
    padding-top: 30px;
    padding-bottom: 30px;
  }

  body.single-post .hero-section .page-title,
  body.single-post .hero-section .page-description {
    padding-left: 19px;
  }

  body.single-post .hero-section .page-title::before {
    width: 5px;
  }

  #footer .elementor-element-c9fbb50 {
    gap: 12px 0 !important;
    padding-top: 18px !important;
    padding-bottom: 0 !important;
  }

  #footer .elementor-element-0724b13 {
    min-height: 0 !important;
    padding: 0 !important;
  }

  #footer .elementor-element-d5fb4f9 img {
    width: min(280px, 78%) !important;
  }

  #footer .elementor-element-f3c8af1 {
    display: block !important;
    padding: 0 !important;
  }

  #footer .elementor-element-f3c8af1 > .e-con-inner {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px 10px !important;
    width: 100% !important;
    max-width: none !important;
    padding: 0 !important;
  }

  #footer .elementor-element-f3c8af1 > .e-con-inner > .elementor-widget-image {
    width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    align-self: center;
  }

  #footer .elementor-element-f3c8af1 img {
    max-width: 96px;
    max-height: 42px;
  }

  #footer .elementor-element-82c8369 {
    display: grid !important;
    grid-template-columns: 1fr !important;
    grid-template-rows: auto !important;
    gap: 0 !important;
    padding-top: 6px !important;
    padding-bottom: 6px !important;
  }

  #footer .elementor-element-82c8369 > .e-con {
    width: 100% !important;
    min-height: 0 !important;
    gap: 5px !important;
    padding: 10px 0 !important;
  }

  #footer .elementor-element-82c8369 > .e-con + .e-con {
    border-top: 1px solid rgba(68, 119, 173, 0.18);
  }

  #footer .elementor-element-82c8369 .elementor-heading-title {
    margin: 0 !important;
    font-size: 19px !important;
    line-height: 1.25 !important;
  }

  #footer .elementor-element-82c8369 .elementor-widget-text-editor {
    margin: 0 !important;
    font-size: 14px;
    line-height: 1.4;
  }

  #footer .elementor-element-82c8369 .elementor-widget-text-editor p {
    margin: 0 !important;
  }

  #footer .elementor-element-d7038b3 {
    display: none !important;
  }

  #footer .elementor-element-280cdf2 {
    flex-direction: column !important;
    gap: 0 !important;
    min-height: 0 !important;
    padding: 14px 20px !important;
    text-align: center;
  }

  #footer .elementor-element-524784c {
    width: 100% !important;
    margin: 0 !important;
    font-size: 13px;
    line-height: 1.45;
  }

  #footer .elementor-element-524784c p {
    margin: 0 !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bulgaristika-listing-content .rt-tpg-container .rt-holder,
  .bulgaristika-listing-content .rt-tpg-container .rt-img-holder img {
    transition: none;
  }
}
