/* Página Regulamento — visualizador PDF no layout Banrisul */

body.page-regulamento {
  background: #ffffff;
}

.page-regulamento .site-main {
  padding-bottom: clamp(4rem, 8vw, 7rem);
}

.page-regulamento .site-header__content {
  justify-content: space-between;
  gap: 1.4rem;
}

.regulamento-header__back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18rem;
  height: 5.2rem;
  padding: 0 1.8rem;
  border-radius: 1rem;
  border: 0;
  background: #ffffff;
  color: #5f2dd2;
  font-size: 1.8rem;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  transition: none;
}

.regulamento-header__back:hover {
	color: #5f2dd2;
}

.regulamento-page {
  position: relative;
  overflow: hidden;
}

.regulamento-hero {
  position: relative;
  z-index: 1;
  text-align: center;
  padding-top: clamp(3.5rem, 6vw, 5rem);
  padding-bottom: clamp(2rem, 4vw, 3rem);
}

.regulamento-hero__icon {
  width: clamp(6rem, 4vw, 8rem);
  margin: 0 auto 1.2rem;
}

.regulamento-hero__title {
  margin: 0;
  color: #1f1f69;
  font-size: clamp(3rem, 3.2vw, 3rem);
  font-weight: 700;
  line-height: 1.05;
}

.regulamento-hero__lead {
  margin: 1.25rem auto 0;
  max-width: 51rem;
  color: #232323;
  font-size: clamp(2.2rem, 1.3vw, 2.9rem);
  line-height: 1.2;
  letter-spacing: -0.015em;
}

.regulamento-hero__decor {
  position: absolute;
  width: min(27vw, 37rem);
  max-width: 37rem;
  opacity: 0.95;
  pointer-events: none;
  user-select: none;
  z-index: -1;
}

.regulamento-hero__decor--top {
  top: -1rem;
  right: -8rem;
}

.regulamento-hero__decor--bottom {
  left: -8rem;
  bottom: -4rem;
  transform: rotate(180deg);
}

.regulamento-shell {
  position: relative;
  z-index: 1;
  max-width: min(100%, 112rem);
  margin-inline: auto;
}

.regulamento-tabs {
  display: flex;
  justify-content: center;
  margin-bottom: 1.6rem;
}

.regulamento-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  min-height: 5.2rem;
  padding: 0.9rem 2.2rem;
  border: 1px solid rgba(31, 31, 105, 0.24);
  border-radius: 999px;
  background: #ffffff;
  color: #1f1f69;
  font-size: 1.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  transition: background 0.3s ease, transform 0.3s ease;
}

.regulamento-tab.is-active,
.regulamento-tab:hover {
  background: linear-gradient(90deg, #0094ff 0%, #1cd8ca 100%);
  color: #ffffff;
  transform: scale(1.03);
}

.regulamento-viewer {
  border-radius: 2.4rem;
  border: 1px solid rgba(27, 25, 90, 0.15);
  background: #ffffff;
  box-shadow: 0 20px 60px rgba(20, 23, 79, 0.2);
  overflow: hidden;
}

.regulamento-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 0.8rem;
  padding: 1rem 1.4rem;
  background: linear-gradient(90deg, #8b5cf6 0%, #6f44d6 100%);
}

.regulamento-toolbar__group {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.regulamento-toolbar__group--download {
  margin-left: auto;
}

.regulamento-toolbar__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 4rem;
  height: 4rem;
  padding: 0 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 1rem;
  background: #ffffff;
  color: #6f44d6;
  font-size: 1.25rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.3s ease, filter 0.3s ease, background 0.3s ease;
}

.regulamento-toolbar__btn:hover:not(:disabled) {
  transform: scale(1.06);
  filter: brightness(1.06);
  background: #ffffff;
  color: #5f2dd2;
}

.regulamento-toolbar__btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.regulamento-toolbar__btn--download {
  gap: 0.55rem;
  font-size: 1.3rem;
  padding-inline: 1.4rem;
}

.regulamento-toolbar__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.4rem;
  height: 1.4rem;
  font-size: 1.35rem;
  line-height: 1;
}

.regulamento-toolbar__icon svg {
  display: block;
  width: 1.4rem;
  height: 1.4rem;
  fill: currentColor;
}

.regulamento-toolbar__page {
  min-width: 5.4rem;
  color: #ffffff;
  font-size: 1.28rem;
  font-weight: 600;
  text-align: center;
}

.regulamento-canvas-wrap {
  position: relative;
  min-height: min(72vh, 84rem);
  max-height: min(78vh, 92rem);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  background: linear-gradient(180deg, #f5f7ff 0%, #ffffff 100%);
  padding: 1.2rem 0 1.8rem;
}

.regulamento-page-stage {
  position: relative;
  width: max-content;
  max-width: none;
  margin: 0 auto;
}

.regulamento-canvas-wrap canvas {
  display: block;
  margin: 0 auto;
  max-width: none;
  width: auto;
  height: auto;
  flex-shrink: 0;
  box-shadow: 0 12px 28px rgba(27, 25, 90, 0.2);
  border-radius: 0.6rem;
}

.regulamento-status {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: var(--space-3);
  text-align: center;
  color: #4b4b6d;
  background: rgba(255, 255, 255, 0.92);
}

.regulamento-status[hidden] {
  display: none !important;
}

.regulamento-status i {
  font-size: 2rem;
  color: #5f2dd2;
}

.regulamento-status__spinner,
.regulamento-status__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  flex-shrink: 0;
}

.regulamento-status__spinner {
  border: 2px solid rgba(95, 45, 210, 0.2);
  border-top-color: #5f2dd2;
  border-radius: 50%;
  animation: regulamento-spin 0.9s linear infinite;
}

.regulamento-status__icon {
  border-radius: 50%;
  background: rgba(142, 32, 24, 0.16);
  color: #8e2018;
  font-weight: 700;
  font-size: 1.35rem;
}

.regulamento-status--error {
  color: #8e2018;
}

@keyframes regulamento-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 991px) {
  .regulamento-hero__decor {
    width: min(42vw, 30rem);
  }

  .regulamento-hero__decor--top {
    right: -6rem;
  }

  .regulamento-hero__decor--bottom {
    left: -6rem;
    bottom: -3rem;
  }

  .regulamento-shell {
    padding-inline: 2rem;
  }
}

@media (max-width: 767px) {
  .regulamento-header__back {
    min-width: 14rem;
    height: 4.4rem;
    padding-inline: 1.4rem;
    font-size: 1.5rem;
  }

  .regulamento-hero {
    padding-inline: 2rem;
  }

  .regulamento-hero__lead {
    font-size: clamp(1.6rem, 4vw, 1.8rem);
  }

  .regulamento-hero__decor {
    width: min(48vw, 22rem);
  }

  .regulamento-hero__decor--top {
    right: -5.5rem;
    top: -0.2rem;
  }

  .regulamento-hero__decor--bottom {
    left: -5.5rem;
    bottom: -3.2rem;
  }

  .regulamento-tabs {
    margin-bottom: 1.2rem;
  }

  .regulamento-tab {
    min-height: 4.8rem;
    padding-inline: 1.8rem;
    font-size: 1.4rem;
  }

  .regulamento-toolbar {
    justify-content: center;
  }

  .regulamento-toolbar__group--download {
    margin-left: 0;
  }

  .regulamento-canvas-wrap {
    min-height: 58vh;
    max-height: 68vh;
    padding: 0.8rem 0 1rem;
  }

  .regulamento-page-stage {
    max-width: none;
  }
}
