@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

html, body { margin: 0; padding: 0; }
body { font-family: 'Poppins', sans-serif; color: #111; }

:root {
  --brand: #25CE7B;
  --green-light: #95E2C0;
  --green-dark: #2B5453;
  --blue-dark: #0B0F79;
  --visus: #8947CB;
  --purple-light: #C494F3;
  --radius-lg: 999px;
  --radius-md: 12px;
  --shadow-soft: 0 8px 24px rgba(0,0,0,.18);
}

.rota-bim-wrapper {
  width: 100%;
  position: relative;
}

.content-wrapper {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 16px;
  position: relative;
}

.bim-building {
  width: clamp(360px, 44vw, 575px);
  height: auto;
  aspect-ratio: 575 / 989;
  background: url('https://44552714.fs1.hubspotusercontent-na1.net/hubfs/44552714/assets/images/rota-bim/bim-building.png') no-repeat;
  background-size: cover;
  position: absolute;
  top: clamp(8px, 2vw, 16px);
  left: clamp(-130px, -12vw, -150px);
}

.rota-bim {
  width: 100%;
  min-height: 1024px;
  position: relative;
  overflow: clip;
}

@supports not (overflow: clip) {
  .rota-bim { overflow-x: hidden; overflow-y: visible; }
}

@media (max-width: 1106px) {
  .bim-building {
    left: clamp(-40px, -12vw, -150px);
  }
}

@media (max-width: 576px) {
  .rota-bim {
    height: 720px;
    min-height: initial;
    background: url('https://44552714.fs1.hubspotusercontent-na1.net/hubfs/44552714/assets/images/rota-bim/bg-main.jpg') no-repeat center / cover;
    overflow: hidden;
  }
}

.bg-triangle {
  width: 826px;
  height: 496px;
  background: url('https://44552714.fs1.hubspotusercontent-na1.net/hubfs/44552714/assets/images/rota-bim/bg-triangle.png') no-repeat center / cover;
  position: absolute;
  bottom: 0;
  left: -23vw;
}

.rota-bim__steps {
  margin: 0;
  display: grid;
  gap: clamp(32px, 6vw, 80px);
  width: 100%;
  position: relative;
  z-index: 1;
  top: clamp(40px, 8vw, 92px);
  left: clamp(16px, 8vw, 120px);
}

.rota-bim__trigger {
  --bar-bg: var(--green-light);
  --bar-color: #173D3C;
  display: inline-flex;
  align-items: center;
  border: 0;
  background: transparent;
  cursor: pointer;
  font: inherit;
  color: inherit;
}

.rota-bim__index {
  display: inline-grid;
  place-items: center;
  width: 76px;
  height: 76px;
  border-radius: var(--radius-lg);
  background: var(--brand);
  color: #fff;
  font-weight: 700;
  font-size: 52px;
  line-height: 1;
  box-shadow: 0 4px 10px rgba(0,0,0,.15);
  position: relative;
  z-index: 1;
  transition: background-color .18s ease, box-shadow .18s ease;
}

.rota-bim__title {
  background: var(--bar-bg);
  color: var(--bar-color);
  padding: 14px 24px 14px 60px;
  border-radius: var(--radius-lg);
  font-size: clamp(16px, 2.1vw, 28px);
  font-weight: 500;
  line-height: 1.2;
  box-shadow: 0 6px 18px rgba(0,0,0,.12);
  margin-left: -40px;
  transition: background-color .18s ease, color .18s ease, box-shadow .18s ease;
}

.rota-bim__trigger:hover .rota-bim__index { background: var(--visus); }
.rota-bim__trigger:hover .rota-bim__title { background: var(--purple-light); }

.rota-bim__trigger:focus-visible .rota-bim__title,
.rota-bim__trigger:focus-visible .rota-bim__index {
  outline: 3px solid rgba(11,15,121,.35);
  outline-offset: 2px;
}

@media (max-width: 768px) {
  .rota-bim__index { width: 56px; height: 56px; font-size: 34px; }
  .rota-bim__title { padding: 14px 18px 14px 50px; }
}

.rota-bim__modal::backdrop {
  background: rgba(0,0,0,0);
  transition: background .25s ease;
  backdrop-filter: blur(1px);
}
.rota-bim__modal.is-open::backdrop { background: rgba(0,0,0,.6); }

.rota-bim__modal {
  border: none;
  padding: 0;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  max-width: min(780px, 92vw);
  overflow: visible;
  background: transparent;
  opacity: 0;
  transition: opacity .25s ease;
}
.rota-bim__modal.is-open { opacity: 1; }
.rota-bim__modal.closing { opacity: 0; transition-duration: .2s; }

.rota-bim__modal-body {
  border-radius: var(--radius-md);
  min-width: 320px;
  position: relative;
  background: transparent;
}

.rb-img {
  display: block;
  width: 100%;
  height: auto;
  margin: 0;
  border-top-left-radius: var(--radius-md);
  border-top-right-radius: var(--radius-md);
}

.rb-content {
  background: #fff;
  border-bottom-left-radius: var(--radius-md);
  border-bottom-right-radius: var(--radius-md);
  padding: 24px;
}

#modal-step-3 .rb-content {
  background: unset;
  padding: 0;
}

.rota-bim__modal-title { margin: 0 0 8px; font-size: 22px; }
.rota-bim__cta {
  display: block;
  width: max-content;
  margin: 12px auto 0;
  background: var(--brand);
  color: #fff;
  padding: 10px 18px;
  border-radius: 10px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 6px 12px rgba(37,206,123,.3);
}

.rota-bim__close {
  position: absolute;
  top: -12px;
  right: -12px;
  border: 0;
  background: var(--brand);
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-lg);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: 0 6px 16px rgba(0,0,0,.18);
  z-index: 2;
}

.rb-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.rb-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0,0,0,.08);
  padding: 16px;
}
.rb-card__title { margin: 6px 0 10px; font-size: 18px; }
.rb-card__desc  { margin: 0 0 12px; font-size: 14px; line-height: 1.45; color: #2b2b2b; }
.rb-link        { color: var(--brand); font-weight: 600; text-decoration: underline; }

.rb-card .rota-bim__cta {
  display: block;
  width: max-content;
  margin: 12px auto 0;
}

@media (max-width: 900px) {
  #modal-step-3 .rb-grid {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 12px;
    max-height: calc(100dvh - 120px);
    overflow: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  .rota-bim {
    height: 100vh;
    min-height: 100vh;
  }
}

@media (max-width: 900px) and (max-height: 700px) {
  #modal-step-3 .rb-grid {
    max-height: calc(100dvh - 90px);
  }
}

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

@media (max-width: 842px) {
  .content-wrapper {
    max-width: 100%;
  }

  .bim-building {
    left: clamp(-20px, -6vw, -60px);
    width: clamp(300px, 52vw, 520px);
  }

  .rota-bim__steps {
    left: clamp(12px, 7vw, 36px);
    top: clamp(24px, 7vw, 72px);
    gap: clamp(24px, 5.5vw, 60px);
  }

  .bg-triangle {
    width: min(526px, 100%);
    left: 0;
    bottom: 0;
    display: none;
  }
}
