/**
 * Section subtitles — pill (subtitle-bg.png) + logo gradient text (sections)
 * Hero subtitle — white text + pill background on element
 */

.raammska-site .title-area .sec-subtitle {
  font-family: var(--title-font);
  font-weight: 600;
  font-size: 16px;
  line-height: 46px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  display: inline-block;
  height: 46px;
  padding: 0 28px;
  margin: 0 0 19px 0 !important;
  position: relative;
  gap: 0;
  align-items: unset;
  vertical-align: top;
  isolation: isolate;
  z-index: 0;
  background-color: transparent;
  background-image: var(--theme-gradient);
  background-size: 100% auto;
  background-repeat: no-repeat;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent !important;
  -webkit-text-fill-color: transparent;
}

.raammska-site .title-area .sec-subtitle::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  display: block;
  background: url("../img/contact/subtitle-bg.png") center bottom / 100% 100% no-repeat;
  pointer-events: none;
}

/* Hero — subtitle-bg.png as white pill; label stays white */
.raammska-site .raammska-hero .hero-subtitle {
  font-family: var(--title-font);
  font-weight: 600;
  font-size: 13px;
  line-height: 40px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: inline-block;
  height: 40px;
  padding: 0 22px !important;
  margin: 0 0 14px 0 !important;
  position: relative;
  text-align: left;
  color: var(--white-color) !important;
  -webkit-text-fill-color: currentColor !important;
  background-color: transparent;
  background-image: none;
  isolation: isolate;
  overflow: visible;
}

.raammska-site .raammska-hero .hero-subtitle::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block !important;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  transform: none;
  width: auto;
  height: auto;
  background-color: transparent;
  background: url("../img/contact/subtitle-bg.png") center bottom / 100% 100% no-repeat;
  filter: brightness(0) invert(1);
  opacity: 1;
  pointer-events: none;
}

.raammska-site .raammska-hero .hero-subtitle::after {
  display: none !important;
  content: none !important;
}

.raammska-site .sec-subtitle .subtitle-shape {
  display: none !important;
}

.raammska-site .contact-style1 .sec-subtitle.text-white,
.raammska-site .white-title .sec-subtitle.text-white {
  color: var(--white-color) !important;
  -webkit-text-fill-color: currentColor;
  background-color: transparent;
  background-image: url("../img/contact/subtitle-bg.png");
  background-position: center bottom;
  background-size: 100% 100%;
  background-repeat: no-repeat;
  -webkit-background-clip: border-box;
  background-clip: border-box;
}

/* Dark contact-layout2 band — white subtitle on pill */
.raammska-site .contact-layout2 .title-area .sec-subtitle.raammska-contact-sec-tag,
.raammska-site .contact-layout2 .title-area .sec-subtitle.text-white.left-shape {
  color: var(--white-color) !important;
  -webkit-text-fill-color: currentColor;
  background-image: url("../img/contact/subtitle-bg.png");
  -webkit-background-clip: border-box;
  background-clip: border-box;
  background-size: 100% 100%;
  background-repeat: no-repeat;
  background-position: center bottom;
}

.raammska-site .contact-style1 .sec-subtitle.text-white::before,
.raammska-site .white-title .sec-subtitle.text-white::before {
  display: none !important;
}

.raammska-site .contact-layout2 .title-area .sec-subtitle.text-white::before {
  display: none !important;
}

@media (min-width: 576px) and (max-width: 767.98px) {
  .raammska-site .raammska-hero .hero-subtitle {
    display: block;
    width: fit-content;
    max-width: calc(100% - 8px);
    height: auto;
    min-height: 36px;
    line-height: 1.35;
    padding: 7px 16px;
    font-size: 11px;
    margin-left: 0 !important;
    margin-right: 0 !important;
    margin-bottom: 14px !important;
    text-align: left;
    white-space: normal;
  }
}

@media (max-width: 575px) {
  .raammska-site .title-area .sec-subtitle,
  .raammska-site .contact-style1 .sec-subtitle {
    font-size: 14px;
    padding: 0 20px;
    height: 42px;
    line-height: 42px;
  }

  /* Hero pill: allow wrap — avoid overlapping the title */
  .raammska-site .raammska-hero .hero-subtitle {
    display: block;
    width: fit-content;
    max-width: calc(100% - 8px);
    height: auto;
    min-height: 34px;
    line-height: 1.35;
    padding: 7px 14px;
    font-size: 10px;
    letter-spacing: 0.05em;
    margin-left: 0 !important;
    margin-right: 0 !important;
    margin-bottom: 14px !important;
    text-align: left;
    white-space: normal;
    box-sizing: border-box;
  }
}
