/* Página Regulamento — visualizador PDF por modalidade */

.regulamento-page {
  /* Não usar padding shorthand — preserva padding-top de .site-main (header + countdown) */
  padding-inline: 0;
  padding-bottom: var(--space-6);
}

.regulamento-shell {
  max-width: min(100%, 980px);
  margin: 0 auto;
  padding-inline: var(--space-3);
}

.regulamento-hero {
  width: 100%;
  text-align: center;
  margin-bottom: var(--space-4);
  padding: clamp(2.4rem, 5vw, 4rem) var(--space-3) var(--space-4);
}

.regulamento-hero .page-eyebrow {
  justify-content: center;
  margin-bottom: var(--space-1);
}

.regulamento-hero__title {
  margin: 0 0 var(--space-2);
  font-family: var(--font-heading);
  font-size: clamp(2.6rem, 5vw, 3rem);
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  line-height: 1.05;
}

.regulamento-hero__lead {
  width: 100%;
  max-width: none;
  margin: 0 auto;
  font-family: var(--font-body);
  font-size: clamp(1.35rem, 2.2vw, 1.65rem);
  font-weight: 400;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.92);
}

.regulamento-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: center;
  align-items: center;
  margin-bottom: var(--space-3);
}

.regulamento-tab {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  box-sizing: border-box;
  min-height: var(--btn-tab-min-height);
  height: var(--btn-tab-min-height);
  padding: 0.7rem var(--btn-tab-padding-x) 0;
  border: 0;
  border-radius: var(--radius-btn);
  background: var(--color-purple);
  color: #fff;
  font-family: var(--font-heading);
  font-size: var(--btn-tab-font-size);
  font-weight: var(--btn-font-weight);
  font-style: normal;
  letter-spacing: var(--btn-letter-spacing);
  line-height: var(--btn-line-height);
  text-transform: uppercase;
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
  box-shadow:
    0 0 14px rgba(83, 49, 124, 0.45),
    0 10px 24px rgba(28, 8, 35, 0.22);
  transition:
    background 0.22s ease,
    box-shadow 0.22s ease,
    color 0.22s ease,
    filter 0.2s ease;
}

.regulamento-tab:hover {
  filter: brightness(1.1);
  color: #fff;
  box-shadow:
    0 0 22px rgba(83, 49, 124, 0.55),
    0 14px 32px rgba(28, 8, 35, 0.26);
}

.regulamento-tab.is-active {
  background: var(--color-yellow) !important;
  color: var(--color-purple-strong);
  box-shadow: var(--shadow-btn-yellow);
}

.regulamento-tab.is-active:hover {
  color: var(--color-purple-strong);
  box-shadow: var(--shadow-btn-yellow-hover);
}

.regulamento-tab i {
  color: inherit;
  line-height: 1;
}

.regulamento-viewer {
  border-radius: 2rem;
  border: 1px solid rgba(206, 27, 130, 0.42);
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: none;
  box-shadow:
    0 0 22px rgba(206, 27, 130, 0.24),
    0 18px 44px rgba(28, 8, 35, 0.34);
  overflow: hidden;
}

.regulamento-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 0.75rem;
  padding: 0.9rem 1.1rem;
  border-bottom: 1px solid rgba(206, 27, 130, 0.28);
  background: var(--color-rose-strong) !important;
  background-size: auto !important;
}

.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(250, 242, 201, 0.96) 0%, rgba(248, 236, 220, 0.98) 100%);
  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 28px rgba(28, 8, 35, 0.16);
}

.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.28);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-family: var(--font-ui);
  font-size: 1.1875rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.regulamento-toolbar__btn:hover:not(:disabled) {
  background: rgba(242, 183, 30, 0.22);
  border-color: rgba(242, 183, 30, 0.55);
  color: #fff;
  box-shadow: 0 0 0 2px rgba(242, 183, 30, 0.18);
}

.regulamento-toolbar__btn:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}

.regulamento-toolbar__page {
  min-width: 4.5rem;
  font-size: 1.15rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.95);
  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: #5a3d6e;
  background: rgba(255, 255, 255, 0.96);
}

.regulamento-status[hidden] {
  display: none !important;
}

.regulamento-status i {
  font-size: 2rem;
  color: var(--color-primary);
}

.regulamento-status--error {
  color: #8e2018;
}

.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(206, 27, 130, 0.28);
  background: rgba(255, 255, 255, 0.92);
  font-size: 1.05rem;
  line-height: 1.45;
  color: #5a3d6e;
  text-align: center;
}

.regulamento-footer-note a {
  color: var(--color-primary-dark);
  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);
  }
}
