.pmun-page {
  font-family: 'Poppins', sans-serif;
  background: #ffffff;
  color: var(--pmun-dark);
  --pmun-primary:      #77172f;
  --pmun-primary-dark: #5c1024;
  --pmun-gold:         #BFA184;
  --pmun-dark:         #1a1a1a;
  --pmun-mid:          #444444;
  --pmun-muted:        #888888;
  --pmun-light:        #f7f7f7;
  --pmun-white:        #ffffff;
  --pmun-border:       rgba(0, 0, 0, 0.08);
  --pmun-radius:       6px;
  --pmun-radius-lg:    12px;
  --pmun-shadow:       0 4px 24px rgba(0, 0, 0, 0.07);
  --pmun-shadow-hover: 0 12px 36px rgba(0, 0, 0, 0.12);
}

.pmun-hero {
  background-image: url('https://www.huichapan.gob.mx/images/fondo1.jpg');
  background-size: cover;
  background-position: center;
  position: relative;
  padding: 64px 80px 72px;
  color: #fff;
}

.pmun-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(20, 5, 10, 0.58);
  pointer-events: none;
}

.pmun-hero-inner {
  position: relative;
  z-index: 1;
  text-align: center;
}

.pmun-hero-sup {
  font-family: 'Poppins', sans-serif;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--pmun-gold);
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.pmun-hero-sup::before,
.pmun-hero-sup::after {
  content: '';
  width: 32px;
  height: 1px;
  background: var(--pmun-gold);
  opacity: 0.5;
}

.pmun-hero-titulo {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
  color: #fff;
}

.pmun-hero-desc {
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.7);
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.7;
}

.pmun-divider {
  height: 4px;
  background: linear-gradient(90deg, var(--pmun-primary) 0%, var(--pmun-gold) 50%, var(--pmun-primary) 100%);
  opacity: 0.15;
}

.pmun-section {
  padding: 60px 80px 72px;
  background: #fff;
}

.pmun-section-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.pmun-section-header {
  margin-bottom: 36px;
}

.pmun-titulo-seccion {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(1.5rem, 2.8vw, 2.2rem);
  font-weight: 800;
  color: var(--pmun-dark);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0;
}

.pmun-titulo-resaltado {
  color: var(--pmun-primary);
}

.pmun-documento-header {
  margin-bottom: 28px;
  text-align: center;
}

.pmun-documento-titulo {
  display: inline-block;
  margin: 0;
  padding: 0;
  color: var(--pmun-gold);
  font-family: 'Poppins', sans-serif;
  font-size: 40px;
  line-height: 1.1;
  letter-spacing: -1px;
  text-transform: none;
}

.pmun-acciones-documento {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin: 0 auto 34px;
}

.pmun-boton-consultar,
.pmun-boton-descargar {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 24px;
  color: var(--pmun-white);
  background-color: var(--pmun-primary);
  border-radius: 7px;
  text-decoration: none;
  font-size: 18px;
  font-weight: 700;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.pmun-boton-consultar:hover,
.pmun-boton-descargar:hover {
  background-color: var(--pmun-gold);
  color: var(--pmun-white);
  transform: translateY(-2px);
}

.pmun-icono {
  width: 20px;
  height: 20px;
  display: block;
}

.pmun-ornament {
  text-align: center;
  padding: 32px 0 56px;
  background: var(--pmun-light);
}

.pmun-punto {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--pmun-gold);
  margin: 0 4px;
  opacity: 0.5;
}

.pmun-punto:nth-child(2) {
  opacity: 1;
  background: var(--pmun-primary);
  width: 8px;
  height: 8px;
  vertical-align: middle;
}

.pmun-flipbook-container {
  background: var(--pmun-white);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--pmun-shadow);
}

.pmun-flipbook-toolbar {
  background: #646464;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  gap: 24px;
  min-height: 54px;
  color: var(--pmun-white);
}

.pmun-toolbar-left,
.pmun-toolbar-center,
.pmun-toolbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pmun-toolbar-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--pmun-white);
  font-size: 20px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.pmun-toolbar-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.12);
}

.pmun-toolbar-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.pmun-toolbar-counter {
  min-width: 72px;
  text-align: center;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 700;
}

.pmun-toolbar-zoom {
  min-width: 60px;
  text-align: center;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 700;
}

.pmun-flipbook-viewer {
  position: relative;
  width: 100%;
  height: calc(100vh - 300px);
  min-height: 800px;
  overflow: hidden;
  background: var(--pmun-white);
  display: flex;
  align-items: center;
  justify-content: center;
}

.pmun-area {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow: auto;
  padding: 20px;
}

.pmun-zoom-stage {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-width: 100%;
  transform-origin: top center;
  transition: transform 0.2s ease;
}

.pmun-flipbook-container #pmunFlipbook {
  margin: 0 auto;
}

.pmun-pagina {
  background: var(--pmun-white);
  overflow: hidden;
}

