/* Página Regulamento — visualizador PDF por modalidade */

.regulamento-page {
  padding-inline: var(--space-3);
  padding-bottom: var(--space-6);
}

.regulamento-shell {
  max-width: min(100%, 980px);
  margin: 0 auto;
}

.regulamento-hero {
  position: relative;
  text-align: center;
  padding: clamp(2.4rem, 5vw, 4rem) var(--space-3) var(--space-4);
  margin-bottom: var(--space-2);
}

.regulamento-hero::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(520px, 80vw);
  height: min(520px, 80vw);
  transform: translate(-50%, -55%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201, 162, 39, 0.22) 0%, transparent 68%);
  pointer-events: none;
  z-index: 0;
}

.regulamento-hero > * {
  position: relative;
  z-index: 1;
}

.regulamento-hero .page-eyebrow {
  justify-content: center;
}

.regulamento-hero__title {
  margin: 0 0 var(--space-2);
  font-family: var(--font-section);
  font-size: clamp(2.6rem, 5vw, 4rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: none;
  line-height: 1.05;
  color: #fff;
}

.regulamento-hero__lead {
    max-width: 42rem;
    margin: 0 auto var(--space-3);
    font-size: clamp(1.35rem, 2.2vw, 1.65rem);
    line-height: 1.5;
    color: var(--color-text-muted);
}

.regulamento-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: center;
  margin-bottom: var(--space-3);
}

.regulamento-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 48px;
  padding: 0.75rem 1.35rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.88);
  font-family: var(--font-ui);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  cursor: pointer;
  transition:
    background 0.22s ease,
    border-color 0.22s ease,
    box-shadow 0.22s ease,
    color 0.22s ease;
}

.regulamento-tab:hover {
  border-color: rgba(255, 196, 0, 0.35);
  color: #fff;
}

.regulamento-tab.is-active {
  border-color: rgba(255, 196, 0, 0.55);
  background: linear-gradient(135deg, rgba(201, 162, 39, 0.55) 0%, rgba(232, 200, 114, 0.35) 100%);
  color: #fff;
  box-shadow: 0 0 22px rgba(201, 162, 39, 0.28);
}

.regulamento-tab i {
  color: var(--color-gold);
}

.regulamento-viewer {
  border-radius: var(--radius-card);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(5, 5, 5, 0.72);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.regulamento-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 0.75rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.35);
}

.regulamento-toolbar__group {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.regulamento-toolbar__group--download {
  margin-left: auto;
}

.regulamento-canvas-wrap {
  position: relative;
  min-height: min(72vh, 820px);
  max-height: min(78vh, 900px);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01)),
    #121212;
  padding: 0.75rem 0;
}

.regulamento-page-stage {
  position: relative;
  width: fit-content;
  max-width: calc(100% - 1.5rem);
  margin: 0 auto;
}

.regulamento-canvas-wrap canvas {
  display: block;
  margin: 0 auto;
  max-width: 100%;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

.regulamento-toolbar__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  font-family: var(--font-ui);
  font-size: 1.1875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.regulamento-toolbar__btn:hover:not(:disabled) {
  background: rgba(201, 162, 39, 0.28);
  border-color: rgba(255, 196, 0, 0.35);
}

.regulamento-toolbar__btn:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}

.regulamento-toolbar__page {
  min-width: 4.5rem;
  font-size: 1.15rem;
  color: var(--color-text-muted);
  text-align: center;
}

.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: var(--color-text-muted);
  background: rgba(5, 5, 5, 0.72);
}

.regulamento-status[hidden] {
  display: none !important;
}

.regulamento-status i {
  font-size: 2rem;
  color: var(--color-gold);
}

.regulamento-status--error {
  color: #ffb4b4;
}

.regulamento-footer-note {
  margin: var(--space-3) 0 0;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 196, 0, 0.22);
  background: rgba(255, 196, 0, 0.06);
  font-size: 1.05rem;
  line-height: 1.45;
  color: var(--color-text-muted);
  text-align: center;
}

.regulamento-footer-note a {
  color: var(--color-gold);
  font-weight: 700;
}

@media (max-width: 767px) {
  .regulamento-toolbar {
    justify-content: center;
  }

  .regulamento-toolbar__group--download {
    margin-left: 0;
  }

  .regulamento-canvas-wrap {
    min-height: 58vh;
    max-height: 68vh;
    padding: 0.5rem 0;
  }

  .regulamento-page-stage {
    max-width: calc(100% - 0.75rem);
  }
}