.pmun-pagina-imagen {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  user-select: none;
  pointer-events: none;
}

.pmun-arrow {
  position: absolute;
  top: 50%;
  z-index: 20;
  width: 62px;
  height: 78px;
  border: 0;
  color: var(--pmun-white);
  background: rgba(45, 45, 45, 0.72);
  font-size: 42px;
  cursor: pointer;
  transform: translateY(-50%);
  transition: background 0.3s ease;
}

.pmun-arrow:disabled {
  opacity: 0.35;
  cursor: default;
}

.pmun-arrow-prev {
  left: 0;
  border-radius: 0 34px 34px 0;
}

.pmun-arrow-next {
  right: 0;
  border-radius: 34px 0 0 34px;
}

.pmun-loading,
.pmun-error {
  position: absolute;
  inset: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: var(--pmun-primary);
  background: var(--pmun-white);
  font-size: 18px;
}

.pmun-error {
  display: none;
  color: #721c24;
  background: #f8d7da;
}

.pmun-spinner {
  width: 46px;
  height: 46px;
  border: 5px solid rgba(123, 23, 52, 0.2);
  border-top-color: var(--pmun-primary);
  border-radius: 50%;
  animation: pmunGirar 0.8s linear infinite;
}

@keyframes pmunGirar {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 900px) {
  .pmun-section {
    padding: 48px 40px 56px;
  }

  .pmun-hero {
    padding: 48px 40px 56px;
  }

  .pmun-acciones-documento {
    gap: 12px;
  }

  .pmun-boton-consultar,
  .pmun-boton-descargar {
    padding: 11px 16px;
    font-size: 15px;
  }

  .pmun-flipbook-viewer {
    height: calc(100vh - 250px);
    min-height: 600px;
  }

  .pmun-flipbook-toolbar {
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 16px;
  }

  .pmun-toolbar-btn {
    width: 36px;
    height: 36px;
    font-size: 18px;
  }

  .pmun-toolbar-counter,
  .pmun-toolbar-zoom {
    min-width: 56px;
    font-size: 12px;
  }

  .pmun-arrow {
    width: 48px;
    height: 64px;
    font-size: 30px;
  }
}

@media (max-width: 768px) {
  .pmun-section {
    padding: 40px 28px 56px;
  }

  .pmun-hero {
    padding: 40px 28px 56px;
  }

  .pmun-hero-titulo {
    font-size: 2rem;
  }

  .pmun-documento-titulo {
    font-size: clamp(28px, 8vw, 40px);
    letter-spacing: -0.7px;
  }

  .pmun-boton-consultar,
  .pmun-boton-descargar {
    padding: 11px 16px;
    font-size: 15px;
  }

  .pmun-flipbook-viewer {
    height: calc(100vh - 220px);
    min-height: 500px;
  }

  .pmun-area {
    padding: 12px;
  }

  .pmun-flipbook-toolbar {
    flex-direction: column;
    gap: 8px;
    padding: 8px 12px;
  }

  .pmun-toolbar-left,
  .pmun-toolbar-center,
  .pmun-toolbar-right {
    width: 100%;
    justify-content: center;
  }

  .pmun-toolbar-btn {
    width: 34px;
    height: 34px;
    font-size: 16px;
  }

  .pmun-toolbar-counter,
  .pmun-toolbar-zoom {
    min-width: 50px;
    font-size: 11px;
  }

  .pmun-arrow {
    width: 44px;
    height: 56px;
    font-size: 26px;
  }
}

@media (max-width: 480px) {
  .pmun-section {
    padding: 32px 16px;
  }

  .pmun-hero {
    padding: 32px 16px;
  }

  .pmun-hero-sup::before,
  .pmun-hero-sup::after {
    display: none;
  }

  .pmun-documento-titulo {
    font-size: clamp(24px, 8vw, 36px);
  }

  .pmun-acciones-documento {
    flex-direction: column;
    gap: 12px;
  }

  .pmun-boton-consultar,
  .pmun-boton-descargar {
    width: 100%;
    justify-content: center;
    padding: 11px 16px;
    font-size: 15px;
  }

  .pmun-flipbook-viewer {
    height: calc(100vh - 200px);
    min-height: 400px;
  }

  .pmun-area {
    padding: 8px;
  }

  .pmun-flipbook-toolbar {
    padding: 6px 8px;
    gap: 6px;
  }

  .pmun-toolbar-btn {
    width: 32px;
    height: 32px;
    font-size: 14px;
  }

  .pmun-toolbar-counter,
  .pmun-toolbar-zoom {
    min-width: 44px;
    font-size: 10px;
  }

  .pmun-arrow {
    width: 40px;
    height: 50px;
    font-size: 22px;
  }

  .pmun-loading,
  .pmun-error {
    font-size: 14px;
  }

  .pmun-spinner {
    width: 40px;
    height: 40px;
    border-width: 4px;
  }
}